* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

:root {
    color-scheme: light only;
}

html {
    color-scheme: light only;
}

body {
    color-scheme: light only;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    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;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined::before {
    content: '';
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.paint-wall {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #ffd6e8 0%, #ffe5f0 50%, #ffdde7 100%);
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    transition: background 0.3s ease;
}

.paint-wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/wall_texture.png');
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    opacity: 0.5;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.5rem;
    font-weight: 700 !important;
    font-family: 'Comic Sans MS', 'Comic Sans', 'Chalkduster', 'Marker Felt', 'Chalkboard SE', 'Bradley Hand', 'Trebuchet MS', cursive, fantasy, sans-serif !important;
    color: rgba(255, 0, 0, 0.6);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 95%;
    padding: 0 20px;
    line-height: 1.2;
    -webkit-text-size-adjust: none;
    text-rendering: optimizeLegibility;
}

.message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.timer {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.25);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2), 
                inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px) saturate(200%);
    -webkit-backdrop-filter: blur(15px) saturate(200%);
    border: none;
    text-align: center;
    z-index: 1000;
}

.timer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(0, 0, 0, 0.75);
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.timer-display {
    font-size: 2rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.9);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.unlock-notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 3000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.unlock-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.unlock-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.3),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 280px;
}

.unlock-icon {
    font-size: 3rem;
    line-height: 1;
    flex-shrink: 0;
    animation: unlockPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes unlockPop {
    0% {
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.unlock-text {
    flex: 1;
}

.unlock-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.unlock-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.95);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.audio-toggle {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px) saturate(200%);
    -webkit-backdrop-filter: blur(15px) saturate(200%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.audio-toggle:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 40px 0 rgba(31, 38, 135, 0.3),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

.audio-toggle:active {
    transform: scale(0.95);
}

.audio-icon {
    font-size: 26px;
    color: rgba(0, 0, 0, 0.85);
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
}

.audio-toggle .sound-off {
    display: none;
}

.audio-toggle.muted .sound-on {
    display: none;
}

.audio-toggle.muted .sound-off {
    display: block;
}

.badge-button {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px) saturate(200%);
    -webkit-backdrop-filter: blur(15px) saturate(200%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
    outline: none;
}

.badge-button:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 40px 0 rgba(31, 38, 135, 0.3),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

.badge-button:active {
    transform: scale(0.95);
}

.badge-icon {
    font-size: 26px;
    color: rgba(0, 0, 0, 0.85);
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
}

.stats-panel {
    position: fixed;
    top: 90px;
    right: 30px;
    transform: translateY(-10px);
    width: 280px;
    max-height: calc(90vh - 210px);
    background: rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stats-panel.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.drawers-container {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

.drawers-container::-webkit-scrollbar {
    display: none;
}

.drawers-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.drawer-item {
    margin: 0 12px 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.drawer-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.drawer-header {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.drawer-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-title-icon {
    font-size: 24px;
    color: rgba(0, 0, 0, 0.7);
}

.drawer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.drawer-icon {
    font-size: 20px;
    color: rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.drawer-header.active .drawer-icon {
    transform: rotate(180deg);
}

.drawer-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    padding: 0 16px;
    opacity: 0;
}

.drawer-body.active {
    max-height: 2000px;
    padding: 0 16px 16px;
    opacity: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.stat-item {
    margin-bottom: 20px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stats-grid .stat-item {
    margin-bottom: 0;
}

.stats-grid .stat-value {
    font-size: 1.5rem;
}

.achievement-placeholder,
.coming-soon-placeholder {
    text-align: center;
    padding: 20px 0;
}

.achievement-placeholder p,
.coming-soon-placeholder p {
    margin: 0;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

#achievementsDrawer,
#patienceLevelsDrawer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 12px 8px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.achievement-item:last-child {
    margin-bottom: 0;
}

.achievement-item.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.achievement-item.unlocked {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.achievement-info {
    width: 100%;
}

.achievement-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    word-wrap: break-word;
}

.achievement-description {
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.3;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .message {
        font-size: 1.3rem;
        font-weight: 600;
        padding: 0 15px;
        top: 40%;
        max-width: 98%;
        width: 98%;
        line-height: 1.5;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .unlock-notification {
        top: 20px;
    }
    
    .unlock-content {
        padding: 14px 20px;
        gap: 12px;
        min-width: 250px;
    }
    
    .unlock-icon {
        font-size: 2.5rem;
    }
    
    .unlock-title {
        font-size: 0.7rem;
    }
    
    .unlock-name {
        font-size: 1rem;
    }
    
    .audio-toggle {
        top: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .audio-icon {
        font-size: 26px;
    }
    
    .badge-button {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .badge-icon {
        font-size: 26px;
    }
    
    .stats-panel {
        top: 75px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: 340px;
        max-height: none;
        margin-left: auto;
    }
    
    .drawers-container {
        padding: 10px 0;
        max-height: calc(85vh - 200px);
        overflow-y: auto;
    }
    
    .drawer-body.active {
        padding: 0 14px 14px;
        max-height: min(400px, calc(70vh - 250px));
        overflow-y: auto;
    }
    
    .drawer-item {
        margin: 0 8px 6px;
    }
    
    .drawer-header {
        padding: 12px 14px;
    }
    
    .drawer-title-wrapper {
        gap: 8px;
    }
    
    .drawer-title-icon {
        font-size: 26px;
    }
    
    .drawer-title {
        font-size: 1.35rem;
    }
    
    .drawer-icon {
        font-size: 18px;
    }
    
    #achievementsDrawer,
    #patienceLevelsDrawer {
        gap: 6px;
    }
    
    .achievement-item {
        padding: 10px 6px;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .achievement-name {
        font-size: 0.75rem;
    }
    
    .achievement-description {
        font-size: 0.65rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .timer {
        bottom: 20px;
        right: 20px;
        padding: 15px 20px;
    }
    
    .timer-display {
        font-size: 1.5rem;
    }
}
