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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.per-second-display {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: 500;
}

.per-second-value {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

.stats-container {
    margin-bottom: 20px;
}

.shop-button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
    margin-bottom: 30px;
}

.shop-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
}

.shop-button:active {
    transform: translateY(0);
}

.coin-display {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.coin-icon {
    font-size: 1.2em;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.coin-count {
    color: #667eea;
    font-size: 1.3em;
}

.coin-goal {
    color: #999;
    font-size: 0.8em;
}

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

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    border-radius: 15px;
}

.shop-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;
}

.shop-modal.show {
    display: flex;
}

.shop-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.shop-header h2 {
    color: #667eea;
    margin: 0;
    font-size: 2em;
}

.close-shop {
    background: #ff4757;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-shop:hover {
    background: #ff3838;
    transform: rotate(90deg);
}

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

.upgrade-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

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

.upgrade-card.purchased {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    opacity: 0.7;
}

.upgrade-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.upgrade-info {
    flex-grow: 1;
}

.upgrade-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
}

.upgrade-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.upgrade-cost {
    font-size: 0.95em;
    color: #667eea;
    font-weight: bold;
}

.upgrade-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.upgrade-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.upgrade-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.upgrade-btn.purchased {
    background: #4caf50;
    cursor: default;
}

.upgrade-btn.purchased:hover {
    transform: none;
}

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

.blue-face {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50%;
    width: 250px;
    height: 250px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    position: relative;
}

.blue-face.upgraded {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 10px 30px rgba(56, 239, 125, 0.4);
}

.face {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye {
    position: absolute;
    width: 12px;
    height: 28px;
    background: #003d5c;
    border-radius: 50%;
    top: 35%;
    transform: rotate(-10deg);
}

.left-eye {
    left: 30%;
}

.right-eye {
    right: 30%;
    transform: rotate(10deg);
}

.smile {
    position: absolute;
    width: 100px;
    height: 50px;
    border: 8px solid #003d5c;
    border-top: none;
    border-radius: 0 0 100px 100px;
    bottom: 25%;
    transition: all 0.2s ease;
}

.blue-face.upgraded .smile {
    width: 70px;
    height: 35px;
    border-width: 6px;
}

.blue-face:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.6);
}

.blue-face:active {
    transform: scale(0.95);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.click-effect {
    position: absolute;
    pointer-events: none;
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
    opacity: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.click-effect.show {
    animation: floatUp 0.8s ease-out;
}

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

.victory-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;
}

.victory-modal.show {
    display: flex;
}

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

.victory-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);
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

.victory-content h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.victory-content p {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 30px;
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.restart-btn:active {
    transform: translateY(0);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    .blue-face {
        width: 150px;
        height: 150px;
        font-size: 100px;
    }

    .coin-display {
        font-size: 1.5em;
    }

    .victory-content {
        padding: 30px;
    }

    .victory-content h2 {
        font-size: 2em;
    }
}

