/* HitzCashPro Custom Styles - AdFlow Design */

:root {
    --pv-green: #2ecc71;
    --pv-dark: #0f172a; /* Updated from old #0b1a13 */
    --primary-dark: #27ae60;
    --accent: #f39c12;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f9fafb;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.06);
    --pv-green-light: #e8f8f0;
    --primary-light: #e3f2fd;
    --success-light: #e8f5e9;
    --warning-light: #fff8e1;
    --info-light: #e1f5fe;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Text Colors */
.text-pv-green {
    color: var(--pv-green) !important;
}

.text-pv-dark {
    color: var(--pv-dark) !important;
}

/* Background Colors */
.bg-pv-green {
    background-color: var(--pv-green) !important;
}

.bg-pv-dark {
    background-color: var(--pv-dark) !important;
}

.bg-pv-green-light {
    background-color: var(--pv-green-light) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.bg-success-light {
    background-color: var(--success-light) !important;
}

.bg-warning-light {
    background-color: var(--warning-light) !important;
}

.bg-info-light {
    background-color: var(--info-light) !important;
}

.bg-gradient-pv-green {
    background: linear-gradient(135deg, var(--pv-green) 0%, #16a05c 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Buttons */
.btn-pv-green,
.btn-primary-custom {
    background: var(--pv-green);
    border: none;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-pv-green:hover,
.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.btn-outline-pv-green {
    border-color: var(--pv-green);
    color: var(--pv-green);
}

.btn-outline-pv-green:hover {
    background-color: var(--pv-green);
    border-color: var(--pv-green);
    color: white;
}

/* Cards */
.card {
    border-radius: 1rem;
    transition: all 0.3s;
    border: none;
    box-shadow: var(--shadow-soft);
}

.card:hover.hover-lift {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

.stat-card {
    border-radius: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Avatar */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.avatar-circle-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Dashboard Layout - AdFlow Style */
.app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-right: 1px solid #eef2f7;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px;
    overflow-y: auto;
}

/* Mobile sidebar - MUST override desktop styles */
@media (max-width: 992px) {
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 1050 !important;
        width: 260px !important;
        transition: left 0.3s ease-in-out !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
        background: white !important;
    }
    
    .sidebar.show {
        left: 0 !important;
    }
    
    /* Sidebar backdrop overlay */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        pointer-events: none;
    }
    
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px 10px;
    margin-bottom: 6px;
}

.brand .logo {
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    font-size: 1.1rem;
}

.sidebar-menu {
    padding: 0;
}

.sidebar-section-title,
.sidebar-group-title {
    padding: 0.5rem 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link {
    border-radius: 10px;
    color: #111827;
    padding: 0.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.nav-link:hover {
    background: #ecfdf5;
    color: #065f46;
}

.nav-link.active {
    background: #ecfdf5;
    color: #065f46;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
}


/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #eefcf6 100%);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0.5rem 0;
}

.content {
    padding: 24px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.card-soft {
    background: #fff;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
}

.balance-card .amount {
    font-size: 1.75rem;
    font-weight: 700;
}

.token-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.875rem;
}

/* Utility Classes */
.bg-success-subtle {
    background-color: #d1f4e0 !important;
}

.bg-warning-subtle {
    background-color: #fff3cd !important;
}

.bg-info-subtle {
    background-color: #cff4fc !important;
}

.text-bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.btn-white {
    background-color: #fff;
    border-color: #dee2e6;
}

.btn-white:hover {
    background-color: #f8f9fa;
}

.copy-btn {
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    padding: 100px 0 80px;
    background: linear-gradient(180deg, #ffffff 0%, #e6f9ed 100%);
    text-align: center;
}

.hero-section h1 span {
    color: var(--pv-green);
}

.hero-image .floating-card {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Stats Box */
.stats-box {
    background: #fff;
    box-shadow: var(--shadow-soft);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
}

.stats-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.stats-box h4 {
    color: var(--pv-green);
    font-weight: 700;
    margin-bottom: 5px;
}

/* Feature Cards */
.feature-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.feature-card .icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--pv-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.feature-card h5 {
    font-weight: 600;
    margin-bottom: 12px;
}

/* How It Works Section */
.how-section {
    background: #fff;
    border-radius: 25px;
    box-shadow: var(--shadow-soft);
    padding: 50px 40px;
}

.how-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.how-step i {
    background: var(--pv-green);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.how-step h6 {
    font-weight: 600;
    margin-bottom: 8px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 2rem;
}

/* Action Cards */
.action-card {
    display: block;
    padding: 1.5rem;
    text-align: center;
    background: white;
    border-radius: 0.75rem;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--pv-green);
    color: inherit;
}

.action-card i {
    font-size: 2.5rem;
}

/* Ad Cards */
.ad-card {
    transition: all 0.3s;
}

.ad-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.reward-badge {
    background-color: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* Timer Circle */
.timer-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pv-green) 0%, #16a05c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(28, 184, 105, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.timer-circle.complete {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Ad Frame */
.ad-frame-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    overflow: hidden;
}

.ad-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.75rem;
}

/* Tables */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* Border Utilities */
.border-pv-green {
    border-color: var(--pv-green) !important;
}

.border-3 {
    border-width: 3px !important;
}

/* Footer */
.footer {
    background: #111827;
    color: #d1d5db;
    margin-top: 60px;
    width: 100%;
    overflow-x: hidden;
}

.footer a {
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.footer a:hover {
    color: var(--pv-green) !important;
}

.footer .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.footer h5,
.footer h6 {
    font-size: clamp(0.9375rem, 2.5vw, 1.125rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.footer li {
    margin-bottom: 0.75rem;
}

.footer li:last-child {
    margin-bottom: 0;
}

.footer small {
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    line-height: 1.6;
}

.footer p {
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    line-height: 1.6;
    margin-bottom: 0;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

/* Mobile-first responsive footer */
@media (max-width: 768px) {
    .footer {
        margin-top: 2rem;
        padding: 1.5rem 0 !important;
    }
    
    .footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .footer .row {
        margin: 0;
    }
    
    .footer .col-12 {
        margin-bottom: 1.5rem;
        padding: 0;
    }
    
    .footer .col-12:last-child {
        margin-bottom: 0;
    }
    
    .footer h5,
    .footer h6 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer ul {
        padding-left: 0;
    }
    
    .footer li {
        margin-bottom: 0.625rem;
    }
    
    .footer small {
        font-size: 0.875rem;
    }
    
    .footer hr {
        margin: 1rem 0;
    }
}

@media (max-width: 420px) {
    .footer {
        padding: 1.25rem 0 !important;
    }
    
    .footer .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .footer h5,
    .footer h6 {
        font-size: 0.9375rem;
    }
    
    .footer small,
    .footer p {
        font-size: 0.8125rem;
    }
}

.footer a {
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--pv-green) !important;
}

/* Navbar */
.navbar {
    background: #fff !important;
    box-shadow: var(--shadow-soft);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-dark);
    transition: color 0.3s;
    font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--pv-green);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--pv-green);
}

/* Responsive - Mobile Styles */
@media (max-width: 992px) {
    .app {
        grid-template-columns: 1fr;
    }
    
    /* Sidebar mobile - override all desktop styles */
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 1050 !important;
        width: 260px !important;
        transition: left 0.3s ease-in-out !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
        background: white !important;
        padding: 18px 14px !important;
        overflow-y: auto !important;
    }
    
    .sidebar.show {
        left: 0 !important;
        z-index: 1050 !important;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden !important;
    }
    
    /* Sidebar backdrop overlay */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        pointer-events: none;
    }
    
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .content {
        padding: 16px;
    }
    
    /* Make sure topbar menu button is visible and clickable */
    #menuBtn {
        display: inline-block !important;
        z-index: 1051 !important;
        position: relative !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    #menuBtn:active,
    #menuBtn:focus {
        transform: scale(0.95) !important;
        outline: none !important;
    }
    
    #menuBtn:hover {
        opacity: 0.8 !important;
    }
    
    /* Ensure topbar is above everything */
    .topbar {
        z-index: 1052 !important;
        position: relative !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .timer-circle {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Progress Bars */
.progress {
    border-radius: 0.5rem;
    background-color: #e9ecef;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.75em;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--pv-green);
    box-shadow: 0 0 0 0.2rem rgba(28, 184, 105, 0.25);
}

/* Alerts */
.alert {
    border-radius: 0.75rem;
    border: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--pv-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #16a05c;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.rounded-lg {
    border-radius: 1rem !important;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(28, 184, 105, 0.3);
    border-top-color: var(--pv-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--pv-green);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1051;
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .footer,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .breadcrumb-modern {
        display: none !important;
    }
}

