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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ee5a6f 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.game-container {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    min-height: 600px;
    position: relative;
}

/* Main Menu Styles */
.main-menu {
    text-align: center;
}

.main-menu h1 {
    color: #ff6b6b;
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

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

.subtitle {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.level-select {
    margin-bottom: 30px;
}

.level-select h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.level-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.level-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.level-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.level-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.level-btn.completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.level-number {
    font-size: 1.5em;
    display: block;
    margin-bottom: 5px;
}

.level-difficulty {
    font-size: 0.8em;
    opacity: 0.9;
    display: block;
}

.level-stars {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8em;
}

.stats-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #667eea;
    font-size: 2em;
    font-weight: bold;
}

.reset-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: #ee5a6f;
    transform: translateY(-2px);
}

/* Game Screen Styles */
.game-screen {
    display: none;
}

.game-screen.active {
    display: block;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #5568d3;
    transform: translateX(-3px);
}

.level-title {
    color: #ff6b6b;
    font-size: 2em;
    margin: 0;
}

.timer {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 10px rgba(254, 202, 87, 0.4);
}

.timer.warning {
    animation: timerWarning 0.5s ease-in-out infinite;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

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

.goal-container {
    margin-bottom: 30px;
}

.goal-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}

.goal-text span {
    color: #ff6b6b;
    font-size: 1.2em;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #feca57 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.5);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.click-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    margin-bottom: 20px;
}

.spam-can {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    width: 200px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spam-can:hover {
    transform: scale(1.05);
}

.spam-can:active {
    transform: scale(0.95);
}

.can-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #c44569;
}

.can-label {
    color: white;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
    letter-spacing: 5px;
}

.can-shine {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 10px;
    transform: rotate(-20deg);
}

.click-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.click-effect {
    position: absolute;
    font-size: 2em;
    font-weight: bold;
    color: #feca57;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

.click-counter {
    text-align: center;
    margin-bottom: 20px;
}

.counter-value {
    display: block;
    font-size: 3em;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.counter-label {
    display: block;
    font-size: 1.2em;
    color: #666;
}

.power-ups {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    min-height: 60px;
}

.power-up {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(254, 202, 87, 0.4);
    animation: powerUpAppear 0.5s ease-out;
}

@keyframes powerUpAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.power-up:hover {
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 8px 20px rgba(254, 202, 87, 0.6);
}

.power-up:active {
    transform: translateY(-1px) rotate(0deg);
}

.power-up.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    animation: powerUpActive 0.5s ease-in-out infinite;
}

@keyframes powerUpActive {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(56, 239, 125, 0.6);
    }
    50% {
        box-shadow: 0 5px 25px rgba(56, 239, 125, 0.9);
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

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

.modal-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    animation: scaleIn 0.5s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        transform: scale(1) rotate(0deg);
    }
}

.modal-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.modal-content.victory h2 {
    color: #38ef7d;
}

.modal-content.failure h2 {
    color: #ff6b6b;
}

.victory-stats {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.victory-stats p {
    font-size: 1.3em;
    color: #333;
    margin: 10px 0;
    font-weight: bold;
}

.victory-stats span {
    color: #667eea;
}

.failure-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.failure-text span {
    color: #ff6b6b;
    font-weight: bold;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.modal-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

.modal-btn.secondary {
    background: #e0e0e0;
    color: #333;
}

.modal-btn.secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }

    .main-menu h1 {
        font-size: 2em;
    }

    .levels-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .level-btn {
        padding: 15px;
        font-size: 1em;
    }

    .stats-display {
        flex-direction: column;
        gap: 15px;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .level-title {
        font-size: 1.5em;
    }

    .spam-can {
        width: 150px;
        height: 210px;
    }

    .can-label {
        font-size: 2em;
    }

    .counter-value {
        font-size: 2em;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 1.8em;
    }

    .modal-buttons {
        flex-direction: column;
    }
}

/* Hide inactive screens */
.main-menu.hidden {
    display: none;
}



