/* VarlBlaskDonate Premium Dark & Gold System */
        :root {
            --bg-primary: #0A0A0A; /* Deepest black/charcoal */
            --bg-surface: #121212;
            --card-bg: rgba(18, 18, 18, 0.92);
            
            /* Dynamic Accent Color - Elegant Gold */
            --accent-glow: #D4AF37;
            --accent-bright: #F3E5AB;
            --accent-deep: #AA8222;
            --accent-bg-glow: rgba(212, 175, 55, 0.15);
            
            --border-accent: rgba(212, 175, 55, 0.35);
            
            --text-main: #F5F5F5;
            --text-muted: #A3A3A3;
            
            --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            
            --radius-card: 26px;
            --radius-pill: 9999px;
            --radius-input: 16px;
            
            --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            
            --grid-size: 32px;
            --mouse-x: 0;
            --mouse-y: 0;
        }

        body.theme-donation {
            --accent-glow: #D4AF37;
            --accent-bright: #E5C158;
            --accent-deep: #AA8222;
            --accent-bg-glow: rgba(212, 175, 55, 0.15);
            --border-accent: rgba(212, 175, 55, 0.35);
        }

        body.theme-investment {
            --accent-glow: #B0B0B0; /* Silver alternative */
            --accent-bright: #D3D3D3;
            --accent-deep: #808080;
            --accent-bg-glow: rgba(176, 176, 176, 0.15);
            --border-accent: rgba(176, 176, 176, 0.35);
        }

        @keyframes cardGlimmer {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes cardEntrance {
            from { opacity: 0; transform: translateY(40px) scale(0.98); filter: blur(10px); }
            to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
        }

        @keyframes staggeredRise {
            from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
            to { opacity: 1; transform: translateY(0); filter: blur(0); }
        }

        @keyframes buttonShimmer {
            0% { background-position: 0% 50%; box-shadow: 0 8px 28px var(--accent-bg-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
            50% { background-position: 100% 50%; box-shadow: 0 12px 35px var(--accent-bg-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
            100% { background-position: 0% 50%; box-shadow: 0 8px 28px var(--accent-bg-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
        }

        @keyframes assembleChar {
            0% { opacity: 0; transform: translateY(40px) rotate(-15deg) scale(0.5); filter: blur(12px); }
            100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); filter: blur(0); }
        }

        @keyframes uploadPulse {
            0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.2); }
            70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
            100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
        }

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

        body {
            font-family: var(--font-family);
            background-color: var(--bg-primary);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 36px 16px;
            transition: background 0.8s ease;
            overflow-x: hidden;
            position: relative;
        }

        /* Remove arrows/spinners 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;
        }

        /* Live Background Layer */
        .bg-grid-overlay {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            background-image: 
                linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
            background-size: var(--grid-size) var(--grid-size);
        }

        .bg-glow-point {
            position: fixed;
            width: 600px;
            height: 600px;
            /* Reduced overall light intensity */
            background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
            pointer-events: none;
            z-index: 0;
            transform: translate(-50%, -50%);
            transition: background 0.8s ease;
        }

        body.theme-investment .bg-glow-point {
            background: radial-gradient(circle, rgba(251, 191, 36, 0.12) 0%, transparent 60%);
        }

        #grid-canvas {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
        }

        .container {
            width: 100%;
            max-width: 660px;
            margin: 0 auto;
            position: relative;
            z-index: 10;
        }

        .hero-header {
            text-align: center;
            margin-bottom: 24px;
        }

        .hero-title {
            font-size: 42px;
            font-weight: 900;
            letter-spacing: -0.8px;
            line-height: 1.1;
            margin-bottom: 8px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .word-group { display: inline-flex; }
        .word-varol .char-span { color: #FFFFFF !important; text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.6); }
        .word-blask .char-span { color: var(--accent-glow) !important; text-shadow: 0 0 24px var(--accent-bg-glow), 0 0 50px rgba(56, 189, 248, 0.2); }
        .word-space { display: inline-block; width: 12px; }
        .char-span {
            display: inline-block;
            font-weight: 900;
            opacity: 0;
            animation: assembleChar 0.8s cubic-bezier(0.19, 1, 0.22, 1) calc(var(--i) * 0.06s) forwards;
            will-change: transform, opacity;
        }

        .hero-subtext {
            font-size: 14px;
            color: var(--text-muted);
            line-height: 1.45;
            opacity: 0;
            animation: staggeredRise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
        }

        .card {
            position: relative;
            background: linear-gradient(135deg, var(--card-bg), rgba(14, 21, 37, 0.95), var(--card-bg));
            background-size: 200% 200%;
            animation: cardEntrance 1s cubic-bezier(0.23, 1, 0.32, 1) forwards, cardGlimmer 12s ease infinite;
            backdrop-filter: blur(40px);
            -webkit-backdrop-filter: blur(40px);
            border: 1px solid var(--border-accent);
            border-radius: var(--radius-card);
            padding: 30px 30px;
            box-shadow: 
                0 40px 100px rgba(0, 0, 0, 0.9), 
                inset 0 1px 1px rgba(255, 255, 255, 0.2);
            transition: var(--transition);
            overflow: hidden;
        }

        .stagger-item {
            opacity: 0;
            animation: staggeredRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        /* Tabs */
        .tabs {
            position: relative;
            display: flex;
            background: rgba(5, 8, 17, 0.85);
            padding: 6px;
            border-radius: var(--radius-pill);
            border: 1px solid var(--border-accent);
            margin-bottom: 24px;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
            z-index: 1;
            overflow: hidden; /* Ensures glass selection stays within bounds */
            animation-delay: 0.1s;
        }

        .tab-pill {
            position: absolute;
            top: 6px;
            left: 6px;
            height: calc(100% - 12px);
            width: calc(50% - 6px);
            background: linear-gradient(135deg, var(--accent-glow) 0%, var(--accent-deep) 100%);
            border-radius: var(--radius-pill);
            /* Fast yet smooth color shift & transform */
            transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, opacity 0.3s ease;
            z-index: 1;
            box-shadow: 0 4px 15px var(--accent-bg-glow);
        }

        .tab-btn {
            position: relative;
            flex: 1;
            padding: 12px 20px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-family: inherit;
            font-size: 14px;
            font-weight: 600;
            border-radius: var(--radius-pill);
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            z-index: 2;
        }

        .tab-btn.active { color: #FFFFFF; font-weight: 800; }
        .tab-btn:hover:not(.active) { color: #fff; }

        /* Custom Dropdown */
        .custom-dropdown { position: relative; width: 100%; transition: var(--transition); animation-delay: 0.2s; }
        .dropdown-trigger {
            width: 100%;
            padding: 13px 18px;
            background: rgba(5, 8, 17, 0.85);
            border: 1px solid var(--border-accent);
            border-radius: var(--radius-input);
            color: var(--text-main);
            font-size: 14px;
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .dropdown-trigger:hover { border-color: var(--accent-glow); background: var(--accent-bg-glow); }

        .dropdown-menu {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            width: 100%;
            background: rgba(10, 15, 29, 0.98);
            backdrop-filter: blur(28px);
            -webkit-backdrop-filter: blur(28px);
            border: 1px solid var(--border-accent);
            border-radius: 18px;
            padding: 8px;
            z-index: 100;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px var(--accent-bg-glow);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateY(-12px) scale(0.95);
            transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.4s;
            transform-origin: top center;
        }

        .custom-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }

        /* Form Inputs */
        .form-group { margin-bottom: 18px; animation-delay: 0.3s; position: relative; }
        .form-label {
            display: block;
            font-size: 12.5px;
            font-weight: 700;
            color: var(--text-muted);
            margin-bottom: 8px;
            transition: color 0.4s ease;
        }

        .form-control {
            width: 100%;
            padding: 13px 18px;
            background: rgba(5, 8, 17, 0.85);
            border: 1px solid var(--border-accent);
            border-radius: var(--radius-input);
            color: var(--text-main);
            font-family: inherit;
            font-size: 14px;
            outline: none;
            transition: var(--transition);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .form-control:focus {
            border-color: var(--accent-glow);
            box-shadow: 0 0 30px var(--accent-bg-glow), inset 0 2px 4px rgba(0, 0, 0, 0.5);
            background: rgba(10, 15, 29, 0.95);
        }

        .input-badge {
            position: absolute;
            right: 12px;
            bottom: 12px;
            padding: 3px 10px;
            background: var(--accent-bg-glow);
            border: 1px solid var(--border-accent);
            border-radius: var(--radius-pill);
            font-size: 10px;
            font-weight: 800;
            color: var(--accent-bright);
            pointer-events: none;
        }

        /* Refined File Upload */
        .file-upload-box {
            border: 1.5px dashed var(--border-accent);
            border-radius: var(--radius-input);
            padding: 20px;
            text-align: center;
            background: rgba(5, 8, 17, 0.4);
            cursor: pointer;
            transition: var(--transition);
            display: flex; 
            flex-direction: column;
            align-items: center; 
            justify-content: center; 
            gap: 8px;
            position: relative;
            overflow: hidden;
            animation: uploadPulse 3s infinite;
        }
        
        .file-upload-box:hover { 
            border-style: solid;
            border-color: var(--accent-glow); 
            background: var(--accent-bg-glow); 
            transform: translateY(-2px);
            box-shadow: 0 10px 30px var(--accent-bg-glow);
        }

        .file-upload-box .icon-wrapper {
            background: var(--accent-bg-glow);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 4px;
            border: 1px solid var(--border-accent);
            color: var(--accent-bright);
            transition: var(--transition);
        }

        .file-upload-box:hover .icon-wrapper {
            background: var(--accent-glow);
            color: #000;
            transform: scale(1.1);
        }

        .file-upload-text {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
        }

        .file-upload-text span {
            color: var(--accent-bright);
            font-weight: 800;
        }

        #receiptInput { opacity: 0; position: absolute; z-index: -1; width: 1px; height: 1px; }
        
        /* Requisites Section - Strict Sans-Serif */
        .req-block {
            background: rgba(5, 8, 17, 0.8);
            border: 1px solid var(--border-accent);
            border-radius: var(--radius-card);
            padding: 22px 24px;
            margin-top: 24px;
            animation: staggeredRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
            opacity: 0;
        }
        .req-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-glow); margin-bottom: 14px; font-weight: 800; }
        .req-item { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(56, 189, 248, 0.15); }
        .req-item:last-child { border-bottom: none; }
        
        /* Updated Typography for Requisites */
        .req-label { 
            font-family: var(--font-family); 
            font-size: 13px; 
            font-weight: 500;
            color: var(--text-muted); 
            font-style: normal; /* No italics */
        }
        .req-value { 
            font-family: var(--font-family); 
            font-weight: 600; 
            color: #FFFFFF; 
            font-size: 14px; 
            font-style: normal; /* No italics */
        }
        .req-value.mono { 
            font-family: var(--font-mono); 
            color: var(--accent-bright); 
            font-size: 13px; 
            letter-spacing: 0.5px; 
            font-weight: 500; /* Less aggressive bold */
        }
        
        .pay-here-indicator { position: absolute; left: -12px; width: 8px; height: 8px; background: var(--accent-glow); border-radius: 50%; opacity: 0; transition: opacity 0.3s ease; }
        .active-pay .pay-here-indicator { opacity: 1; }
        .active-pay .pay-here-indicator::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50%; background: var(--accent-glow); animation: indicatorPulse 1.5s infinite; }
        @keyframes indicatorPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
        
        .copy-btn { background: rgba(56, 189, 248, 0.1); border: 1px solid var(--border-accent); color: var(--text-main); padding: 6px 14px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; cursor: pointer; transition: var(--transition); }
        .copy-btn:hover { background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent-glow) 100%); box-shadow: 0 6px 20px var(--accent-bg-glow); transform: translateY(-1px); }
        
        /* Submit Button */
        .btn-submit {
            position: relative;
            width: 100%;
            padding: 16px 24px;
            background: linear-gradient(90deg, var(--accent-deep), var(--accent-glow), var(--accent-deep));
            background-size: 200% auto;
            color: #FFFFFF !important;
            border: 1.5px solid var(--accent-glow);
            border-radius: var(--radius-pill);
            font-family: inherit;
            font-size: 15px;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
            animation: staggeredRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards, buttonShimmer 4s infinite ease-in-out;
            opacity: 0;
            margin-top: 8px;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }

        .btn-submit:hover:not(:disabled) { transform: translateY(-3px) scale(1.02); filter: brightness(1.1); }

        .tx-result-box {
            background: var(--accent-bg-glow);
            border: 1px solid var(--accent-glow);
            border-radius: var(--radius-card);
            padding: 22px 24px;
            text-align: center;
            margin-top: 20px;
            box-shadow: 0 0 45px var(--accent-bg-glow);
            animation: txEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        @keyframes txEntrance {
            from { opacity: 0; transform: scale(0.9) translateY(-20px); filter: blur(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
        }

        .tx-code-val { font-size: 28px; font-weight: 800; font-family: var(--font-mono); color: var(--accent-glow); letter-spacing: 2px; text-shadow: 0 0 15px var(--accent-bg-glow); }
        .qr-container { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(56, 189, 248, 0.2); display: flex; flex-direction: column; align-items: center; }
        .qrcode-box { padding: 12px; background: #FFFFFF; border-radius: 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }
        
        .footer { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 28px; opacity: 0; animation: staggeredRise 0.6s ease-out 0.9s forwards; }
        .form-row { display: flex; gap: 14px; }
        .flex-1 { flex: 1; }
        @media (max-width: 600px) {
            .card {
                padding: 24px 20px;
                border-radius: 20px;
            }
            .hero-title {
                font-size: 32px;
            }
            .form-row {
                flex-direction: column;
                gap: 16px;
            }
            .form-control, .tab-btn, .dropdown-trigger {
                min-height: 48px;
            }
            .file-upload-box {
                min-height: 80px;
            }
            .tx-code-val {
                font-size: 22px;
            }
            .req-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
        }
        textarea.form-control.no-resize { min-height: 85px; resize: none; }
.req-value[onclick]:hover { color: var(--accent-glow) !important; opacity: 0.8; }

/* Error Message Styles */
.error-msg {
    display: none;
    color: #ef4444; /* red-500 */
    font-size: 11px;
    font-weight: 500;
    position: absolute;
    bottom: -18px;
    left: 2px;
}

/* Modern Validation: Show error ONLY after interaction */
input:user-invalid {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
}

input:user-invalid + .error-msg,
input:user-invalid + .input-badge + .error-msg {
    display: block;
}

input:user-valid {
    border-color: #10b981 !important; /* green-500 */
}

/* Fix for File Upload invalid state since it is visually represented by .file-upload-box */
input[type="file"]:user-invalid ~ .file-upload-box {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
}

input[type="file"]:user-invalid ~ .error-msg {
    display: block;
}
