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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: #0a0a1a;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 40px;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: -1;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: #6c63ff;
    top: -50px;
    left: -50px;
    animation: float1 8s ease-in-out infinite;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: #ff6b9d;
    bottom: 100px;
    right: -80px;
    animation: float2 10s ease-in-out infinite;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #4ecdc4;
    top: 50%;
    left: -60px;
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}

.glass-header {
    text-align: center;
    padding: 24px 20px 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #6c63ff, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-header .subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 16px 12px;
    margin: 16px 16px 8px;
    border-radius: 16px;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
}

.crypto-list {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crypto-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.crypto-card:nth-child(n) {
    animation-delay: calc(var(--i, 0) * 0.05s);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crypto-card:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.98);
}

.card-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.coin-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.coin-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.coin-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-rank {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

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

.coin-symbol {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

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

.coin-price {
    font-size: 17px;
    font-weight: 700;
}

.coin-change {
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
}

.change-positive {
    color: #4ecdc4;
}

.change-negative {
    color: #ff6b9d;
}

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.card-details.open {
    max-height: 300px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    text-align: center;
}

.detail-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
}

.loading-glass {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-glass p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.error-msg {
    text-align: center;
    padding: 30px;
    font-size: 15px;
    color: #ff6b9d;
}
