/* Fortune Telling Specific Styles */
/* Complements the modern site design system */

/* Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-primary);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 50;
    font-size: 0.9rem;
}

.language-toggle:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-toggle:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.language-icon {
    font-size: 1.2em;
}

.language-text {
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Resume Dialog */
.resume-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.resume-dialog {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.resume-dialog h2 {
    color: #111827;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
}

.resume-dialog p {
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.05rem;
    text-align: center;
}

.dialog-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.dialog-buttons button {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: #5a67d8;
    color: #5a67d8;
}

/* Previous Results Dialog */
.previous-results-dialog .previous-result-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #e5e7eb;
}

.previous-results-dialog .result-composer-name {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.previous-results-dialog .result-composer-name strong {
    color: #667eea;
    font-weight: 700;
}

.previous-results-dialog .result-match-percentage {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.previous-results-dialog .result-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.previous-results-dialog .dialog-question {
    margin-bottom: 1.5rem;
}

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

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

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-screen.fade-in {
    opacity: 1;
}

.loading-screen.active {
    opacity: 1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-primary-lighter);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background-color: #E5E7EB;
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    width: 30%;
    background-color: var(--color-primary);
    border-radius: 2px;
    animation: loading-progress 2s ease-in-out infinite;
}

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

@keyframes loading-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* Start Screen */
.start-screen {
    padding: 2rem 0;
}

.start-button {
    font-size: 1.125rem;
    padding: 1rem 3rem;
}

/* Composer Preview Grid */
.composers-preview {
    margin-top: 3rem;
}

.composer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.composer-tile {
    background-color: var(--color-bg-light);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.composer-tile:hover {
    border-color: var(--color-primary-light);
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.composer-name-preview {
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.composer-era-preview {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Quiz Container */
.quiz-container {
    padding: 2rem 0;
    max-width: 48rem;
    margin: 0 auto;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Question */
.question-wrapper {
    margin-bottom: 2rem;
}

.question-number {
    color: var(--color-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-primary);
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.answer-btn {
    flex: 1;
    max-width: 200px;
    padding: 1.5rem;
    border: 2px solid #E5E7EB;
    border-radius: 1rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.answer-btn:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Focus styles for keyboard navigation */
.answer-btn:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.answer-btn.selected {
    border-color: var(--color-primary);
    background-color: var(--color-bg-light);
}

.answer-yes.selected {
    border-color: #10B981;
    background-color: #D1FAE5;
}

.answer-no.selected {
    border-color: #EF4444;
    background-color: #FEE2E2;
}

.answer-label {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.answer-sublabel {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Quiz Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-primary);
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-primary);
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

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

.nav-btn:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.nav-back {
    background-color: var(--color-bg-gray);
    border-color: #D1D5DB;
    color: var(--color-text-secondary);
}

.nav-back:hover {
    background-color: #E5E7EB;
    border-color: #9CA3AF;
    color: var(--color-text-primary);
}

.nav-results {
    background-color: var(--color-primary);
    color: white;
}

.nav-results:hover {
    background-color: var(--color-primary-dark);
}

/* Results Container */
.results-container {
    padding: 2rem 0;
    position: relative;
    min-height: 100vh;
    background: #ffffff;
}

/* Gradient header section */
.results-header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0 3rem;
    margin: -2rem -2rem 3rem -2rem;
    position: relative;
    overflow: hidden;
}

.results-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>') repeat;
    pointer-events: none;
}

/* Enhanced Section Title */
.results-header-section .section-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #ffffff, transparent);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Top Match Card - Updated Design */
.top-match-card {
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.top-match-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmerRotate 8s linear infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.concert-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 2rem 1rem;
    margin: -1px -1px 0 -1px;
    border-radius: 1rem 1rem 0 0;
}

.concert-card-header h2 {
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.concert-card-header p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Enhanced Match Percentage Display */
/* Match Result Layout */
.match-result-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .match-result-layout {
        flex-direction: column;
        gap: 2rem;
    }
}

.match-info-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.match-percentage-display {
    position: relative;
    display: inline-block;
}

.match-percentage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    position: relative;
    background: conic-gradient(
        from 0deg,
        #ffd700 0deg,
        #ffed4e calc(var(--match-percent, 70) * 3.6deg),
        #f3f4f6 calc(var(--match-percent, 70) * 3.6deg)
    );
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    animation: percentagePulse 2s ease-in-out infinite;
}

.match-percentage::before {
    content: '';
    position: absolute;
    inset: 10px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.match-percentage::after {
    content: attr(data-percent);
    position: absolute;
    font-size: 2.2rem;
    z-index: 1;
    color: #111827;
}

@keyframes percentagePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 215, 0, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 50px rgba(255, 215, 0, 0.6); }
}

.match-label {
    display: block;
    font-size: 1rem;
    color: #6b7280;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.match-level {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    animation: levelShine 3s ease-in-out infinite;
}

.match-level::before {
    content: '✨';
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
}

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

@keyframes sparkle {
    0%, 100% { opacity: 0.8; transform: rotate(0deg); }
    50% { opacity: 1; transform: rotate(180deg); }
}

.match-level.perfect {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #7c3f00;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.match-level.excellent {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

.match-level.good {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.match-level.fair {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #7c2d12;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
}

.match-level.low {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
}

/* Enhanced Composer Image */
.composer-image-container {
    text-align: center;
    position: relative;
    display: inline-block;
}

.composer-image-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.composer-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 0 0 8px rgba(147, 51, 234, 0.1),
        0 0 0 16px rgba(147, 51, 234, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
    background-color: #f3f4f6;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: imageFloat 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.composer-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.composer-image:hover::after {
    animation: shimmer 0.6s ease-out;
    opacity: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes imageFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

.composer-image:hover {
    transform: scale(1.1) rotate(2deg);
    border-color: rgba(147, 51, 234, 0.3);
    box-shadow: 
        0 0 0 12px rgba(147, 51, 234, 0.15),
        0 0 0 24px rgba(147, 51, 234, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness for composer images */
@media (max-width: 640px) {
    .composer-image-container::before {
        width: 180px;
        height: 180px;
    }
    
    .composer-image {
        width: 150px;
        height: 150px;
    }
    
    .composer-image:hover {
        transform: scale(1.05) rotate(1deg);
    }
    
    .match-percentage {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }
    
    .match-percentage::after {
        font-size: 1.8rem;
    }
    
    .match-label {
        font-size: 0.875rem;
    }
}

.composer-details {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.composer-details p {
    color: #374151;
    line-height: 1.8;
}

.composer-details .text-sm {
    color: #6b7280;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Enhanced Vector Display */
.vector-display {
    padding: 2.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
    border-radius: 1rem;
}

.vector-display h3 {
    color: #111827;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.vector-chart {
    margin-top: 1.5rem;
}

.vector-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.vector-label {
    flex: 0 0 140px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vector-label::before {
    content: '';
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.vector-item:nth-child(1) .vector-label::before { content: '🎵'; }
.vector-item:nth-child(2) .vector-label::before { content: '🌍'; }
.vector-item:nth-child(3) .vector-label::before { content: '💡'; }
.vector-item:nth-child(4) .vector-label::before { content: '🎯'; }
.vector-item:nth-child(5) .vector-label::before { content: '🎭'; }
.vector-item:nth-child(6) .vector-label::before { content: '⚡'; }
.vector-item:nth-child(7) .vector-label::before { content: '💬'; }
.vector-item:nth-child(8) .vector-label::before { content: '🎨'; }
.vector-item:nth-child(9) .vector-label::before { content: '⚖️'; }

.vector-bar-container {
    flex: 1;
    height: 30px;
    background: #f3f4f6;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vector-bar {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.vector-bar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: vectorShine 3s ease-in-out infinite;
}

@keyframes vectorShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

.vector-item:nth-child(odd) .vector-bar {
    background: linear-gradient(90deg, #a78bfa, #8b5cf6);
}

.vector-item:nth-child(3n) .vector-bar {
    background: linear-gradient(90deg, #f472b6, #ec4899);
}

.vector-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Enhanced Rankings Table */
.rankings-section {
    margin: 3rem 0 2rem;
}

.rankings-section h3 {
    color: #111827;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.rankings-table {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.08);
    padding: 0;
    overflow: hidden;
    border-radius: 1rem;
}

.rankings-table table {
    width: 100%;
    border-collapse: collapse;
}

.rankings-table th {
    background: #f9fafb;
    font-weight: 700;
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rankings-table th:first-child {
    padding-left: 4rem;
}

.rankings-table th:last-child {
    text-align: center;
}

.rankings-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.rankings-table td:last-child {
    text-align: center;
}

.rankings-table tbody tr {
    position: relative;
    transition: all 0.3s ease;
}

.rankings-table tbody tr:hover {
    background: #f9fafb;
    transform: translateX(5px);
}

.rankings-table tbody tr:hover td {
    color: #111827;
}

.top-match-row {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), rgba(252, 211, 77, 0.1));
    position: relative;
}

.top-match-row::after {
    content: '👑';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    animation: crownBounce 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(-50%) rotate(-5deg); }
    50% { transform: translateY(-50%) rotate(5deg); }
}

.top-match-row:hover {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.15), rgba(252, 211, 77, 0.15));
}

.rank-number {
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rankings-table tbody tr:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #7c3f00;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rankings-table tbody tr:nth-child(1) td:first-child {
    padding-left: 4rem;
    position: relative;
}

.rankings-table tbody tr:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #4a4a4a;
}

.rankings-table tbody tr:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #cd7f32, #e6a85c);
    color: #5d3a1a;
}

.composer-name {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}

.composer-name-en {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.similarity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.similarity-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.similarity-perfect {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #7c3f00;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.similarity-excellent {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.similarity-good {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.similarity-fair {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #7c2d12;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.similarity-low {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
    box-shadow: 0 0 15px rgba(107, 114, 128, 0.5);
}

/* Enhanced Action Buttons */
.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding: 2rem 0;
}

.action-buttons button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-btn {
    background: linear-gradient(135deg, #1DA1F2, #1a91da);
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.share-btn::before {
    content: '📤';
    font-size: 1.2rem;
}

.share-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: left 0.5s ease;
}

.share-btn:hover {
    background: linear-gradient(135deg, #1a91da, #1681c4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.4);
}

.share-btn:hover::after {
    left: 100%;
}

.restart-btn {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.restart-btn::before {
    content: '🔄';
    font-size: 1.2rem;
}

.restart-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Confetti Animation for High Matches */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ffd700;
    animation: confetti-fall 3s linear;
    pointer-events: none;
    z-index: 9999;
}

.confetti:nth-child(2n) { background: #ff6b6b; width: 8px; height: 8px; }
.confetti:nth-child(3n) { background: #4ecdc4; width: 12px; height: 12px; }
.confetti:nth-child(4n) { background: #45b7d1; width: 6px; height: 6px; }
.confetti:nth-child(5n) { background: #96ceb4; width: 10px; height: 10px; }

/* Entry Animations */
.results-container > * {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.results-container > *:nth-child(1) { animation-delay: 0.1s; }
.results-container > *:nth-child(2) { animation-delay: 0.2s; }
.results-container > *:nth-child(3) { animation-delay: 0.3s; }
.results-container > *:nth-child(4) { animation-delay: 0.4s; }

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

/* Error Screen */
.error-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Button focus styles */
.btn-primary:focus,
.btn-outline:focus,
.start-button:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .answer-btn:focus,
    .nav-btn:focus,
    .btn-primary:focus,
    .btn-outline:focus {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .answer-btn,
    .nav-btn {
        transform: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .composer-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .answer-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .answer-btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Results page mobile adjustments */
    .results-container .section-title {
        font-size: 2rem;
    }
    
    .match-percentage {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
    }
    
    .match-percentage::after {
        font-size: 2.5rem;
    }
    
    .concert-card-header h2 {
        font-size: 1.5rem;
    }
    
    .concert-card-header p {
        font-size: 1.25rem;
    }
    
    .vector-label {
        flex: 0 0 100px;
        font-size: 0.75rem;
    }
    
    .vector-label::before {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .rankings-table {
        font-size: 0.875rem;
    }
    
    .rankings-table th,
    .rankings-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .rank-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .top-match-row::after {
        left: 0.5rem;
        font-size: 1rem;
    }
    
    .rankings-table tbody tr:nth-child(1) td:first-child {
        padding-left: 2.5rem;
    }
    
    .hide-mobile {
        display: none;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons button {
        width: 100%;
        max-width: 300px;
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    /* Results header mobile adjustment */
    .results-header-section {
        margin: -2rem -1rem 2rem -1rem;
        padding: 3rem 1rem 2rem;
    }
}

/* Animations */
.animated {
    transition: all 0.3s ease;
}

/* Content Box override for fortune */
.content-box {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 640px) {
    .content-box {
        padding: 1.5rem;
    }
}

/* Performance: Lazy Loading Images */

.lazy-image {
    opacity: 0;
}

.lazy-image.loading {
    opacity: 0.3;
    background-image: linear-gradient(90deg, #F3F4F6 0%, #E5E7EB 50%, #F3F4F6 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-image.loaded {
    opacity: 1;
}

.lazy-image.error {
    opacity: 0.5;
    background-color: #FEE2E2;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Performance: Will-change for animations */
.quiz-container.animated {
    will-change: transform, opacity;
}

.answer-btn {
    will-change: transform;
}

.vector-bar {
    will-change: width;
}

/* Performance: GPU acceleration for heavy animations */
.loading-spinner,
.loading-progress-bar {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Prevent layout shift */
.progress-container {
    min-height: 52px;
}

.question-wrapper {
    min-height: 120px;
}

/* Optimize reflows */
.quiz-container {
    contain: layout style;
}