/* Moore's Law Interactive Styles */

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Interactive Section */
.interactive-section {
    padding: 80px 0;
    background-color: var(--primary-bg);
}

.controls-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 32px;
    background-color: var(--secondary-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
}

.timeline-controls h3,
.view-controls h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.slider-container {
    margin-bottom: 20px;
}

.year-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) 100%);
    outline: none;
    margin: 20px 0;
}

.year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
    transition: all 0.3s ease;
}

.year-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.5);
}

.year-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

#currentYear {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
}

.playback-controls {
    display: flex;
    gap: 12px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.control-btn.secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.control-btn.secondary:hover {
    background-color: var(--secondary-bg);
    color: var(--accent);
}

.toggle-buttons {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    padding: 10px 16px;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.toggle-btn.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: var(--secondary-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    margin-bottom: 40px;
    overflow: hidden;
}

#mooresChart {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.chart-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chart-tooltip.visible {
    opacity: 1;
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent);
}

.tooltip-content {
    line-height: 1.4;
}

/* Current Chip Info */
.current-chip-info {
    margin-bottom: 60px;
}

.chip-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background-color: var(--secondary-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
}

.chip-image {
    flex-shrink: 0;
}

.chip-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), #005bb5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chip-details h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.chip-specs {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.spec-label + span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

#chipDescription {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Explanation Section */
.explanation-section {
    margin-top: 60px;
}

.explanation-section h2 {
    font-size: 2.25rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.explanation-card {
    padding: 32px;
    background-color: var(--secondary-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.explanation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #005bb5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.explanation-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.explanation-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .controls-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .chart-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .controls-section {
        padding: 24px;
    }
    
    .chip-card {
        flex-direction: column;
        text-align: center;
    }
    
    .chip-specs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .playback-controls {
        flex-direction: column;
    }
    
    .chart-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .controls-section {
        padding: 20px;
    }
    
    .chip-specs {
        gap: 16px;
    }
    
    .explanation-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .control-btn.secondary {
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }
    
    .control-btn.secondary:hover {
        background-color: rgba(255, 255, 255, 0.05);
        border-color: var(--accent);
    }
    
    .toggle-btn {
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .toggle-btn:hover {
        border-color: var(--accent);
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}