:root {
    --bg-color: #0a0a0a;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;
    --accent-color: #2ecc71;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
}

#game-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

#combo-display {
    position: absolute;
    top: 150px;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 10;
    pointer-events: none;
    animation: comboPulse 0.2s ease-out;
}

@keyframes comboPulse {
    0% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Left Section: Clicker */
.clicker-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-overlay {
    position: absolute;
    top: 40px;
    text-align: center;
}

#points-display {
    font-size: 4rem;
    font-weight: 800;
    display: block;
    margin-bottom: 5px;
}

#rate-display {
    font-size: 1.2rem;
    opacity: 0.7;
}

#mode-display {
    position: absolute;
    bottom: 40px;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#zone-name {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 5px;
    letter-spacing: 3px;
}

/* The Smiler Face (CSS Only) */
#clicker-object {
    width: 300px;
    height: 300px;
    background: #000;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: transform 0.05s active;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 30px var(--accent-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s, box-shadow 0.3s;
}

#clicker-object:active {
    transform: scale(0.95);
}

.smiler-face {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

/* The Winning Smile Eyes */
.eye {
    width: 60px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 70px;
}

.eye-left { left: 60px; }
.eye-right { right: 60px; }

/* The Winning Smile Mouth */
.mouth {
    width: 200px;
    height: 70px;
    border: 12px solid #fff;
    border-top: 0;
    border-radius: 0 0 100px 100px;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
}

/* Right Section: Upgrades */
.upgrades-section {
    width: 400px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#upgrade-list, #achievement-list {
    flex-shrink: 0;
    overflow-y: auto;
    padding-right: 10px;
}

#upgrade-list {
    max-height: 60vh;
}

#achievement-list {
    flex: 1;
}

#upgrade-list::-webkit-scrollbar {
    width: 6px;
}

#upgrade-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.upgrade-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    text-align: left;
}

.upgrade-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-5px);
    border-color: var(--accent-color);
}

.upgrade-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.upgrade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upgrade-info .name {
    font-weight: 700;
    font-size: 1.1rem;
}

.upgrade-info .desc {
    font-size: 0.8rem;
    opacity: 0.6;
}

.upgrade-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.upgrade-meta .cost {
    font-weight: 700;
    color: var(--accent-color);
}

.upgrade-meta .count {
    font-size: 1.5rem;
    font-weight: 800;
    opacity: 0.2;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--accent-color);
    color: #000;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 800;
    z-index: 1000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

/* Particles */
.click-particle {
    position: absolute;
    pointer-events: none;
    font-weight: 800;
    color: var(--accent-color);
    animation: particleUp 1s ease-out forwards;
    z-index: 999;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.click-particle.crit {
    color: #ff3e3e;
    font-size: 2rem;
    z-index: 1000;
    text-shadow: 0 0 10px rgba(255, 62, 62, 0.5);
}

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

/* Achievement Items */
.achievement-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease-out;
}

.achievement-icon {
    font-size: 1.5rem;
}

.achievement-info .name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
}

.achievement-info .desc {
    display: block;
    font-size: 0.75rem;
    opacity: 0.5;
}

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

/* Music Credits */
#music-credits {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
}

#music-credits h2 {
    font-size: 0.75rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

#music-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#music-link:hover {
    opacity: 0.8;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

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