:root {
    --primary-color: #4ade80;
    --primary-hover: #22c55e;
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    gap: 2rem;
    padding: 2rem;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Left Panel */
.clicker-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.stats-board {
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.currency-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.currency-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.currency-rate {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.horse-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
}

.horse-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.horse-btn:active {
    transform: scale(0.9);
}

.horse-btn img {
    max-width: 350px;
    max-height: 400px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    transition: filter 0.3s;
}

.horse-btn:hover img {
    filter: drop-shadow(0 0 30px rgba(74, 222, 128, 0.4));
}

.click-power {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Right Panel */
.shop-section {
    width: 400px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    max-height: 100%;
}

.shop-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--accent);
}

.upgrades-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom Scrollbar */
.upgrades-list::-webkit-scrollbar {
    width: 8px;
}
.upgrades-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}
.upgrades-list::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 4px;
}
.upgrades-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.upgrade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-item:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.upgrade-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.upgrade-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.upgrade-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upgrade-cost {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.upgrade-cost img {
    width: 16px;
    height: 16px;
}

.upgrade-count {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
}

.shop-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.danger-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.danger-btn:hover {
    background: var(--danger-hover);
}

/* Floating Click Effect */
.click-effect {
    position: absolute;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.5rem;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

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

@media (max-width: 900px) {
    .game-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }
    .shop-section {
        width: 100%;
        max-height: 500px;
    }
}
