:root {
    --ferro-bg: #040906;
    --ferro-surface: #08140d;
    --ferro-surface-2: #0e2015;
    --ferro-surface-3: #142a1d;
    --ferro-border: rgba(255, 215, 0, 0.28);
    --ferro-border-light: rgba(255, 229, 127, 0.55);
    --ferro-gold: #ffd700;
    --ferro-gold-hover: #ffe57f;
    --ferro-gold-glow: rgba(255, 215, 0, 0.40);
    --ferro-blue: #00e676;
    --ferro-blue-hover: #69f0ae;
    --ferro-blue-glow: rgba(0, 230, 118, 0.35);
    --ferro-red: #ff3366;
    --ferro-red-hover: #ff4d79;
    --ferro-red-glow: rgba(255, 51, 102, 0.4);
    --ferro-green: #00e676;
    --ferro-green-glow: rgba(0, 230, 118, 0.45);
    --ferro-cyan: #00e5ff;
    --ferro-text: #f8fafc;
    --ferro-text-muted: #cbd5e1;
    --ferro-text-dim: #94a3b8;
}

body {
    background-color: var(--ferro-bg);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(0, 230, 118, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 25%, rgba(255, 215, 0, 0.14) 0%, transparent 48%),
        radial-gradient(circle at 50% 85%, rgba(0, 230, 118, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #040906 0%, #07150e 50%, #030805 100%);
    color: var(--ferro-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

body.user-ui-body {
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 215, 0, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 10% 60%, rgba(0, 230, 118, 0.10) 0%, transparent 50%),
        linear-gradient(180deg, #040906 0%, #08160f 100%) !important;
}

body.auth-ui-body {
    background:
        linear-gradient(180deg, rgba(3, 8, 5, 0.82) 0%, rgba(4, 9, 6, 0.68) 50%, rgba(3, 8, 5, 0.92) 100%),
        url('/images/branding/wealth-gold-clover.jpg') center center / cover no-repeat fixed !important;
    min-height: 100vh;
}

body.auth-ui-body .ferro-card {
    background: rgba(6, 17, 10, 0.90) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ferro-border-light);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 215, 0, 0.25);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--ferro-bg);
}
::-webkit-scrollbar-thumb {
    background: #143520;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--ferro-gold);
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cashnova-gold-text {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFD700 40%, #D4AF37 75%, #FFE082 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cashnova-green-text {
    background: linear-gradient(135deg, #B9F6CA 0%, #00E676 50%, #00B0FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    color: var(--ferro-gold) !important;
}
.text-green {
    color: var(--ferro-green) !important;
}
.text-red {
    color: var(--ferro-red) !important;
}
.text-cyan {
    color: var(--ferro-cyan) !important;
}
.text-muted {
    color: var(--ferro-text-muted) !important;
}
.text-secondary {
    color: #94a3b8 !important;
}

.bg-gradient-gold {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFD700 45%, #C89600 100%);
}
.bg-gradient-green {
    background: linear-gradient(135deg, #00E676 0%, #008744 100%);
}
.bg-gradient-casino {
    background: linear-gradient(135deg, #0d2818 0%, #041009 100%);
}
.bg-gradient-red {
    background: linear-gradient(135deg, #ff3366 0%, #ff6b3d 100%);
}

.glow-gold {
    box-shadow: 0 0 28px var(--ferro-gold-glow);
}
.glow-green {
    box-shadow: 0 0 28px var(--ferro-green-glow);
}

/* Casino Obsidian, Emerald & Gold Cards */
.ferro-card {
    background: linear-gradient(165deg, rgba(14, 32, 21, 0.94) 0%, rgba(7, 18, 11, 0.98) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--ferro-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.25s ease-in-out;
    position: relative;
    overflow: hidden;
}

.ferro-card:hover {
    border-color: var(--ferro-border-light);
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.16);
}

.ferro-card-gold-border {
    border-top: 3px solid var(--ferro-gold);
}
.ferro-card-green-border {
    border-top: 3px solid var(--ferro-green);
}
.ferro-card-red-border {
    border-top: 3px solid var(--ferro-red);
}

.ferro-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--ferro-border);
}

/* Metallic Casino Gold Buttons */
.btn-ferro-gold {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFD700 45%, #B8871D 100%);
    color: #040906 !important;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px var(--ferro-gold-glow);
}
.btn-ferro-gold:hover {
    background: linear-gradient(135deg, #ffffff 0%, #ffe57f 50%, #ffd700 100%);
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 26px rgba(255, 215, 0, 0.7);
}

.btn-ferro-green {
    background: linear-gradient(135deg, #00E676 0%, #009640 100%);
    color: #040906 !important;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 18px var(--ferro-green-glow);
}
.btn-ferro-green:hover {
    background: linear-gradient(135deg, #69f0ae 0%, #00e676 100%);
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 230, 118, 0.7);
}

.btn-ferro-blue {
    background: linear-gradient(135deg, #FFD700 0%, #B8871D 100%);
    color: #040906 !important;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--ferro-gold-glow);
}

.btn-ferro-red {
    background: linear-gradient(135deg, #ff3366 0%, #d91b4c 100%);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--ferro-red-glow);
}

.btn-ferro-outline {
    background: rgba(14, 32, 21, 0.75);
    border: 1px solid var(--ferro-border-light);
    color: #f8fafc;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
}
.btn-ferro-outline:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--ferro-gold);
    color: #ffe57f;
}

/* Forms */
.form-control, .form-select {
    background-color: var(--ferro-surface-2);
    border: 1px solid var(--ferro-border);
    color: #ffffff !important;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    background-color: var(--ferro-surface-3);
    border-color: var(--ferro-gold);
    color: #ffffff !important;
    box-shadow: 0 0 0 3px var(--ferro-gold-glow);
}
.form-control::placeholder {
    color: var(--ferro-text-dim) !important;
}
.input-group-text {
    background-color: var(--ferro-surface-3);
    border: 1px solid var(--ferro-border);
    color: var(--ferro-gold);
}

/* Casino Tables */
.table-ferro {
    width: 100%;
    color: var(--ferro-text);
    border-collapse: separate;
    border-spacing: 0;
}
.table-ferro th {
    background: var(--ferro-surface-2);
    color: #ffd700 !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem;
    border-bottom: 1px solid var(--ferro-border);
    font-weight: 800;
}
.table-ferro td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.12);
    background: rgba(9, 22, 14, 0.90);
    vertical-align: middle;
    color: #f1f5f9;
}
.table-ferro tbody tr:hover td {
    background: rgba(20, 42, 29, 0.95);
}

/* Casino Badges */
.badge-ferro-gold {
    background: rgba(255, 215, 0, 0.20);
    color: #ffd700 !important;
    border: 1px solid rgba(255, 215, 0, 0.6);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}
.badge-ferro-green {
    background: rgba(0, 230, 118, 0.20);
    color: #00e676 !important;
    border: 1px solid rgba(0, 230, 118, 0.6);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}
.badge-ferro-red {
    background: rgba(255, 51, 102, 0.18);
    color: #fb7185 !important;
    border: 1px solid rgba(255, 51, 102, 0.45);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Navigation & Sidebar */
.ferro-navbar {
    background: rgba(4, 9, 6, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ferro-border);
}
.ferro-nav-link {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0.6rem 1rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.ferro-nav-link:hover, .ferro-nav-link.active {
    color: var(--ferro-gold) !important;
    border-bottom-color: var(--ferro-gold);
}

.sidebar {
    background: rgba(6, 16, 10, 0.96);
    border-right: 1px solid var(--ferro-border);
    min-height: calc(100vh - 65px);
    padding: 1.5rem 0.75rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 0.25rem;
}
.sidebar-link:hover {
    background: rgba(0, 230, 118, 0.12);
    color: #ffffff;
    border-left: 3px solid var(--ferro-green);
    transform: translateX(3px);
}
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 230, 118, 0.08) 100%);
    color: var(--ferro-gold);
    border-left: 3px solid var(--ferro-gold);
}

/* Casino Special Visual FX */
.casino-neon-border {
    border: 1px solid #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), inset 0 0 15px rgba(0, 230, 118, 0.15);
}

.casino-pulse {
    animation: casinoPulse 2.2s infinite ease-in-out;
}
@keyframes casinoPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(0, 230, 118, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.casino-chip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px dashed var(--ferro-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #0e2b19 0%, #030d07 100%);
    color: var(--ferro-gold);
    font-weight: 900;
    font-size: 0.75rem;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.hero-casino-section {
    border-bottom: 2px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

/* Parallax Matrix Section with Wealth Clover Background */
.matrix-parallax-section {
    position: relative;
    background:
        radial-gradient(circle at 50% 15%, rgba(0, 230, 118, 0.22) 0%, transparent 55%),
        linear-gradient(180deg, rgba(4, 9, 6, 0.90) 0%, rgba(4, 9, 6, 0.78) 50%, rgba(3, 8, 5, 0.94) 100%),
        url('/images/branding/wealth-gold-clover.jpg') center center / cover no-repeat fixed;
    border-top: 1px solid var(--ferro-border);
    border-bottom: 1px solid var(--ferro-border);
}

.matrix-parallax-card {
    position: relative;
    background:
        radial-gradient(circle at 50% 10%, rgba(0, 230, 118, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, rgba(8, 20, 13, 0.92) 0%, rgba(5, 14, 9, 0.88) 100%),
        url('/images/branding/wealth-gold-clover.jpg') center center / cover no-repeat fixed !important;
    border: 1px solid var(--ferro-border-light);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 215, 0, 0.25);
}

.matrix-glass-table-wrapper {
    background: rgba(4, 11, 7, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 230, 118, 0.15);
}

@media (max-width: 991px) {
    .matrix-parallax-section,
    .matrix-parallax-card {
        background-attachment: scroll !important;
    }
}
