@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #7b2ff7;
    --secondary: #00d4ff;
    --bg-dark: #f4f6fa;
    --bg-card: rgba(255, 255, 255, 1);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --border-glass: rgba(0, 0, 0, 0.15);
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #495057;
    /* Darkened for better background contrast */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 4px 15px rgba(123, 47, 247, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --blur: blur(10px);
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --gold-primary: #ffd700;
    --gold-light: #ffec80;
    --gold-dark: #b8860b
}

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

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(123, 47, 247, .08) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, .06) 0%, transparent 50%), radial-gradient(ellipse at 50% 80%, rgba(247, 47, 142, .04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0
}

a {
    text-decoration: none;
    color: var(--secondary);
    transition: all .3s ease
}

a:hover {
    color: var(--primary)
}

img {
    max-width: 100%;
    height: auto
}

::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: var(--bg-dark)
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px
}

/* ============================================================
   GLASSMORPHISM COMPONENTS
   ============================================================ */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.glass-card-static {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-soft);
}

.gradient-border-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.gradient-border-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================================
   NAVIGATION / HEADER
   ============================================================ */
.navbar-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-glass .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-glass .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
}

.navbar-glass .nav-link:hover,
.navbar-glass .nav-link.active {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.05);
}

.navbar-glass .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.navbar-toggler {
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.navbar-toggler-icon {
    filter: none;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-gradient {
    background-image: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% auto;
    color: #fff !important;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-gradient:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(123, 47, 247, 0.4);
    color: #fff !important;
}


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

.btn-glass,
a.btn-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary) !important;
    padding: 0.7rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: var(--blur);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary) !important;
    transform: translateY(-2px);
}

.btn-sm-gradient {
    background-image: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% auto;
    color: #fff !important;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-sm-gradient:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 47, 247, 0.3);
    color: #fff !important;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    backdrop-filter: var(--blur);
    transition: all 0.3s ease;
    width: 100%;
}

.form-glass:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.15);
    background: var(--bg-card-hover);
}

span.form-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    backdrop-filter: var(--blur);
}

select.form-glass {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23495057' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

select.form-glass option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-glass::placeholder {
    color: var(--text-secondary);
}

.form-label-glass {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    display: block;
}

/* ============================================================
   AUTH PAGES (Login/Signup)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 3rem;
    position: relative;
}

.auth-card .auth-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.auth-card .form-group {
    margin-bottom: 1.2rem;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Step indicator for multi-step signup */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--border-glass);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 20px rgba(123, 47, 247, 0.4);
}

.step-dot.completed {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--secondary);
    color: var(--secondary);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-glass);
    border-radius: 1px;
}

.step-line.active {
    background: var(--gradient-primary);
}

/* Avatar upload area */
.avatar-upload-area {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px dashed var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
}

.avatar-upload-area:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(123, 47, 247, 0.2);
}

.avatar-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-area .upload-icon {
    font-size: 2rem;
    color: var(--text-secondary);
}

/* ============================================================
   FEED / POST CARDS
   ============================================================ */
.feed-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.post-card {
    position: relative;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-card .post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
}

.post-card .post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background-image: var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.post-card .post-username {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-card .post-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.post-card .post-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
}

.post-card .post-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image-wrap img {
    transform: scale(1.02);
}

/* Like heart overlay animation */
.like-heart-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 5rem;
    color: #ff2d55;
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(0 0 10px rgba(255, 45, 85, 0.5));
}

.like-heart-overlay.animate {
    animation: heartPop 0.8s ease-in-out forwards;
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    15% {
        transform: translate(-50%, -50%) scale(1.3);
    }

    30% {
        transform: translate(-50%, -50%) scale(1);
    }

    60% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.post-card .post-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.8rem 1.2rem;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
}

.post-card .action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-card .action-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.post-card .action-btn.liked {
    color: #ff2d55;
}

.post-card .action-btn .count {
    font-size: 0.85rem;
    font-weight: 500;
}

.post-card .post-caption {
    padding: 0 1.2rem 1rem;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.post-card .post-caption strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* ============================================================
   FLOATING WALLET CARD
   ============================================================ */
.floating-wallet {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 220px;
    padding: 1.2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #1e2025, #0a0c10);
    border: 1px solid rgba(255, 215, 0, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: walletFloat 3s ease-in-out infinite;
}

.floating-wallet:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.2);
}

.floating-wallet::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg,
            transparent 40%,
            rgba(255, 215, 0, 0.15) 45%,
            rgba(255, 215, 0, 0.25) 50%,
            rgba(255, 215, 0, 0.15) 55%,
            transparent 60%);
    animation: goldShine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes goldShine {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }

    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

@keyframes walletFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.floating-wallet .wallet-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-light);
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.floating-wallet .wallet-balance {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.floating-wallet .wallet-icon {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    font-size: 1.2rem;
    color: var(--gold-light);
    opacity: 0.5;
}

/* ============================================================
   WALLET PAGE
   ============================================================ */
.wallet-hero {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.wallet-hero .balance-amount {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: none;
}

.wallet-hero .balance-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Transaction list */
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item .tx-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-item .tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tx-icon.credit {
    background: rgba(0, 212, 255, 0.15);
    color: var(--secondary);
}

.tx-icon.debit {
    background: rgba(255, 45, 85, 0.15);
    color: #ff2d55;
}

.transaction-item .tx-type {
    font-weight: 500;
    font-size: 0.9rem;
}

.transaction-item .tx-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.transaction-item .tx-amount {
    font-weight: 700;
    font-family: var(--font-heading);
}

.tx-amount.positive {
    color: #2ecc71;
}

.tx-amount.negative {
    color: #ff2d55;
}

/* ============================================================
   SPIN WHEEL & DAILY CLAIM
   ============================================================ */
.spin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.spin-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 2rem 0;
}

.spin-wrapper canvas {
    width: 100%;
    height: 100%;
}

.spin-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--gold-primary);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
    z-index: 5;
}

.spin-btn {
    margin-top: 1.5rem;
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.claim-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
    text-align: center;
}

.claim-amount {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.claim-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.claim-btn:disabled,
.claim-btn.claimed {
    background: rgba(0, 0, 0, 0.05);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header {
    text-align: center;
    padding: 3rem 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background-image: var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    margin-bottom: 1rem;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat .stat-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .sidebar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 1rem;
}

.admin-sidebar .sidebar-nav {
    list-style: none;
    padding: 0;
    flex: 1;
}

.admin-sidebar .sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .sidebar-nav li a:hover,
.admin-sidebar .sidebar-nav li a.active {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
    border-left-color: var(--primary);
}

.admin-sidebar .sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.admin-page-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.stat-card .stat-icon.purple {
    background: rgba(123, 47, 247, 0.15);
    color: var(--primary);
}

.stat-card .stat-icon.cyan {
    background: rgba(0, 212, 255, 0.15);
    color: var(--secondary);
}

.stat-card .stat-icon.pink {
    background: rgba(247, 47, 142, 0.15);
    color: #f72f8e;
}

.stat-card .stat-icon.gold {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold-primary);
}

.stat-card .stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.3rem;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(20px, -20px);
}

/* Admin Tables & Elements */
.table-glass {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-glass thead th {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-glass);
    text-align: left;
    font-weight: 600;
}

.table-glass tbody td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.9rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.table-glass tbody tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

.badge-status {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-status.active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.badge-status.inactive {
    background: rgba(255, 45, 85, 0.15);
    color: #ff2d55;
}

.badge-status.admin {
    background: rgba(123, 47, 247, 0.15);
    color: var(--primary);
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preview:hover {
    transform: scale(1.1);
}

/* ============================================================
   ALERTS, MODALS, EXTRAS
   ============================================================ */
.alert-glass {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    backdrop-filter: var(--blur);
    border: 1px solid;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-glass.success {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.alert-glass.error {
    background: rgba(255, 45, 85, 0.1);
    border-color: rgba(255, 45, 85, 0.3);
    color: #ff2d55;
}

.alert-glass.info {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--secondary);
}

.modal-glass .modal-content {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.modal-glass .modal-header {
    border-bottom: 1px solid var(--border-glass);
    padding: 1.5rem;
}

.modal-glass .modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

.modal-glass .modal-footer {
    border-top: 1px solid var(--border-glass);
    padding: 1.5rem;
}

.modal-glass .btn-close {
    filter: invert(1);
}

.create-post-area {
    padding: 1.2rem;
    margin-bottom: 2rem;
    cursor: pointer;
}

.create-post-area .user-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.image-preview-container {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.03);
}

.image-preview-container:hover {
    border-color: var(--primary);
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-container .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
}

.spin-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.spin-result-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.spin-result-content {
    text-align: center;
    animation: popIn 0.5s ease;
}

.spin-result-content .result-amount {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.segment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
}

.segment-item .seg-color {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
}

/* ============================================================
   TEXT UTILITIES
   ============================================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    color: var(--gold-primary);
}

/* ============================================================
   SPACING UTILITIES
   ============================================================ */
.mt-section {
    margin-top: 3rem;
}

.mb-section {
    margin-bottom: 3rem;
}

.feed-section {
    padding-bottom: 5rem;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-primary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE — TABLETS (≤ 991px)
   ============================================================ */
@media (max-width: 991px) {
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
        padding-bottom: 1rem;
    }

    .navbar-glass .nav-link {
        padding: 0.6rem 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .navbar-glass .nav-link.active::after {
        display: none;
    }

    .wallet-hero .balance-amount {
        font-size: 2.4rem;
    }

    .claim-amount {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RESPONSIVE — TABLETS & PHONES (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Admin */
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-page-title {
        font-size: 1.4rem;
    }

    /* Tables: horizontal scroll */
    .table-responsive-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-glass thead th,
    .table-glass tbody td {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
    }

    /* Floating Wallet */
    .floating-wallet {
        width: 170px;
        bottom: 1rem;
        right: 1rem;
        padding: 0.7rem 0.9rem;
    }

    .floating-wallet .wallet-balance {
        font-size: 1rem;
    }

    .floating-wallet .wallet-label {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
    }

    /* Auth */
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-card .auth-logo {
        font-size: 1.6rem;
    }

    /* Spin Wheel */
    .spin-wrapper {
        width: 260px;
        height: 260px;
    }

    .spin-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    /* Profile */
    .profile-header {
        padding: 2rem 1.5rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.3rem;
    }

    .profile-stats {
        gap: 2rem;
    }

    .profile-stat .stat-num {
        font-size: 1.2rem;
    }

    /* Wallet */
    .wallet-hero {
        padding: 2rem 1rem;
    }

    .wallet-hero .balance-amount {
        font-size: 2rem;
    }

    .transaction-item {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .transaction-item .tx-info {
        gap: 0.7rem;
    }

    .transaction-item .tx-icon {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }

    /* Claim */
    .claim-amount {
        font-size: 2.8rem;
    }

    .claim-container {
        min-height: 50vh;
        padding: 1.5rem;
    }

    /* Post grid */
    .page-wrapper.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Segment items (spin config) */
    .segment-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Stat cards */
    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    /* Spin result */
    .spin-result-content .result-amount {
        font-size: 2.5rem;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE PHONES (≤ 576px)
   ============================================================ */
@media (max-width: 576px) {

    /* Navbar */
    .navbar-glass {
        padding: 0.5rem 0;
    }

    .navbar-glass .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-glass .navbar-brand img {
        max-height: 24px !important;
    }

    /* Feed */
    .feed-container {
        padding: 1rem 0.5rem;
    }

    .post-card {
        margin-bottom: 1rem;
        border-radius: var(--radius-sm);
    }

    .post-card .post-header {
        padding: 0.75rem 1rem;
        gap: 0.6rem;
    }

    .post-card .post-avatar {
        width: 36px;
        height: 36px;
    }

    .post-card .post-username {
        font-size: 0.88rem;
    }

    .post-card .post-time {
        font-size: 0.7rem;
    }

    .post-card .post-actions {
        padding: 0.6rem 0.8rem;
        gap: 0.8rem;
    }

    .post-card .action-btn {
        font-size: 1.15rem;
    }

    .post-card .action-btn .count {
        font-size: 0.8rem;
    }

    .post-caption {
        font-size: 0.88rem !important;
    }

    /* Like heart overlay */
    .like-heart-overlay {
        font-size: 3.5rem;
    }

    /* Glass cards general */
    .glass-card {
        border-radius: var(--radius-sm);
    }

    .glass-card-static {
        border-radius: var(--radius-sm);
    }

    /* Profile */
    .profile-header {
        padding: 1.5rem 1rem;
    }

    .profile-avatar {
        width: 85px;
        height: 85px;
    }

    .profile-name {
        font-size: 1.15rem;
    }

    .profile-email {
        font-size: 0.8rem;
    }

    .profile-stats {
        gap: 1.5rem;
    }

    .profile-stat .stat-num {
        font-size: 1.1rem;
    }

    .profile-stat .stat-label {
        font-size: 0.65rem;
    }

    /* Post grid on profile */
    .row.g-4 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    /* Wallet */
    .wallet-hero {
        padding: 1.5rem 1rem;
    }

    .wallet-hero .balance-amount {
        font-size: 1.8rem;
    }

    .wallet-hero .balance-label {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .transaction-item .tx-type {
        font-size: 0.82rem;
    }

    .transaction-item .tx-date {
        font-size: 0.7rem;
    }

    /* Claim */
    .claim-amount {
        font-size: 2.2rem;
    }

    .claim-btn,
    .spin-btn {
        padding: 0.7rem 2rem;
        font-size: 0.95rem;
    }

    .claim-container {
        min-height: 45vh;
        padding: 1rem;
    }

    /* Spin Wheel */
    .spin-wrapper {
        width: 240px;
        height: 240px;
    }

    .spin-container {
        padding: 1rem;
    }

    /* Auth */
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem 1.2rem;
    }

    .auth-card .auth-logo {
        font-size: 1.4rem;
    }

    .form-glass {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    /* Buttons */
    .btn-gradient {
        padding: 0.6rem 1.5rem;
        font-size: 0.88rem;
    }

    /* Floating Wallet */
    .floating-wallet {
        width: 155px;
        bottom: 0.75rem;
        right: 0.75rem;
        padding: 0.6rem 0.8rem;
        border-radius: var(--radius-sm);
    }

    .floating-wallet .wallet-balance {
        font-size: 0.95rem;
    }

    .floating-wallet .wallet-label {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    .floating-wallet .wallet-icon {
        font-size: 1rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Alerts */
    .alert-glass {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    /* Section spacing */
    .mt-section {
        margin-top: 2rem;
    }

    .mb-section {
        margin-bottom: 2rem;
    }

    /* Admin stat cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.7rem;
    }

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    /* Spin result overlay */
    .spin-result-content .result-amount {
        font-size: 2rem;
    }

    /* Comment section */
    .comments-list {
        max-height: 250px !important;
    }

    /* Step indicator */
    .step-line {
        width: 40px;
    }

    .step-dot {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Avatar upload area */
    .avatar-upload-area {
        width: 120px;
        height: 120px;
    }

    /* Referral page */
    .glass-card.p-4 {
        padding: 1.2rem !important;
    }

    /* Empty states */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 2rem;
    }

    /* h1-h5 scaling */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    h4 {
        font-size: 1.05rem;
    }

    h5 {
        font-size: 0.95rem;
    }
}

/* ============================================================
   RESPONSIVE — VERY SMALL PHONES (≤ 380px)
   ============================================================ */
@media (max-width: 380px) {
    .navbar-glass .navbar-brand {
        font-size: 1rem;
    }

    .profile-stats {
        gap: 1rem;
    }

    .profile-stat .stat-num {
        font-size: 1rem;
    }

    .spin-wrapper {
        width: 210px;
        height: 210px;
    }

    .claim-amount {
        font-size: 1.8rem;
    }

    .wallet-hero .balance-amount {
        font-size: 1.5rem;
    }

    .floating-wallet {
        width: 140px;
        padding: 0.5rem 0.7rem;
    }

    .floating-wallet .wallet-balance {
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   UTILITY — TOUCH DEVICE OPTIMIZATIONS
   ============================================================ */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .glass-card:hover {
        transform: none;
        box-shadow: var(--shadow-soft);
    }

    .btn-gradient:hover {
        transform: none;
    }

    .btn-glass:hover {
        transform: none;
    }

    .post-card:hover .post-image-wrap img {
        transform: none;
    }

    /* Larger tap targets */
    .post-card .action-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Disable floating wallet animation on touch */
    .floating-wallet {
        animation: none;
    }

    .floating-wallet:hover {
        transform: none;
    }
}