:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(18, 20, 32, 0.95);
    --primary-fire: #ff4500;
    --accent-gold: #ffd700;
    --accent-cyan: #00f2fe;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-glow: rgba(0, 242, 254, 0.25);
    --font-body: 'Quicksand', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(255, 69, 0, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 80% 40%, rgba(0, 242, 254, 0.1) 0%, transparent 60%),
        linear-gradient(to bottom, #07070c, #0d0f1a);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: var(--accent-cyan); border-radius: 4px; }

.hidden { display: none !important; }

/* Dynamic Responsive Auto-Scaling Native Banner Slots */
.native-banner-slot {
    background: rgba(14, 16, 28, 0.85);
    border: 1px dashed rgba(0, 242, 254, 0.3);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 12px;
    text-align: center;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    transition: height 0.3s ease;
}

.ad-scale-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.ad-scale-wrapper iframe, .ad-scale-wrapper img, .ad-scale-wrapper div {
    max-width: 100%;
}

/* 3-Second Premium Transparent Cardview Page Loading Overlay */
#page-loader-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 12, 20, 0.45); backdrop-filter: blur(6px);
    z-index: 99999; display: flex; justify-content: center; align-items: center; text-align: center;
    transition: opacity 0.5s ease;
}
.loader-box {
    background: rgba(18, 20, 32, 0.82);
    border: 1.5px solid rgba(0, 242, 254, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 242, 254, 0.25);
    backdrop-filter: blur(16px);
    max-width: 320px; width: 85%; padding: 25px;
}
.diamond-pulse-box {
    position: relative; width: 70px; height: 70px; margin: 0 auto 12px auto;
    display: flex; justify-content: center; align-items: center;
}
.loader-diamond-img { width: 48px; height: 48px; object-fit: contain; z-index: 2; animation: floatGem 2s infinite ease-in-out; }
@keyframes floatGem { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* pulse-ring removed */

.loader-title { font-size: 2rem; font-weight: 800; line-height: 1; color: #fff; letter-spacing: 1px; }
.loader-title span { color: var(--primary-fire); }
.loader-sub { font-size: 0.75rem; color: var(--accent-gold); margin-top: 6px; font-weight: 700; letter-spacing: 1px; }

.loader-bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.08); border-radius: 10px; margin-top: 18px; overflow: hidden; }
.loader-bar-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--primary-fire), var(--accent-gold), var(--accent-cyan)); border-radius: 10px; transition: width 0.1s linear; }

/* Main Navigation Bar Tabs */
.main-nav-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border-glow);
    padding: 6px; border-radius: 16px; margin-bottom: 15px;
}
.tab-btn {
    background: transparent; color: var(--text-muted); border: none;
    padding: 10px 6px; border-radius: 12px; font-weight: 800; font-size: 0.82rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: all 0.2s ease; white-space: nowrap;
}
.tab-btn i { font-size: 0.9rem; }
.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
    color: #000; box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.app-tab-pane { display: none; }
.app-tab-pane.active { display: block; animation: fadeInPane 0.3s ease; }
@keyframes fadeInPane { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Security Wrap */
.security-inputs-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
    color: #000;
    border: none;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.25);
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-primary:active { transform: scale(0.96); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(1); }

.btn-share {
    background: linear-gradient(135deg, #10121e 0%, #ff4500 100%);
    color: #fff;
    border: 1.5px solid #ff4500;
    padding: 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.35);
    transition: transform 0.2s ease;
}
.btn-share:active { transform: scale(0.97); }

/* Integration & Task Cards Layout */
.integration-card, .ad-card, .link-card {
    background: rgba(10, 12, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.integration-info, .ad-card-info, .link-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 180px;
}
.integration-icon, .ad-icon, .link-icon-box {
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem;
}
.integration-icon { background: rgba(255, 255, 255, 0.05); }
.link-icon-box { background: rgba(0, 242, 254, 0.12); color: var(--accent-cyan); }
.completed .link-icon-box { background: rgba(0, 230, 118, 0.15); color: #00e676; }

.integration-info h4, .link-details h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}
.integration-info p { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.link-details p { font-size: 0.75rem; color: var(--accent-gold); font-weight: 700; margin-top: 2px; }

/* Dashboard Layout */
#app-container { max-width: 600px; margin: 0 auto; padding: 12px; padding-bottom: 30px; }

/* Header */
.app-header {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-card); border: 1px solid var(--border-glow);
    padding: 12px 16px; border-radius: 16px; margin-bottom: 12px;
}
.header-left { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.brand-box { display: flex; align-items: center; gap: 8px; }
.brand-icon { color: var(--primary-fire); font-size: 1.2rem; }
.app-name { font-size: 1.35rem; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.device-tag { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.header-right { display: flex; align-items: center; }
.wallet-badge {
    background: rgba(0, 0, 0, 0.7); border: 1.5px solid var(--accent-gold);
    padding: 6px 12px; border-radius: 20px;
    display: flex; align-items: center; gap: 6px;
    font-size: 1.15rem; font-weight: 800; color: var(--accent-gold);
}
.wallet-gem-img { width: 22px; height: 22px; object-fit: contain; }
.add-coin-btn {
    background: var(--primary-fire); border: none; color: white;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 0.65rem; cursor: pointer;
}

/* Banner */
.banner-card {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.15) 0%, rgba(18, 20, 32, 0.95) 100%);
    border: 1px solid rgba(255, 69, 0, 0.3); border-radius: 14px;
    padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;
}
.banner-left { display: flex; flex-direction: column; gap: 1px; }
.banner-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; }
.countdown-timer { font-size: 1.3rem; font-weight: 800; color: var(--accent-gold); line-height: 1; }
.banner-badge { background: var(--primary-fire); font-size: 0.75rem; font-weight: 800; padding: 5px 10px; border-radius: 8px; color: #fff; }

/* Dashboard Sections */
.dashboard-section { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 15px; margin-bottom: 15px; }
.section-title { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 8px; margin-bottom: 6px; }
.section-title h2 { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.section-title h2 i { color: var(--accent-cyan); }
.section-title-img { width: 22px; height: 22px; object-fit: contain; }
.sub-badge { background: rgba(0, 242, 254, 0.15); padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 700; color: var(--accent-cyan); }
.section-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }

/* Links List */
.links-list { display: flex; flex-direction: column; gap: 10px; }

/* Referral Box */
.referral-box { display: flex; flex-direction: column; gap: 8px; }
.referral-input-wrap { display: flex; gap: 8px; }
.referral-input-wrap input { flex: 1; background: rgba(0,0,0,0.6); border: 1.5px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 10px 12px; color: var(--accent-cyan); font-weight: 700; font-size: 0.85rem; outline: none; }

/* Vault */
.ff-uid-input-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.ff-uid-input-group label { font-size: 0.75rem; font-weight: 700; color: var(--accent-gold); }
.ff-uid-input-group input { background: rgba(0,0,0,0.6); border: 1.5px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 10px 12px; color: #fff; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; outline: none; }
.ff-uid-input-group input:focus { border-color: var(--accent-cyan); }
.packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.package-card { background: rgba(10, 12, 20, 0.85); border: 1.5px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 16px 10px; text-align: center; position: relative; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease; }
.package-card:hover { border-color: var(--accent-cyan); transform: translateY(-2px); }
.diamond-img-box { margin-bottom: 6px; display: flex; justify-content: center; align-items: center; }
.pkg-gem-img { width: 42px; height: 42px; object-fit: contain; }
.pkg-cost { font-size: 1.1rem; font-weight: 800; color: var(--accent-gold); margin-bottom: 10px; }
.btn-redeem { width: 100%; background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); padding: 8px; border-radius: 8px; font-size: 0.85rem; font-weight: 700; cursor: pointer; }

/* History List */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item { background: rgba(10, 12, 20, 0.75); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 12px; display: flex; justify-content: space-between; align-items: center; }
.history-info { display: flex; flex-direction: column; gap: 2px; }
.history-title { font-size: 0.95rem; font-weight: 800; color: var(--accent-gold); display: flex; align-items: center; gap: 6px; }
.history-sub { font-size: 0.75rem; color: var(--text-muted); }
.history-status { font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 10px; text-transform: uppercase; }
.history-status.pending { background: rgba(255, 215, 0, 0.15); color: var(--accent-gold); border: 1px solid rgba(255, 215, 0, 0.3); }
.history-status.completed { background: rgba(0, 230, 118, 0.15); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.3); }

/* Modal Overlay */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(4, 4, 8, 0.85); backdrop-filter: blur(8px); z-index: 9999; display: flex; justify-content: center; align-items: center; padding: 15px; }
.modal-card { background: rgba(18, 20, 32, 0.98); border: 1.5px solid var(--accent-cyan); border-radius: 20px; padding: 25px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(0, 242, 254, 0.3); }
.modal-icon { font-size: 3.5rem; color: #00e676; margin-bottom: 10px; }
.modal-card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; color: #fff; }
.modal-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; }
.modal-details-box { background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.modal-label { font-size: 0.8rem; color: var(--text-muted); }
.modal-val { font-size: 0.9rem; font-weight: 800; color: var(--accent-gold); float: right; }

/* Footer */
.app-footer { text-align: center; padding: 12px 0; color: var(--text-muted); font-size: 0.75rem; }

/* Toast System - Full Surrounding Glowing Border Box */
#toast-container { 
    position: fixed; 
    bottom: 16px; 
    right: 12px; 
    left: 12px; 
    z-index: 10000; 
    display: flex; 
    flex-direction: column-reverse; 
    gap: 8px; 
    margin: 0 auto; 
    max-width: 380px; 
    pointer-events: none;
}
.toast { 
    background: rgba(14, 16, 26, 0.98); 
    backdrop-filter: blur(12px); 
    border: 1.5px solid var(--accent-cyan); 
    border-radius: 12px; 
    padding: 12px 16px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    pointer-events: auto;
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.25);
    animation: slideUpToast 0.3s ease;
}
@keyframes slideUpToast {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.toast.success { 
    border-color: #00e676; 
    box-shadow: 0 8px 30px rgba(0, 230, 118, 0.3);
}
.toast.error { 
    border-color: #ff1744; 
    box-shadow: 0 8px 30px rgba(255, 23, 68, 0.35);
}
.toast.info { 
    border-color: var(--accent-gold); 
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
}
.toast-title { font-weight: 800; font-size: 0.95rem; }
.toast-msg { font-size: 0.8rem; color: var(--text-muted); }

/* Loader */
#global-loader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(4, 4, 8, 0.9); z-index: 9998; display: flex; justify-content: center; align-items: center; }
.loader-content { text-align: center; }
.crosshair-spin { font-size: 3rem; color: var(--accent-cyan); animation: spinGem 1.4s infinite ease-in-out; }
@keyframes spinGem { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#loader-message { font-size: 1.1rem; font-weight: 700; margin-top: 12px; color: var(--accent-gold); }

/* Mobile Proportional Optimization */
@media (max-width: 480px) {
    .integration-card, .ad-card, .link-card {
        justify-content: space-between;
    }
    .integration-card .btn-primary, .ad-card .btn-primary, .link-card .btn-primary {
        width: 100%;
        margin-top: 6px;
    }
}




/* Live Redemption Proof Ticker Styling */
.proof-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    animation: slideInDown 0.4s ease-out forwards;
    transition: all 0.3s ease;
}
.proof-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 230, 118, 0.2);
}
.proof-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.proof-user-id {
    color: #fff;
    font-weight: 600;
}
.proof-uid {
    color: var(--text-muted);
    font-size: 0.72rem;
}
.proof-details {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.proof-amount {
    color: var(--accent-gold);
    font-weight: 700;
}
.proof-badge {
    font-size: 0.65rem;
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}
.proof-time {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-top: 2px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}
