/**
 * 🎯 RADIM MATH PANEL STYLES
 * ==========================
 * Sci-fi visualization of RADIM mathematics
 * φ, C, α, Fibonacci, Lucas, Pell
 */

/* Widget wrapper with spacing */
.radim-math-widget {
    margin-top: 24px;
}

.radim-math-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f0f5f5 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header */
.math-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(79, 172, 254, 0.3);
}

.math-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4FACFE 0%, #FF6B9D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.radim-constant {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 1.2rem;
}

.radim-constant .label {
    color: #94a3b8;
    font-weight: 500;
}

.radim-constant .value {
    color: #4FACFE;
    font-weight: 700;
    font-size: 1.5rem;
}

.radim-constant .formula {
    color: #64748b;
    font-size: 0.9rem;
}

/* Main Metrics */
.main-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.metric {
    background: rgba(91, 168, 160, 0.04);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(79, 172, 254, 0.2);
    transition: all 0.3s ease;
}

.metric:hover {
    border-color: rgba(79, 172, 254, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.2);
}

.metric-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4FACFE;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.metric-bar {
    height: 8px;
    background: rgba(91, 168, 160, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #4FACFE 0%, #00f2fe 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.metric-fill.alpha-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.metric-state {
    font-size: 0.9rem;
    font-weight: 600;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-emotion {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-style: italic;
}

/* Phi Section */
.phi-section {
    background: rgba(79, 172, 254, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.phi-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

.phi-symbol {
    font-size: 2rem;
    font-weight: 700;
    color: #FFD700;
    font-family: 'Georgia', serif;
}

.phi-label {
    font-size: 1rem;
    color: #94a3b8;
    flex: 1;
}

.phi-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4FACFE;
    font-variant-numeric: tabular-nums;
}

.phi-timing {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.timing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(91, 168, 160, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(79, 172, 254, 0.1);
}

.timing-label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.timing-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4FACFE;
    font-variant-numeric: tabular-nums;
}

/* Spirals Section */
.spirals-section {
    margin-bottom: 24px;
}

.spirals-section h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: #e2e8f0;
    font-weight: 600;
}

.spiral-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.spiral-item {
    background: rgba(91, 168, 160, 0.04);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.spiral-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.spiral-item.fibonacci {
    border-color: rgba(34, 197, 94, 0.5);
}

.spiral-item.fibonacci:hover {
    border-color: rgba(34, 197, 94, 1);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.spiral-item.lucas {
    border-color: rgba(59, 130, 246, 0.5);
}

.spiral-item.lucas:hover {
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.spiral-item.pell {
    border-color: rgba(168, 85, 247, 0.5);
}

.spiral-item.pell:hover {
    border-color: rgba(168, 85, 247, 1);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}

.spiral-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.spiral-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.spiral-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.spiral-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4FACFE;
    font-variant-numeric: tabular-nums;
}

/* Iteration Info */
.iteration-info {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    padding: 12px;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(79, 172, 254, 0.2);
}

.iteration-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.iteration-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4FACFE;
    font-variant-numeric: tabular-nums;
}

.iteration-max {
    font-size: 1rem;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .main-metrics {
        grid-template-columns: 1fr;
    }
    
    .phi-timing {
        grid-template-columns: 1fr;
    }
    
    .spiral-grid {
        grid-template-columns: 1fr;
    }
    
    .math-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Animations */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(79, 172, 254, 0.6);
    }
}

.metric.consciousness:hover {
    animation: pulseGlow 2s infinite;
}
