/* Modern Musical Theme */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Fallback for Material Icons if blocked */
.material-icons {
    font-family: 'Material Icons', sans-serif;
    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;
}

/* Unicode fallbacks when Material Icons fail to load */
.material-icons:not(:empty) {
    font-family: 'Material Icons', sans-serif;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* Hero section with glass morphism */
.hero.is-fullheight {
    background: transparent;
}

.hero-body {
    padding: 2rem 1.5rem;
}

#app-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in;
}

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

/* Titles with gradient */
.title {
    color: #667eea; /* Fallback color */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) or not (-webkit-background-clip: text) {
    .title {
        background: none;
        color: #667eea;
        -webkit-text-fill-color: #667eea;
    }
}

.subtitle {
    color: #4a5568;
    font-weight: 600;
}

/* Modern buttons */
.button {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.button.is-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.button.is-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.button.is-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.button.is-info:hover {
    background: linear-gradient(135deg, #3d9ae5 0%, #00d9e5 100%);
}

.button.is-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.button.is-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.button.is-light {
    background: #f7fafc;
    color: #4a5568;
}

.button.is-light:hover {
    background: #edf2f7;
}

/* Language Switcher */
.hero .dropdown {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

.dropdown-trigger .button {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Staff container with musical theme */
#staff-container {
    background: linear-gradient(to bottom, #ffffff 0%, #f7fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#staff-container::before {
    content: '♪ ♫ ♪';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: rgba(102, 126, 234, 0.1);
    animation: float 3s ease-in-out infinite;
}

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

#staff-container svg {
    max-width: 100%;
    width: 80vw;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Answer buttons grid */
#answer-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

#answer-buttons .button {
    font-size: 1.1rem;
    padding: 1.5rem 0.5rem;
    height: auto;
}

/* Score display */
#score-display, #timer-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Report screen */
#problem-notes.box {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

#problem-notes ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#problem-notes li {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

#problem-notes li:hover {
    background: #f7fafc;
}

#problem-notes li:last-child {
    border-bottom: none;
}

.problem-note-item .mini-staff {
    max-width: 100%;
    width: 120px;
    height: auto;
    flex-shrink: 0;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-right: 1rem;
}

.problem-note-item span {
    flex-grow: 1;
    text-align: left;
    color: #2d3748;
    font-weight: 500;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #2d3748;
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}

.footer p {
    color: #2d3748 !important;
    margin-bottom: 0.5rem;
}

.footer a {
    color: #667eea;
    text-decoration: underline;
    font-weight: 600;
}

.footer a:hover {
    color: #764ba2;
}

.footer span {
    color: #2d3748;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive */
@media screen and (max-width: 768px) {
    #app-container {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    #staff-container svg {
        width: 95vw;
    }
    
    #answer-buttons {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 0.5rem;
    }
    
    #answer-buttons .button {
        font-size: 1rem;
        padding: 1rem 0.25rem;
    }
    
    .buttons.is-centered {
        flex-wrap: wrap;
    }
    
    .buttons.is-centered .button {
        margin-bottom: 0.5rem;
    }
    
    .footer {
        background: rgba(255, 255, 255, 0.98);
        padding: 1.5rem 1rem;
    }
    
    .footer p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Smooth transitions for screen changes */
.box {
    animation: fadeIn 0.3s ease-in;
}

/* Quiz question styling */
#quiz-question {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}
