:root {
    --primary-color: #2c5f2d;
    --secondary-color: #fdc500;
    --accent-color: #ce1126;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #fff;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #1a4a1b);
    color: var(--text-light);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.local-notice {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff4d6;
    border: 2px solid var(--secondary-color);
    color: #5a3a00;
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin: 20px 0 30px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.local-notice.is-visible {
    display: flex;
}

.local-notice-text {
    font-size: 0.98rem;
    line-height: 1.5;
    flex: 1 1 360px;
}

.local-url {
    display: block;
    margin-top: 6px;
    font-weight: 700;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    background: var(--light-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
}

main {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    min-height: auto;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

/* Search Bar */
.search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid var(--light-bg);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#regionFilter {
    padding: 15px 20px;
    border: 2px solid var(--light-bg);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
}

/* Instruments Grid */
.instruments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.instrument-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.instrument-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.instrument-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.instrument-card-content {
    padding: 20px;
}

.instrument-card h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.instrument-card .region {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.instrument-card p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Instrument Detail */
.instrument-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
}

.detail-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #a00e1e;
    transform: rotate(90deg);
}

#detailImage {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

#detailName {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.detail-region {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.detail-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.cultural-context,
.playing-technique,
.materials {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--light-bg);
    border-radius: 8px;
}

.cultural-context h3,
.playing-technique h3,
.materials h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
.curriculum-pacing {
    background: #f7fbff;
    border-radius: var(--border-radius);
    padding: 20px 24px;
    border: 1px solid #cfe2f3;
    box-shadow: var(--shadow);
}
.curriculum-pacing h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}
}

.waveform {
    height: 80px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}


/* Curriculum */
.curriculum-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.curriculum-hero {
    background: linear-gradient(135deg, #f7f0d8, #ffffff);
    border-radius: var(--border-radius);
    padding: 28px;
    border: 2px solid var(--secondary-color);
    box-shadow: var(--shadow);
}

.curriculum-hero h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.curriculum-intro {
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.curriculum-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.curriculum-pill {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.curriculum-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 20px 22px;
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.curriculum-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.curriculum-list {
    list-style: none;
    padding-left: 0;
}

.curriculum-list li {
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
}

.curriculum-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

.curriculum-path {
    background: #f2f6f2;
    border-radius: var(--border-radius);
    padding: 22px 24px;
    border: 1px solid #d9e5d9;
}

.curriculum-path h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.curriculum-steps {
    margin: 0;
    padding-left: 20px;
}

.curriculum-steps li {
    margin-bottom: 8px;
}

.curriculum-support {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.curriculum-text {
    margin-bottom: 12px;
}

.curriculum-links {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.curriculum-links li {
    margin-bottom: 6px;
}

.curriculum-links a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.curriculum-links a:hover {
    text-decoration: underline;
}

.curriculum-lens {
    background: #fffaf0;
    border-radius: var(--border-radius);
    padding: 20px 24px;
    border: 1px solid #f3d28b;
    box-shadow: var(--shadow);
}

.curriculum-lens h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.curriculum-cta {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 20px 24px;
    border: 1px dashed var(--secondary-color);
}

.curriculum-cta h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Rhythm Studio */
.rhythm-studio {
    max-width: 900px;
    margin: 0 auto;
}

.rhythm-selector {
    margin-bottom: 30px;
}

.rhythm-selector h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.rhythm-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.rhythm-btn {
    padding: 15px 25px;
    background: var(--light-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.rhythm-btn:hover {
    background: var(--primary-color);
    color: white;
}

.rhythm-btn.active {
    background: var(--primary-color);
    color: white;
}

.rhythm-visualizer {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

#rhythmCanvas {
    width: 100%;
    height: 200px;
    display: block;
}

.rhythm-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.control-btn:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.rhythm-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

#tempoSlider {
    width: 150px;
}

#tempoValue {
    min-width: 60px;
    color: var(--primary-color);
}

.rhythm-info {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
}

.rhythm-info h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.rhythm-audio-status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: rgba(253, 197, 0, 0.2);
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

/* Rhythm Map */
.rhythm-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.rhythm-map-stage {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow);
}

.rhythm-map-canvas {
    width: 100%;
    height: 460px;
    border-radius: 10px;
    overflow: hidden;
}

.rhythm-map-panel {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.rhythm-map-panel h2 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.map-intro {
    margin-bottom: 12px;
}

.map-card p {
    margin-bottom: 10px;
}

.practitioner-profile {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: white;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}

.practitioner-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.practitioner-bio {
    font-size: 0.92rem;
    line-height: 1.45;
}

.map-place-tooltip {
    background: rgba(44, 95, 45, 0.9);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

@media (max-width: 980px) {
    .rhythm-map-layout {
        grid-template-columns: 1fr;
    }

    .rhythm-map-canvas {
        height: 360px;
    }
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 30px 0 15px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-content ul {
    margin: 20px 0;
    padding-left: 40px;
}

.about-content li {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
}

/* Music Analysis Styles */
.analyze-container {
    max-width: 1000px;
    margin: 0 auto;
}

.analyze-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.analyze-controls {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.control-group h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.input-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.record-timer {
    display: none;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(206, 17, 38, 0.12);
    color: #ce1126;
    font-weight: 600;
    font-size: 0.9rem;
}

.analysis-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(44, 95, 45, 0.08);
    color: var(--text-dark);
    font-size: 0.9rem;
    min-height: 20px;
}

.analyze-visualizers {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.visualizer-container {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.visualizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.visualizer-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
}

.visualizer-container h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.download-btn {
    padding: 6px 14px;
    background: var(--secondary-color);
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #ffc300;
    transform: scale(1.05);
}

.download-btn:active {
    transform: scale(0.98);
}

#waveformCanvas,
#frequencyCanvas,
#spectrogramCanvas,
#energyCanvas,
#pitchCanvas,
#rhythmAnalysisCanvas,
#instrumentCanvas,
#genreCanvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.analyze-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, var(--primary-color), #1a4a1b);
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.rhythmic-analysis {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border-left: 5px solid var(--secondary-color);
}

.rhythmic-header h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.rhythmic-header .analyze-intro {
    margin-bottom: 20px;
}

.rhythmic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.rhythmic-visual {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.analyze-info {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
}

.analyze-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-content {
    display: grid;
    gap: 15px;
}

.info-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-item strong {
    color: var(--primary-color);
}

/* Explorer Comparison Styles */
.explorer-comparison {
    padding: 15px;
    background: white;
    border-radius: 6px;
}

.explorer-matches {
    display: grid;
    gap: 15px;
}

.explorer-match-card {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.match-header h5 {
    color: var(--primary-color);
    margin: 0;
}

.match-confidence {
    background: var(--secondary-color);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.match-details p {
    font-size: 0.9rem;
    margin: 5px 0;
    color: var(--text-dark);
}

.explorer-link-btn {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.explorer-link-btn:hover {
    background: #1a4a1b;
    transform: translateY(-2px);
}

.no-match-info {
    padding: 15px;
    background: #fff9e6;
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
}

.no-match-info p,
.no-match-info ul {
    font-size: 0.9rem;
    margin: 10px 0;
    color: var(--text-dark);
}

.no-match-info ul {
    margin-left: 20px;
}

.no-match-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.no-match-info a:hover {
    text-decoration: underline;
}

@keyframes highlight-flash {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: rgba(253, 197, 0, 0.3);
    }
}

.highlight-flash {
    animation: highlight-flash 0.5s ease-in-out 2;
}

/* Responsive */
@media (max-width: 768px) {
    .analyze-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .rhythmic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .input-buttons {
        flex-direction: column;
    }
    
    .control-btn {
        width: 100%;
    }
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .instruments-grid {
        grid-template-columns: 1fr;
    }

    .detail-content {
        padding: 20px;
    }

    #detailName {
        font-size: 1.8rem;
    }

    .rhythm-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .rhythm-controls label {
        flex-direction: column;
        align-items: flex-start;
    }

    #tempoSlider {
        width: 100%;
    }
}

/* Detail Actions */
.detail-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.action-btn {
    padding: 12px 25px;
    background: var(--secondary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

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

/* Quiz Game Styles */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
}

.quiz-intro,
.compare-intro,
.favorites-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--light-bg);
    padding: 15px 30px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.quiz-content {
    margin-bottom: 30px;
}

.question-card {
    background: var(--light-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

#questionText {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.answer-options {
    display: grid;
    gap: 15px;
}

.answer-option {
    padding: 20px;
    background: white;
    border: 3px solid var(--light-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    text-align: left;
}

.answer-option:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.answer-option.correct {
    background: #d4edda;
    border-color: #28a745;
}

.answer-option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.answer-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.quiz-feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.1rem;
}

.quiz-feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.quiz-feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.quiz-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Compare Styles */
.compare-container,
.favorites-container {
    max-width: 1200px;
    margin: 0 auto;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.compare-card {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
}

.compare-card .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.compare-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.compare-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.compare-detail {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
}

.compare-detail strong {
    color: var(--primary-color);
}

.compare-empty,
.favorites-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.2rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

/* Favorites specific */
#favoritesGrid {
    margin-bottom: 30px;
}

#clearFavorites,
#clearComparison {
    display: block;
    margin: 0 auto;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.instrument-card {
    animation: slideIn 0.5s ease;
}

.answer-option:hover {
    animation: pulse 0.3s ease;
}

/* Particle Background Effect */
.container {
    position: relative;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Footer styling to stabilize bottom layout */
footer {
    margin-top: 30px;
    padding: 16px 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.18);
    color: #f8f8f8;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
