/* FASTLY MONEY "BLUE NEXUS" THEME - ENHANCED ANIMATIONS */
:root {
    /* Palette: Dark Slate + Electric Blue */
    --bg-body: #0b1120;       /* Very dark blue/black */
    --bg-sidebar: #0f172a;    /* Slate 900 */
    --bg-card: #1e293b;       /* Slate 800 */
    --bg-card-hover: #334155; /* Slate 700 */
    --bg-input: #020617;
    
    --primary: #3b82f6;       /* Electric Blue */
    --primary-glow: rgba(59, 130, 246, 0.4);
    --primary-dark: #2563eb;
    
    --secondary: #6366f1;     /* Indigo */
    --success: #10b981;       /* Emerald */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border: #1e293b;
    --border-light: #334155;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --sidebar-width: 260px;
    --header-height: 76px;
}

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

html, body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; color: #fff; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
button { font-family: inherit; cursor: pointer; border: none; }
ul { list-style: none; }

/* UTILS */
.app-shell { 
    display: flex; 
    min-height: 100vh; 
    width: 100%;
    overflow-x: hidden;
}
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }

/* SYSTEM ALERTS & NOTIFICATIONS (Overriding Bootstrap) */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

/* Error/Danger Alert */
.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}
.alert-danger::before {
    content: '\f071'; 
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 1.1rem;
}

/* Success Alert */
.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}
.alert-success::before {
    content: '\f00c'; 
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 1.1rem;
}

/* Info Alert */
.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}
.alert-info::before {
    content: '\f05a'; 
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 1.1rem;
}

/* Warning Alert */
.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

/* BOOTSTRAP OVERRIDES (Dark Mode) */
.list-group-item {
    background-color: transparent;
    border-color: var(--border-light);
    color: var(--text-main);
}

.nav-pills .nav-link {
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: 0.2s;
}
.nav-pills .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.nav-pills .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ANIMATIONS */
@keyframes float-3d {
    0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
    25% { transform: translateY(-15px) rotateX(5deg) rotateY(5deg); }
    50% { transform: translateY(0) rotateX(0) rotateY(0); }
    75% { transform: translateY(15px) rotateX(-5deg) rotateY(-5deg); }
}

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

@keyframes card-entrance {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    display: flex; flex-direction: column;
    padding: 1.5rem;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) var(--bg-sidebar);
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: var(--bg-sidebar); }
.sidebar::-webkit-scrollbar-thumb { background-color: var(--border-light); border-radius: 10px; border: 2px solid var(--bg-sidebar); }

.sidebar.open { transform: translateX(0) !important; }

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

.logo {
    display: flex; align-items: center; gap: 0.8rem;
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.5rem;
    color: #fff; margin-bottom: 2.5rem;
    width: 100%;
}
.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.logo-icon {
    width: 36px; height: 36px; 
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px; display: grid; place-items: center;
    box-shadow: 0 0 15px var(--primary-glow);
    animation: pulse-glow 3s infinite;
}

.nav-category {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); font-weight: 600; margin-bottom: 0.8rem; margin-top: 1.5rem;
}
.nav-category:first-of-type { margin-top: 0; }

.nav-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.9rem 1rem; border-radius: var(--radius-sm);
    color: var(--text-muted); font-weight: 500; margin-bottom: 0.4rem;
    transition: all 0.2s; border: 1px solid transparent;
}
.nav-item:hover {
    background: rgba(59, 130, 246, 0.08); color: #fff;
    border-color: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    color: var(--primary); border-left: 3px solid var(--primary);
}
.nav-item i { width: 20px; text-align: center; font-size: 1.1rem; }

.sidebar-widget {
    margin-top: auto;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-body));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem; text-align: center;
    position: relative; overflow: hidden;
}
.sidebar-widget::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* MAIN CONTENT */
.main {
    flex: 1; 
    margin-left: var(--sidebar-width);
    display: flex; 
    flex-direction: column;
    width: calc(100% - var(--sidebar-width)); 
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* TOP BAR */
.topbar {
    height: var(--header-height);
    background: rgba(11, 17, 32, 0.8); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
}

.search-wrap { position: relative; width: 380px; }
.search-input {
    width: 100%; padding: 0.7rem 1rem 0.7rem 2.8rem;
    background: var(--bg-input); border: 1px solid var(--border-light);
    border-radius: 50px; color: #fff; font-size: 0.9rem;
    transition: 0.3s;
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.search-icon { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.top-actions { display: flex; gap: 1rem; align-items: center; }

/* BUTTONS */
.btn {
    padding: 0.6rem 1.4rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem; transition: 0.2s;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary {
    background: var(--primary); color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
    position: relative; overflow: hidden;
}
.btn-primary:hover { 
    background: var(--primary-dark); 
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
.btn-primary:hover::after { left: 100%; }

.btn-glass {
    background: rgba(255,255,255,0.05); color: var(--text-main);
    border: 1px solid var(--border-light);
}
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* PAGE CONTENT */
.content-body { padding: 2rem; max-width: 1600px; margin: 0 auto; width: 100%; }

/* --- HORIZONTAL SCROLL NAVIGATION --- */
.scroll-section { position: relative; margin-bottom: 4rem; }
.scroll-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.scroll-arrows { 
    display: flex; 
    gap: 0.8rem; 
    align-items: center;
}

.scroll-btn {
    width: 44px; 
    height: 44px; 
    border-radius: 12px; 
    background: rgba(30, 41, 59, 0.6); 
    border: 1px solid var(--border-light);
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.scroll-btn:hover { 
    background: var(--primary); 
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-glow);
}

.scroll-btn:active {
    transform: translateY(0) scale(0.95);
}

.horizontal-track {
    display: flex; gap: 1.2rem; overflow-x: auto; 
    padding: 1.5rem 0.5rem 1.5rem; 
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.horizontal-track::-webkit-scrollbar { display: none; }

/* --- FEATURED OFFERS (Elegant Squares) --- */
.game-card-sq {
    min-width: 160px; width: 160px; height: 240px; 
    background: rgba(30, 41, 59, 0.4); 
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1rem;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; flex-shrink: 0;
    overflow: hidden;
}

.game-card-sq::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.game-card-sq::after {
    content: ''; position: absolute; top: 14px; left: 14px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse-glow 2s infinite;
}

.game-badge-tr {
    position: absolute; top: 10px; right: 10px;
    font-size: 0.65rem; font-weight: 700; color: var(--text-muted);
    background: rgba(0,0,0,0.4); padding: 2px 8px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 5;
}

.game-card-sq:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.3);
    background: rgba(30, 41, 59, 0.85);
}

.game-icon-circ {
    width: 72px; height: 72px; border-radius: 50%; 
    overflow: hidden; margin-top: 1.5rem; margin-bottom: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: #0f172a;
    position: relative; z-index: 1;
    transition: 0.3s ease;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}

.game-card-sq:hover .game-icon-circ {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}

.game-icon-circ img { width: 100%; height: 100%; object-fit: cover; display: block; }

.game-title-sq {
    font-size: 0.95rem; font-weight: 700; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
    margin-bottom: 0.2rem; color: #f1f5f9;
    position: relative; z-index: 1;
}

.game-desc-trunc {
    font-size: 0.75rem; color: var(--text-muted); text-align: center;
    line-height: 1.3; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; height: 2.6em;
    position: relative; z-index: 1;
    opacity: 0.8;
}

.game-payout-sq {
    font-size: 0.9rem; font-weight: 800; color: #fff;
    background: var(--primary);
    padding: 6px 16px; border-radius: 20px;
    box-shadow: 0 4px 12px var(--primary-glow);
    position: relative; z-index: 1;
    transition: 0.3s;
    margin-bottom: 0.5rem;
}

.game-card-sq:hover .game-payout-sq {
    transform: scale(1.05);
    background: #fff; color: var(--primary);
}

/* --- OFFERWALLS (Cyber-Leaf Shape) --- */
.offerwall-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.wall-card-tall {
    min-width: 160px; height: 220px;
    background: var(--bg-card); 
    border-radius: 6px 36px 6px 36px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative; overflow: hidden;
    padding: 1.2rem; text-align: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.wall-card-tall:hover {
    transform: translateY(-5px) scale(1.02);
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.3);
}

.wall-card-tall::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.wall-img {
    width: 70%; height: 70px; object-fit: contain;
    margin-bottom: 0.8rem; position: relative; z-index: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.wall-info { position: relative; z-index: 1; width: 100%; }
.wall-title { 
    font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.wall-bonus { 
    font-size: 0.7rem; font-weight: 800; color: #0b1120;
    background: var(--primary); padding: 2px 10px; 
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    display: inline-block;
}

/* GLOBAL CHAT SYSTEM */
.chat-float-btn {
    position: fixed; bottom: 30px; right: 30px;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
    z-index: 1000; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.1);
}
.chat-float-btn:hover { transform: scale(1.1); background: #fff; color: var(--primary); }

.chat-panel {
    position: fixed; top: 0; right: -350px; bottom: 0;
    width: 320px; background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border-left: 1px solid var(--border-light);
    z-index: 1001; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}
.chat-panel.active { right: 0; }

.chat-header {
    padding: 1.5rem; border-bottom: 1px solid var(--border-light);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(30, 41, 59, 0.4);
}
.chat-title { font-weight: 700; font-size: 1.1rem; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.chat-online-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success); }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 1rem;
    position: relative; 
}
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }

.chat-msg { display: flex; gap: 0.8rem; align-items: flex-start; animation: fadeIn 0.3s ease; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--border-light); }

.msg-content {
    background: var(--bg-card); padding: 0.6rem 0.9rem;
    border-radius: 0 12px 12px 12px;
    font-size: 0.9rem; color: #e2e8f0;
    border: 1px solid var(--border-light);
    max-width: 85%;
}
.msg-header { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; margin-bottom: 0.2rem; color: var(--text-muted); }
.msg-user { font-weight: 700; color: var(--primary); }
.msg-text { word-break: break-word; line-height: 1.4; }

/* My Message */
.chat-msg.me { flex-direction: row-reverse; }
.chat-msg.me .msg-content {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    border-radius: 12px 0 12px 12px;
}
.chat-msg.me .msg-user { color: #fff; }

/* Admin Message */
.chat-msg.admin .msg-content { border-color: var(--secondary); background: rgba(99, 102, 241, 0.1); }
.chat-msg.admin .msg-user { color: var(--secondary); }

.chat-input-area {
    padding: 1rem; border-top: 1px solid var(--border-light);
    background: var(--bg-sidebar);
}
.chat-form { display: flex; gap: 0.5rem; }
.chat-input {
    flex: 1; background: var(--bg-input); border: 1px solid var(--border-light);
    border-radius: 20px; padding: 0.6rem 1rem; color: #fff; font-size: 0.9rem;
}
.chat-input:focus { outline: none; border-color: var(--primary); }
.chat-send {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; transition: 0.2s;
}
.chat-send:hover { background: var(--primary-dark); transform: scale(1.1); }

/* MOBILE BOTTOM BAR */
.mobile-nav { display: none; }

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; width: 100%; padding-bottom: 70px; } 
    .mobile-toggle { display: block; }
    .sidebar.open { transform: translateX(0); }
    
    .mobile-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        height: 65px; background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px); border-top: 1px solid var(--border-light);
        z-index: 1000; justify-content: space-around; align-items: center;
        padding: 0 1rem; box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    }
    .mobile-nav-item {
        display: flex; flex-direction: column; align-items: center;
        color: var(--text-muted); font-size: 0.7rem; font-weight: 600;
        text-decoration: none; gap: 4px; transition: 0.2s;
    }
    .mobile-nav-item i { font-size: 1.2rem; }
    .mobile-nav-item.active { color: var(--primary); }
    .mobile-nav-item.active i { filter: drop-shadow(0 0 8px var(--primary-glow)); }

    .chat-float-btn { bottom: 85px; right: 20px; width: 50px; height: 50px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .chat-panel { width: 100%; right: -100%; }
}

/* --- PREMIUM MODALS (Redesigned) --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); z-index: 999;
    display: grid; place-items: center; backdrop-filter: blur(12px);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-box {
    background: linear-gradient(145deg, rgba(20, 25, 40, 0.95), rgba(10, 12, 25, 0.98));
    width: 100%; max-width: 420px;
    padding: 0; 
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(59, 130, 246, 0.1) inset;
    position: relative;
    transform: scale(0.95) translateY(10px); 
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); }

.modal-hero {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    padding: 1.5rem 2rem 3rem; /* Increased bottom padding */
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative; /* Stacking context */
    z-index: 10; /* Ensure text is above image container background */
}

.modal-hero i {
    font-size: 2rem; 
    background: linear-gradient(135deg, #fff, var(--primary)); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    margin-bottom: 0.5rem; display: inline-block;
}

.modal-hero h2 {
    font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}

.modal-hero p {
    color: var(--text-muted); font-size: 0.95rem; font-weight: 400;
}

.modal-body { padding: 1.5rem 2rem; }

.input-wrap { margin-bottom: 1rem; position: relative; padding: 0; }
.input-wrap label { 
    display: block; font-size: 0.75rem; font-weight: 600; 
    color: var(--text-muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em;
}

.input-std {
    width: 100%; padding: 0.8rem 1rem 0.8rem 2.8rem; 
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff; font-size: 0.95rem; font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}
.input-std:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

.input-icon {
    position: absolute; left: 1rem; top: 2.25rem; 
    color: var(--text-muted); font-size: 0.9rem;
    pointer-events: none; transition: 0.2s;
}
.input-std:focus + .input-icon, .input-std:focus ~ .input-icon { color: var(--primary); }

.modal-btn-area { padding: 0 2rem 2rem; }

.btn-auth {
    width: 100%; padding: 1.1rem; font-size: 1.1rem; border-radius: 16px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff; font-weight: 700; border: none; cursor: pointer;
    box-shadow: 0 10px 25px -5px var(--primary-glow);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    position: relative; overflow: hidden;
}
.btn-auth:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 35px -5px var(--primary-glow);
    filter: brightness(1.1);
}
.btn-auth:active { transform: translateY(-1px); }

.auth-link {
    display: block; text-align: center; margin-top: 1.5rem;
    color: var(--text-muted); font-size: 0.9rem;
}
.auth-link a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

.modal-close { 
    position: absolute; top: 1.2rem; right: 1.2rem; 
    font-size: 1.5rem; color: rgba(255,255,255,0.3); 
    cursor: pointer; transition: 0.2s; z-index: 99;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* --- OFFER MODAL SPECIFICS --- */
.modal-offer-icon {
    width: 90px; height: 90px; margin: -40px auto 1rem; /* Slightly less negative margin */
    border-radius: 20px; overflow: hidden;
    border: 4px solid var(--bg-card);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    background: #0f172a;
    position: relative; z-index: 11; /* Keep above hero background but check text */
    display: flex; align-items: center; justify-content: center;
}
.modal-offer-icon img { width: 100%; height: 100%; object-fit: cover; }

.step-timeline {
    display: flex; flex-direction: column; gap: 1.5rem; /* Increased gap */
    position: relative; padding-left: 0.5rem;
    margin-top: 1rem;
}
.step-timeline::before {
    content: ''; position: absolute; left: 1.15rem; top: 0.5rem; bottom: 0.5rem;
    width: 2px; 
    background: linear-gradient(to bottom, var(--primary), rgba(59, 130, 246, 0.1)); /* Gradient line */
    border-radius: 2px;
    z-index: 1; /* Line behind marker */
}
.step-item {
    display: flex; align-items: flex-start; /* Align to top for multi-line text */
    gap: 1.2rem; position: relative;
    padding-left: 2.5rem; min-height: 24px;
    z-index: 2; /* Item above line */
}
.step-marker {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--bg-card); /* Matches card bg to hide line behind */
    border: 2px solid var(--primary);
    position: absolute; left: 1.15rem; top: 4px; transform: translateX(-50%); 
    z-index: 10; /* Marker clearly on top */
    box-shadow: 0 0 0 4px var(--bg-card); /* Fake "padding" to cut the line visually */
    transition: 0.3s;
}
.step-item:hover .step-marker {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}
.step-text { 
    flex: 1; font-size: 0.95rem; color: #cbd5e1; line-height: 1.5; 
    font-weight: 500;
}
.step-payout {
    font-weight: 800; color: var(--success); font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.15); padding: 4px 10px; border-radius: 8px;
    white-space: nowrap; border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.1);
}

/* PINNED MESSAGE BAR */
.pinned-msg-bar {
    background: rgba(234, 179, 8, 0.1);
    border-bottom: 1px solid rgba(234, 179, 8, 0.3);
    padding: 0.8rem 1rem;
    display: flex; align-items: flex-start; gap: 0.8rem;
    position: sticky; top: 0; z-index: 5;
    backdrop-filter: blur(10px);
}
.pinned-icon { color: var(--secondary); font-size: 1rem; margin-top: 2px; }
.pinned-content { flex: 1; font-size: 0.85rem; color: #fff; }
.pinned-user { font-weight: 700; color: var(--secondary); font-size: 0.75rem; margin-bottom: 2px; display: block; }

/* CHAT MESSAGE MENU (Three Dots) */
.msg-controls { position: relative; display: inline-block; }

.msg-menu-btn {
    cursor: pointer; padding: 0 4px; color: var(--text-muted);
    transition: 0.2s;
}
.msg-menu-btn:hover { color: #fff; }

.msg-menu-dropdown {
    position: absolute; right: 0; top: 100%;
    background: var(--bg-sidebar); border: 1px solid var(--border-light);
    border-radius: 8px; overflow: hidden;
    min-width: 100px; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: none; z-index: 100;
}
.msg-menu-dropdown.show { display: block; }

.msg-menu-item {
    padding: 8px 12px; font-size: 0.8rem; color: var(--text-main);
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: 0.2s;
}
.msg-menu-item:hover { background: var(--bg-card-hover); color: var(--primary); }
.msg-menu-item i { width: 16px; text-align: center; }