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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
    cursor: default;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.modal {
    background: linear-gradient(135deg, #2d4a2d, #1a3a1a);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 700px;
    width: 90%;
    border: 3px solid #ffd93d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.5s ease;
}

.modal h1 {
    font-size: 3.5rem;
    color: #ffd93d;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.modal p {
    font-size: 1.4rem;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #e0e0e0;
}

.modal input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #ffd93d;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.modal input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.modal button {
    background: linear-gradient(135deg, #ffd93d, #ffb93d);
    color: #2d4a2d;
    border: none;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 217, 61, 0.4);
}

.end-screen {
    background: linear-gradient(135deg, #4a2d4a, #3a1a3a);
    border: 3px solid #ff6b6b;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 15px;
    margin: 7.5vh auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.end-screen::-webkit-scrollbar {
    display: none;
}

.end-screen h1 {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

.end-screen .time {
    font-size: 1.5rem;
    color: #ffd93d;
    margin-bottom: 30px;
}

.game-container {
    max-width: 100vw;
    margin: 0;
    padding: 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
}

.header {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.9));
    border-radius: 12px;
    margin-bottom: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.header h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #ffd93d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.player-name {
    font-size: 1.1rem;
    color: #87CEEB;
    margin-bottom: 12px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.game-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-stats {
    display: flex;
    flex-direction: row;
    gap: 20px;
    font-size: 1.3rem;
    color: #87CEEB;
    justify-content: center;
    align-items: center;
}

.speed-item {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(135, 206, 235, 0.1));
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(135, 206, 235, 0.3);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 120px;
    text-align: center;
    font-size: 1.3rem;
}

.timer-display {
    font-size: 1rem;
    color: #ffd93d;
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.2), rgba(255, 217, 61, 0.1));
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 217, 61, 0.3);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 80px;
    text-align: center;
}

.valou-happiness {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.valou-face {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

.happiness-bar {
    width: 500px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.happiness-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f);
    width: 0%;
    transition: width 0.5s ease;
}

.happiness-text {
    font-weight: bold;
    white-space: nowrap;
    font-size: 1rem;
    color: #ffd93d;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.main-game {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: 
        linear-gradient(180deg, 
            #87CEEB 0%,
            #98D8E8 15%,
            #6FBF73 40%,
            #5FAD56 60%,
            #4F8B4F 80%,
            #2F5F2F 100%
        );
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 0 0 100px rgba(255, 255, 255, 0.1),
        inset 0 0 50px rgba(135, 206, 235, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><text y="48" font-size="48">🪓</text></svg>') 32 32, auto;
    transition: cursor 0.1s ease;
}

.main-game.chopping-cursor {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><text y="48" font-size="48" transform="rotate(-45 32 32)">🪓</text></svg>') 32 32, auto;
}

.tree-hp-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 15;
}

.tree-hp-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.forest-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: 
        radial-gradient(circle at 20% 80%, rgba(46, 125, 50, 0.4) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(76, 175, 80, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 60% 90%, rgba(27, 94, 32, 0.5) 0%, transparent 20%),
        radial-gradient(circle at 40% 85%, rgba(46, 125, 50, 0.3) 0%, transparent 15%);
    animation: forestSway 15s ease-in-out infinite;
}

.main-tree-container {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.main-tree {
    font-size: 8rem;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><text y="48" font-size="48">🪓</text></svg>') 32 32, pointer;
    user-select: none;
    transition: transform 0.1s ease;
    border-radius: 50%;
    padding: 25px;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
    transform-origin: center center;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.main-tree.chopping-cursor {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><text y="48" font-size="48" transform="rotate(-45 32 32)">🪓</text></svg>') 32 32, pointer;
}

.main-tree:hover {
    transform: scale(1.05);
}

.main-tree:active {
    animation: treeChop 0.25s ease;
}

.main-tree.chopping {
    animation: treeChop 0.25s ease;
}

.tree-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4757, #ffa726, #66bb6a);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.game-ui {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.statistics-section {
    grid-column: 1 / -1;
    margin-top: 12px;
}

.inventory, .shop, .workers, .statistics {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.9));
    border-radius: 12px;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.inventory h3, .shop h3, .workers h3, .statistics h3 {
    margin-bottom: 12px;
    color: #ffd93d;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    border-bottom: 2px solid rgba(255, 217, 61, 0.3);
    padding-bottom: 8px;
}

.inventory-item, .worker-item, .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.inventory-item:hover, .worker-item:hover, .stat-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-item {
    font-size: 0.9rem;
}

.shop-section {
    margin-bottom: 15px;
}

.shop-section h4 {
    color: #87CEEB;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding: 4px 0;
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
}

.shop-item {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.shop-item:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.shop-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.beer-shop {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd93d;
}

.beer-shop:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 215, 0, 0.2));
    border-color: rgba(255, 215, 0, 0.7);
}

.falling-particle {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    z-index: 100;
    animation: fall 3s ease-in forwards;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.aperitif-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    font-size: 8rem;
    font-weight: bold;
    color: #ffd93d;
    text-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 217, 61, 0.8),
        0 0 40px rgba(255, 217, 61, 0.6);
    animation: aperitifBoom 2s ease-out forwards;
    pointer-events: none;
}

.glougou {
    position: fixed;
    z-index: 1999;
    font-size: 3rem;
    color: #87CEEB;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(135, 206, 235, 0.8);
    animation: glouGlouFloat 2s ease-out forwards;
    pointer-events: none;
}

.beer-emoji {
    position: fixed;
    z-index: 1998;
    font-size: 4rem;
    animation: beerFloat 2.5s ease-out forwards;
    pointer-events: none;
}

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

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

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes treeBlink {
    0%, 50% { 
        background: rgba(0, 0, 0, 0.2);
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
    }
    25%, 75% { 
        background: rgba(255, 215, 0, 0.3);
        filter: drop-shadow(0 8px 20px rgba(255, 215, 0, 0.6));
    }
}

@keyframes treeChop {
    0% { 
        transform: scale(1) rotate(0deg);
        background: rgba(0, 0, 0, 0.2);
    }
    25% { 
        transform: scale(0.9) rotate(-5deg);
        background: rgba(255, 215, 0, 0.5);
    }
    50% { 
        transform: scale(0.85) rotate(0deg);
        background: rgba(255, 100, 100, 0.4);
    }
    75% { 
        transform: scale(0.9) rotate(5deg);
        background: rgba(255, 215, 0, 0.5);
    }
    100% { 
        transform: scale(1) rotate(0deg);
        background: rgba(0, 0, 0, 0.2);
    }
}

@keyframes fall {
    0% {
        opacity: 1;
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(80px) rotate(180deg) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateY(150px) rotate(360deg) scale(0.8);
    }
}

@keyframes forestSway {
    0%, 100% { 
        transform: translateX(0px);
        filter: blur(0.5px);
    }
    33% { 
        transform: translateX(-5px);
        filter: blur(0.3px);
    }
    66% { 
        transform: translateX(5px);
        filter: blur(0.4px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0px) scale(1);
    }
    20% {
        transform: translate(-50%, -50%) translateY(-10px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-50px) scale(0.8);
    }
}

@keyframes aperitifBoom {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1) rotate(-180deg);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(0deg);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5) rotate(0deg);
    }
}

@keyframes glouGlouFloat {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.2) rotate(10deg);
    }
    70% {
        opacity: 0.8;
        transform: scale(1) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) rotate(15deg);
    }
}

@keyframes beerFloat {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(0deg) translateY(0px);
    }
    15% {
        opacity: 1;
        transform: scale(1.3) rotate(20deg) translateY(-20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(-10deg) translateY(-40px);
    }
    100% {
        opacity: 0;
        transform: scale(0.7) rotate(30deg) translateY(-80px);
    }
}

@keyframes upgradePopup {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 12px;
    }
    
    .game-container {
        padding: 6px;
        background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .header {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .header h1 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .player-name {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    
    .speed-stats {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
        font-size: 1rem;
    }
    
    .speed-item {
        font-size: 1rem;
        padding: 6px 10px;
        min-width: 85px;
    }
    
    .timer-display {
        font-size: 0.8rem;
        padding: 4px 8px;
        align-self: center;
        min-width: 60px;
    }
    
    .valou-happiness {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }
    
    .valou-face {
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .happiness-bar {
        width: 200px;
        height: 16px;
        flex-grow: 1;
        max-width: 250px;
    }
    
    .happiness-text {
        font-size: 0.8rem;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .main-game {
        min-height: 280px;
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><text y="36" font-size="36">🪓</text></svg>') 24 24, auto;
        flex-shrink: 0;
    }
    
    .main-game.chopping-cursor {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><text y="36" font-size="36" transform="rotate(-45 24 24)">🪓</text></svg>') 24 24, auto;
    }
    
    .main-tree {
        font-size: 4.5rem;
        padding: 12px;
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><text y="36" font-size="36">🪓</text></svg>') 24 24, pointer;
    }
    
    .main-tree.chopping-cursor {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><text y="36" font-size="36" transform="rotate(-45 24 24)">🪓</text></svg>') 24 24, pointer;
    }
    
    .tree-hp-container {
        top: 8px;
        left: 8px;
        right: 8px;
    }
    
    .tree-hp-bar {
        height: 16px;
    }
    
    .game-ui {
        grid-template-columns: 1fr;
        gap: 8px;
        order: 1;
    }
    
    .shop {
        order: -1;
    }
    
    .inventory, .shop, .workers, .statistics {
        padding: 10px;
    }
    
    .inventory h3, .shop h3, .workers h3, .statistics h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .inventory-item, .worker-item, .stat-item {
        padding: 6px 8px;
        font-size: 0.85rem;
        margin-bottom: 3px;
    }
    
    .shop-item {
        font-size: 0.75rem;
        padding: 8px 10px;
        margin-bottom: 5px;
        line-height: 1.2;
    }
    
    .shop-section h4 {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    
    .falling-particle {
        font-size: 1.3rem;
    }
    
    .modal h1 {
        font-size: 1.8rem;
    }
    
    .modal p {
        font-size: 0.9rem;
    }
    
    .modal {
        padding: 20px;
        max-width: 95%;
    }
    
    .end-screen h1, .end-screen h2 {
        font-size: 2.5rem;
    }
    
    .aperitif-animation {
        font-size: 4rem;
    }
    
    .glougou {
        font-size: 1.8rem;
    }
    
    .beer-emoji {
        font-size: 2.5rem;
    }
    
    .end-screen {
        padding: 10px;
        max-height: 80vh;
        overflow-y: auto;
        margin: 10vh auto;
    }
    
    .stats-table {
        margin: 15px 0;
        padding: 12px;
    }
    
    .stats-table h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .stat-value {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .social-share {
        margin: 15px 0;
        padding: 12px;
    }
    
    .share-btn-main {
        padding: 10px 20px;
        font-size: 0.9rem;
        max-width: 100%;
    }
    
    .restart-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    .statistics-section {
        order: 2;
    }
    
    .scores-btn-end {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 4px;
        gap: 6px;
    }
    
    .header {
        padding: 8px;
    }
    
    .speed-stats {
        gap: 8px;
    }
    
    .speed-item {
        font-size: 0.9rem;
        padding: 5px 8px;
        min-width: 75px;
    }
    
    .valou-happiness {
        gap: 4px;
    }
    
    .happiness-bar {
        width: 150px;
        height: 14px;
    }
    
    .happiness-text {
        font-size: 0.7rem;
    }
    
    .main-game {
        min-height: 240px;
    }
    
    .main-tree {
        font-size: 3.8rem;
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .shop-item {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
    
    .modal {
        padding: 15px;
    }
    
    .modal h1 {
        font-size: 1.5rem;
    }
    
    .modal p {
        font-size: 0.8rem;
    }
    
    .end-screen {
        padding: 10px;
    }
    
    @keyframes upgradePopup {
        0% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.2);
        }
        20% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(0.6);
        }
        40% {
            transform: translate(-50%, -50%) scale(0.5);
        }
        80% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(0.5);
        }
        100% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.3);
        }
    }
    
    .scores-btn-end {
        padding: 8px 15px;
        font-size: 0.85rem;
        margin-top: 8px;
    }
}

.stats-table {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    border: 2px solid rgba(255, 217, 61, 0.3);
}

.stats-table h3 {
    text-align: center;
    color: #ffd93d;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 20, 0.8));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 217, 61, 0.5);
    box-shadow: 0 12px 24px rgba(255, 217, 61, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd93d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-share {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.share-btn-main {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border: none;
    border-radius: 12px;
    padding: 15px 40px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    width: 100%;
    max-width: 300px;
}

.share-btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #357abd, #2968a3);
}

.restart-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252, #e53935);
}

.tutorial-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tutorial-content {
    background: linear-gradient(135deg, #2d4a2d, #1a3a1a);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 3px solid #ffd93d;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.3s ease;
}

.tutorial-content h3 {
    color: #ffd93d;
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.tutorial-content p {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

.tutorial-btn {
    background: linear-gradient(135deg, #ffd93d, #ffb93d);
    color: #2d4a2d;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 217, 61, 0.4);
}

.skip-tutorial-container {
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.skip-tutorial-container:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 217, 61, 0.3);
}

.custom-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #ffd93d, #ffb93d);
    border-color: #ffd93d;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 10px;
    border: solid #2d4a2d;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark:after {
    display: block;
}

.skip-tutorial-label {
    color: #e0e0e0;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.skip-tutorial-container:hover .skip-tutorial-label {
    color: #ffd93d;
}

@media (max-width: 768px) {
    .tutorial-content {
        max-width: 95%;
        padding: 20px;
    }
    
    .tutorial-content h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .tutorial-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .tutorial-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .skip-tutorial-container {
        padding: 12px;
        gap: 10px;
    }
    
    .skip-tutorial-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tutorial-content {
        padding: 15px;
    }
    
    .tutorial-content h3 {
        font-size: 1.1rem;
    }
    
    .tutorial-content p {
        font-size: 0.85rem;
    }
    
    .tutorial-btn {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
    
    .skip-tutorial-container {
        padding: 10px;
        gap: 8px;
    }
    
    .skip-tutorial-label {
        font-size: 0.85rem;
    }
    
    .custom-checkbox,
    .custom-checkbox .checkmark {
        width: 20px;
        height: 20px;
    }
    
    .custom-checkbox .checkmark:after {
        left: 6px;
        top: 2px;
        width: 5px;
        height: 8px;
    }
}

.welcome-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.welcome-buttons button {
    flex: 1;
    max-width: 200px;
}

.scores-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    color: #2d4a2d;
    font-weight: bold;
    border: 3px solid #2d4a2d;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.scores-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 217, 61, 0.4);
}

.scores-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.scores-content {
    background: linear-gradient(135deg, #2d4a2d, #1a3a1a);
    border: 4px solid #ffd93d;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
    text-align: center;
}

.scores-content h2 {
    color: #ffd93d;
    margin-bottom: 20px;
    font-size: 2rem;
}

.scores-list {
    margin: 20px 0;
}

.score-item {
    display: grid;
    grid-template-columns: 50px 120px 80px 1fr;
    gap: 10px;
    padding: 12px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 2px solid transparent;
    align-items: center;
    transition: all 0.3s ease;
}

.score-item:hover {
    border-color: #ffd93d;
    background: rgba(255, 217, 61, 0.1);
}

.score-item.rank-1 {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border-color: #ffd700;
}

.score-item.rank-2 {
    background: linear-gradient(45deg, rgba(192, 192, 192, 0.2), rgba(169, 169, 169, 0.1));
    border-color: #c0c0c0;
}

.score-item.rank-3 {
    background: linear-gradient(45deg, rgba(205, 127, 50, 0.2), rgba(160, 82, 45, 0.1));
    border-color: #cd7f32;
}

.score-name {
    text-align: left;
    font-weight: bold;
}

.score-time {
    font-weight: bold;
    color: #66bb6a;
}

.score-date {
    color: #87CEEB;
    font-size: 0.9rem;
}

.score-status {
    font-size: 0.9rem;
    font-weight: bold;
}

.score-status.legend {
    color: #ffd700;
}

.score-status.champion {
    color: #66bb6a;
}

.scores-header {
    display: grid;
    grid-template-columns: 50px 120px 80px 1fr;
    gap: 10px;
    padding: 10px 12px;
    font-weight: bold;
    color: #ffd93d;
    border-bottom: 2px solid #ffd93d;
    margin-bottom: 10px;
}

.close-scores-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.close-scores-btn:hover {
    background: #ff3838;
    transform: translateY(-2px);
}

.no-scores {
    color: #ccc;
    font-style: italic;
    padding: 40px 20px;
}

.score-rank {
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .welcome-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .welcome-buttons button {
        max-width: none;
    }
    
    .scores-content {
        padding: 15px;
        margin: 15px;
    }
    
    .scores-content h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .scores-content p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .score-item {
        grid-template-columns: 35px 80px 50px 1fr;
        gap: 6px;
        font-size: 0.75rem;
        padding: 6px;
    }
    
    .scores-header {
        grid-template-columns: 35px 80px 50px 1fr;
        gap: 6px;
        font-size: 0.75rem;
        padding: 6px;
    }
    
    .score-rank {
        font-size: 0.7rem;
    }
    
    .score-date {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .scores-content {
        padding: 10px;
        margin: 10px;
    }
    
    .score-item {
        grid-template-columns: 30px 65px 40px 1fr;
        gap: 4px;
        font-size: 0.65rem;
        padding: 5px;
    }
    
    .scores-header {
        grid-template-columns: 30px 65px 40px 1fr;
        gap: 4px;
        font-size: 0.65rem;
        padding: 5px;
    }
    
    .scores-content h2 {
        font-size: 1.1rem;
    }
    
    .scores-content p {
        font-size: 0.75rem;
    }
    
    .score-rank {
        font-size: 0.6rem;
    }
    
    .score-date {
        font-size: 0.6rem;
    }
    
    .close-scores-btn {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
}

.scores-btn-end {
    background: linear-gradient(135deg, #ffd93d, #ffb93d);
    color: #2d4a2d;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(255, 217, 61, 0.3);
}

.scores-btn-end:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 217, 61, 0.4);
    background: linear-gradient(135deg, #ffb93d, #ff9f3d);
} 