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

:root {
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --accent-cyan: #00f0ff;
    --accent-purple: #a855f7;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --green: #10b981;
    --red: #ef4444;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 40%, #0d1b3a 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Background Orbs */
.bg-orbs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 300px; height: 300px;
    background: var(--accent-purple);
    top: -50px; right: -50px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px; height: 400px;
    background: #1e3a8a;
    bottom: -100px; left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px; height: 250px;
    background: var(--accent-cyan);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

/* Glass Header */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 24px 20px 16px;
    background: rgba(15, 15, 35, 0.7);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.app-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* Search */
.search-container {
    max-width: 400px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

#searchInput::placeholder {
    color: var(--text-secondary);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Main */
.app-main {
    position: relative;
    z-index: 1;
    padding: 20px 16px;
    max-width: 900px;
    margin: 0 auto;
}

/* Glass Card Base */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--glass-shadow);
}

/* Crypto Grid */
.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

@media (max-width: 600px) {
    .crypto-grid {
        grid-template-columns: 1fr;
    }
}

/* Coin Card */
.coin-card {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    animation: cardIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.coin-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 240, 255, 0.1);
}

.coin-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.coin-info {
    flex: 1;
    min-width: 0;
}

.coin-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coin-symbol {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.coin-price-section {
    text-align: right;
    flex-shrink: 0;
}

.coin-price {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.coin-change {
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 2px;
}

.coin-change.positive { color: var(--green); }
.coin-change.negative { color: var(--red); }

/* Loading */
.loading-glass {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.glass-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 30px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* No results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1rem;
}
