:root {
    /* Design Tokens */
    --color-bg: light-dark(#f8f9fa, #0f1115);
    --color-surface: light-dark(rgba(255, 255, 255, 0.7), rgba(30, 33, 40, 0.6));
    --color-surface-hover: light-dark(rgba(255, 255, 255, 0.9), rgba(40, 44, 52, 0.8));
    --color-text: light-dark(#1f2328, #e6edf3);
    --color-text-muted: light-dark(#656d76, #848d97);
    --color-border: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
    --color-accent: light-dark(#0969da, #2f81f7);
    --color-accent-hover: light-dark(#0349b4, #388bfd);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --radius-sm: 0.5rem;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.1);
    
    color-scheme: light dark;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background gradient effect */
.background-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, light-dark(rgba(9, 105, 218, 0.08), rgba(47, 129, 247, 0.15)), transparent 25%),
        radial-gradient(circle at 85% 30%, light-dark(rgba(45, 164, 78, 0.08), rgba(46, 160, 67, 0.15)), transparent 25%);
    filter: blur(60px);
}

.container {
    max-width: 1200px;
    width: 100%;
    padding: clamp(2rem, 5vw, 4rem) 1.5rem;
}

.header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
    max-width: 600px;
    margin-inline: auto;

    h1 {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
        font-weight: 700;
        letter-spacing: -0.03em;
        margin-bottom: 1rem;
        background: linear-gradient(to right, var(--color-text), var(--color-text-muted));
        -webkit-background-clip: text;
        color: transparent;
        text-wrap: balance;
    }

    p {
        font-size: 1.125rem;
        color: var(--color-text-muted);
        text-wrap: pretty;
    }
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    container-type: inline-size;
}

.crypto-card {
    background: var(--color-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease,
                background-color 0.3s ease;
    box-shadow: var(--shadow-sm);
    
    &:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-md);
        background: var(--color-surface-hover);
    }
}

.crypto-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    width: 100%;

    .crypto-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    h2 {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 0;
    }
}

.qr-container {
    background: #ffffff;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    
    img {
        width: 100%;
        height: auto;
        border-radius: var(--radius-sm);
        image-rendering: pixelated;
    }
}

.address-container {
    display: flex;
    align-items: center;
    width: 100%;
    background: light-dark(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.2));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    gap: 0.5rem;

    code {
        flex: 1;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 0.875rem;
        color: var(--color-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-inline-start: 0.5rem;
    }
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    
    &:hover {
        background: var(--color-accent);
        color: white;
    }
    
    &:active {
        transform: scale(0.95);
    }
    
    &:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 2px;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    pointer-events: none;
    
    &.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments inside container queries */
@container (max-width: 300px) {
    .crypto-card {
        padding: 1.5rem;
    }
    .crypto-header h2 {
        font-size: 1.125rem;
    }
}
