body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(229, 9, 20, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(80, 0, 0, 0.5) 0%, transparent 40%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px;
}

/* --- Sophisticated Noise Texture --- */
.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Glassmorphism V2 --- */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);

    display: flex;
    flex-direction: column;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0.5;
    pointer-events: none;
}

.glass-card:hover {
    border-color: rgba(229, 9, 20, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(229, 9, 20, 0.2);
}

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

.glass-input:focus {
    outline: none;
    border-color: #E50914;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #E50914 0%, #B00710 100%);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #333;
    cursor: not-allowed;
    box-shadow: none;
    color: #666;
}

/* --- Facepile --- */
.avatar-group {
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.avatar-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(20, 20, 20, 0.8);
    margin-left: -10px;
    position: relative;
    transition: transform 0.2s ease, z-index 0.2s;
    cursor: help;
}

.avatar-item:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
    border-color: rgba(255, 255, 255, 0.5);
}

.avatar-item::after {
    content: attr(data-name);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 20;
}

.avatar-item:hover::after {
    opacity: 1;
}

/* --- Payment QR Animation --- */
.qr-container {
    position: relative;
    overflow: hidden;
    background: white;
    padding: 10px;
    border-radius: 12px;
}

.qr-scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #E50914;
    box-shadow: 0 0 4px #E50914;
    top: 0;
    left: 0;
    animation: scanQr 2s linear infinite;
    opacity: 0.6;
}

@keyframes scanQr {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.breathing-bar {
    animation: breathe-glow 3s ease-in-out infinite;
}

@keyframes breathe-glow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.7; filter: brightness(1.3); box-shadow: 0 0 15px currentColor; }
}

/* Mobile Dock */
.mobile-dock {
    display: none;
}

@media (max-width: 768px) {
    .mobile-dock {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(20, 20, 20, 0.85);
        backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 16px;
        border-radius: 999px;
        z-index: 100;
        gap: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        width: 90%;
        max-width: 350px;
        justify-content: space-between;
    }

    .dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 12px;
        border-radius: 16px;
        color: #888;
        font-size: 10px;
        transition: all 0.3s;
        flex: 1;
    }

    .dock-item i {
        font-size: 20px;
        margin-bottom: 4px;
        transition: transform 0.2s;
    }

    .dock-item.active {
        color: white;
        background: rgba(255,255,255,0.1);
    }

    .dock-item:active i { transform: scale(0.8); }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #E50914; }

.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }

.slide-up-enter { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
