:root {
    --bg-dark: #f8f6f6;
    --surface: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(236, 91, 19, 0.1); /* Subtle orange border */
    --accent-color: #ec5b13; /* Beatlemania Orange */
    --accent-secondary: #ff7d3b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --success: #16a34a;
    --error: #dc2626;
    --warning: #eab308;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Public Sans', 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.glass-container {
    background: var(--surface);
    min-height: 100vh;
    width: 100%;
    padding: 2rem 5%;
    box-shadow: none;
    animation: fadeIn 0.4s ease-out;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    gap: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    animation: spin 8s linear infinite;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

h1 {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--text-secondary);
}

.accent {
    color: var(--text-primary);
    font-weight: 800;
}

/* ... existing styles ... */

.feedback.results {
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    min-height: auto;
    line-height: 1.4;
    flex-direction: column;
}

.rundown-container {
    width: 100%;
    margin-top: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.rundown-container::-webkit-scrollbar {
    width: 6px;
}

.rundown-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.rundown-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: grid;
    grid-template-columns: 50px 1fr 1fr 80px;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: transform 0.2s ease;
}

.rundown-item:hover {
    transform: scale(1.01);
    background: rgba(255, 255, 255, 0.08);
}

.rundown-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.rundown-item .song-info {
    display: flex;
    flex-direction: column;
}

.rundown-item .song-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.rundown-item .song-credits {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.rundown-item .album-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rundown-item .result-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 2px 8px;
    border-radius: 4px;
}

.rundown-item.item-correct .result-tag {
    color: var(--success);
    background: rgba(0, 255, 136, 0.1);
}

.rundown-item.item-wrong .result-tag {
    color: var(--error);
    background: rgba(255, 65, 108, 0.1);
}

/* Timeline Specific Rundown */
.timeline-rundown .rundown-item {
    grid-template-columns: 80px 1fr 120px;
}

.year-circle {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(236, 91, 19, 0.2);
}

.item-wrong .year-circle {
    background: var(--error);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2);
}

.item-correct .year-circle {
    background: var(--success);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

.score-board {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    gap: 1.25rem;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.main-btn {
    background-color: var(--accent-color);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(236, 91, 19, 0.2), 0 2px 4px -1px rgba(236, 91, 19, 0.1);
}

.main-btn:hover {
    background-color: var(--accent-secondary);
    box-shadow: 0 10px 15px -3px rgba(236, 91, 19, 0.3);
    transform: translateY(-1px);
}

.main-btn:active {
    transform: scale(0.95);
}

.main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#play-btn-text {
    line-height: normal;
}

.material-symbols-outlined {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#play-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    line-height: 1;
}

.visualizer {
    display: flex;
    gap: 4px;
    height: 20px;
    align-items: center;
}

.visualizer.hidden {
    display: none;
}

.bar {
    width: 3px;
    height: 10%;
    background: white; /* White for the blue button */
    border-radius: 2px;
    transition: height 0.2s ease;
}

.visualizing .bar {
    animation: bounce 0.4s ease-in-out infinite alternate;
}

.visualizing .bar:nth-child(2) { animation-delay: 0.05s; }
.visualizing .bar:nth-child(3) { animation-delay: 0.1s; }
.visualizing .bar:nth-child(4) { animation-delay: 0.15s; }
.visualizing .bar:nth-child(5) { animation-delay: 0.2s; }

@keyframes bounce {
    from { height: 10%; }
    to { height: 100%; }
}

#play-btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#play-btn-content.hidden {
    display: none;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

.mode-selector {
    display: flex;
    justify-content: center;
    background: #f1f3f4;
    padding: 3px;
    border-radius: 10px;
}

.mode-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: rgba(0,0,0,0.05);
}

.mode-btn.active {
    background: white;
    color: var(--accent-color);
    box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.grid-container {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.album-grid {
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 1rem;
    padding: 0 1rem;
}

@media (max-width: 1200px) {
    .album-grid {
        gap: 0.5rem;
    }
    .card {
        padding: 0.75rem;
    }
}

.author-grid {
    grid-template-columns: repeat(5, 1fr);
    justify-content: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    gap: 1rem;
}

.card {
    background: white;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 160px;
    min-height: 180px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card:hover {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 12px 3px rgba(60,64,67,.15);
    transform: translateY(-2px);
}

.card.correct {
    border-color: var(--success);
}

.card.correct img {
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2), 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 2px solid var(--success);
}

.card.wrong {
    border-color: var(--error);
}

.card.wrong img {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2), 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 2px solid var(--error);
}

.album-card img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.card.album-card {
    border: none;
    background: transparent;
    box-shadow: none;
}

.card.album-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    background: transparent;
}

.card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f1f3f4;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card:hover .author-img {
    border-color: var(--accent-color);
}

.card-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.feedback {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    min-height: 4rem;
    /* Increased for multi-line results */
    margin-top: -2rem;
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.show {
    opacity: 1;
}

.feedback.results {
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    min-height: auto;
    line-height: 1.4;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--glass-bg);
    border-color: var(--text-primary);
}

/* Timeline Mode */
.timeline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.event-pool {
    background: #fff5f0;
    border-radius: 24px;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    min-height: 250px;
    border: 1px solid rgba(236, 91, 19, 0.1);
    transition: all 0.4s ease;
}

.event-pool.collapsed {
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    height: 0;
    min-height: 0;
}

.timeline-event {
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    width: 100%;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-event:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.timeline-event.selected, 
.timeline-event.dragging {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(236, 91, 19, 0.1);
    opacity: 0.6;
    cursor: grabbing;
}

.timeline-slot.drag-over {
    border-color: var(--accent-color);
    background: rgba(236, 91, 19, 0.05);
    transform: scale(1.02);
}

.timeline-event .event-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 16px;
    z-index: 10;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.timeline-event:hover .event-nav {
    opacity: 1;
}

.event-nav.nav-left { left: -12px; }
.event-nav.nav-right { right: -12px; }

.event-nav:hover {
    background: var(--accent-secondary);
    transform: translateY(-50%) scale(1.2);
}

.event-icon {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8f9fa;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.event-icon .material-symbols-outlined {
    font-size: 32px;
    color: var(--accent-color);
    opacity: 0.5;
}

.event-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    text-align: center;
}

.timeline-track {
    width: 100%;
    position: relative;
    padding: 3rem 0;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #f1f3f4;
    transform: translateY(-50%);
    z-index: 0;
}

.timeline-slots {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1;
    gap: 0.5rem;
}

.slot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.timeline-slot {
    width: 100%;
    height: 140px;
    min-width: 80px;
    background: white;
    border: 3px dashed #e2e8f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 4px;
}

.timeline-slot:hover {
    border-color: var(--accent-color);
    background: rgba(236, 91, 19, 0.02);
}

.slot-placeholder {
    color: #cbd5e0;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    padding: 0 1.5rem;
}

.year-pill {
    background: var(--accent-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 8px rgba(236, 91, 19, 0.2);
}

.timeline-event .event-nav {
    display: none !important;
}

.timeline-event.correct-pos {
    border-color: var(--success);
    background: #f0fff4;
}

.timeline-event.wrong-pos {
    border-color: var(--error);
    background: #fff5f5;
}

#submit-timeline {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments for larger cards */
@media (max-width: 1100px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
    .author-grid { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
    .card { width: 200px; min-height: 260px; }
    .timeline-slots { flex-wrap: wrap; justify-content: center; gap: 3rem; }
}

@media (max-width: 600px) {
    header { flex-direction: column; text-align: center; gap: 1rem; }
    .mode-selector { order: 2; width: 100%; overflow-x: auto; }
    .score-board { order: 3; width: 100%; justify-content: center; margin-top: 1rem; }
    
    .album-grid, .author-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .card { width: 160px; min-height: 220px; padding: 1rem; border-radius: 16px; }
    
    .year-pill { padding: 0.5rem 1.5rem; font-size: 1rem; }
    .timeline-slot { width: 140px; height: 180px; }
    .timeline-event { width: 130px; height: 160px; padding: 0.8rem; }
    .event-icon .material-symbols-outlined { font-size: 24px; }
}