:root {
    --bg-primary: #0A0A12;
    --bg-secondary: #12121F;
    --bg-card: #1A1A2E;
    --btc: #F7931A;
    --btc-light: #FFB347;
    --sol: #9945FF;
    --sol-light: #14F195;
    --stable: #00D395;
    --stable-light: #00B386;
    --accent: #00D4FF;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: #fff;
    margin: 0;
    padding: 0;
}

.font-display {
    font-family: 'Space Grotesk', sans-serif;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.app-container {
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(153, 69, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(247, 147, 26, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 70%),
        var(--bg-primary);
    min-height: 100vh;
}

.header-gradient {
    background: linear-gradient(135deg, #1a1a3e 0%, #0d0d1a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.coin-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--btc), var(--btc-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(247, 147, 26, 0.3); }
    50% { box-shadow: 0 0 30px rgba(247, 147, 26, 0.6); }
}

.lang-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.sector-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.btc-badge:hover {
    border-color: var(--btc);
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.2);
}

.sol-badge:hover {
    border-color: var(--sol);
    box-shadow: 0 0 20px rgba(153, 69, 255, 0.2);
}

.stable-badge:hover {
    border-color: var(--stable);
    box-shadow: 0 0 20px rgba(0, 211, 149, 0.2);
}

.text-btc { color: var(--btc); }
.text-sol { color: var(--sol); }
.text-stable { color: var(--stable); }

.bg-btc\/10 { background: rgba(247, 147, 26, 0.1); }
.bg-btc\/20 { background: rgba(247, 147, 26, 0.2); }
.bg-sol\/10 { background: rgba(153, 69, 255, 0.1); }
.bg-sol\/20 { background: rgba(153, 69, 255, 0.2); }
.bg-stable\/10 { background: rgba(0, 211, 149, 0.1); }
.bg-stable\/20 { background: rgba(0, 211, 149, 0.2); }

.total-input {
    caret-color: var(--accent);
}

.total-input:focus {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btc-slider::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--btc), var(--btc-light));
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.5);
}

.sol-slider::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--sol), var(--sol-light));
    box-shadow: 0 0 10px rgba(153, 69, 255, 0.5);
}

.stable-slider::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--stable), var(--stable-light));
    box-shadow: 0 0 10px rgba(0, 211, 149, 0.5);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.allocation-input {
    width: 60px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.allocation-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.holding-input {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.holding-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.progress-fill.valid {
    background: linear-gradient(90deg, var(--stable), var(--stable-light));
}

.progress-fill.invalid {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.validation-bar.invalid .progress-track {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

.action-arrow {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.action-arrow.buy {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.action-arrow.sell {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.export-btn {
    background: linear-gradient(135deg, var(--accent), #0099cc);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.hodl-banner {
    background: linear-gradient(90deg, var(--btc), var(--btc-light), var(--btc));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    color: white;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.rebalance-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(18, 18, 31, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: fall 3s ease-out forwards;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-gradient {
        padding: 16px;
    }
    
    .coin-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .total-input {
        font-size: 2rem !important;
    }
    
    .sector-badge {
        padding: 8px !important;
    }
    
    .sector-badge .text-2xl {
        font-size: 1.25rem;
    }
}