/* Dark Mode Variables */
body.dark-mode {
    --bg: #0f172a;
    --white: #1e293b;
    --text: #f8fafc;
    --text-light: #94a3b8;
    --border: #334155;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --primary-light: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode nav {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: var(--border);
}

body.dark-mode nav a {
    color: #f8fafc !important;
}

body.dark-mode .user-dropdown,
body.dark-mode .tab-btn,
body.dark-mode .h-stat-card,
body.dark-mode .offer-card,
body.dark-mode .ad-card,
body.dark-mode .sl-card,
body.dark-mode .skeleton-card,
body.dark-mode .stat-card,
body.dark-mode .action-item,
body.dark-mode .card,
body.dark-mode .activity-item,
body.dark-mode .reward-box,
body.dark-mode .meta-info,
body.dark-mode .empty {
    background: var(--white) !important;
    color: var(--text);
    border-color: var(--border) !important;
}

body.dark-mode .reward-box {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

body.dark-mode .meta-info {
    background: rgba(30, 41, 59, 0.5);
}

body.dark-mode .tab-btn {
    background: #1e293b;
    color: #94a3b8;
}

body.dark-mode .tab-btn:hover {
    background: #334155;
}

body.dark-mode .tab-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

body.dark-mode .amount-plus {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

body.dark-mode .amount-minus {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Landing Page Specifics */
body.dark-mode .hero {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .features {
    background: #0f172a;
}

body.dark-mode .hero h1,
body.dark-mode .section-header h2,
body.dark-mode .feature-card h3,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #f8fafc;
}

body.dark-mode .google-btn-hero {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode footer {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .feature-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .feature-card:hover {
    background: #334155;
}

body.dark-mode .feature-card p,
body.dark-mode .hero p,
body.dark-mode .section-header p {
    color: #94a3b8;
}

/* Global Dark Mode Overrides */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-mode input::placeholder {
    color: #64748b !important;
}

body.dark-mode .ref-input-group,
body.dark-mode .form-group input {
    background: #1e293b !important;
}

body.dark-mode .history-table th {
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .history-table td {
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode .alert-error {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

body.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

body.dark-mode .google-btn,
body.dark-mode .divider span {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-mode .divider::before {
    background: #334155 !important;
}

/* Specific Fixes for PTC/Shortlinks */
body.dark-mode .ad-card,
body.dark-mode .sl-card,
body.dark-mode .skeleton-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .ad-card h3,
body.dark-mode .sl-title,
body.dark-mode .ad-card .value,
body.dark-mode .h-info .value {
    color: #f8fafc !important;
}

body.dark-mode .ad-badge,
body.dark-mode .sl-badge,
body.dark-mode .sl-card .sl-badge,
body.dark-mode .ad-card span[style*="background: #eff6ff"],
body.dark-mode .ad-card .ad-icon-wrap,
body.dark-mode .sl-card .ad-icon-wrap,
body.dark-mode .sl-card .sl-icon-wrap {
    background: #334155 !important;
    color: #94a3b8 !important;
    border-color: #475569 !important;
}

body.dark-mode .reward-box {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #4ade80 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

body.dark-mode .reward-box strong {
    color: #4ade80 !important;
}

/* Page Hero Fix */
body.dark-mode .page-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e1b4b 100%) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .h-stat-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}

/* Skeleton Dark Mode */
body.dark-mode .skeleton {
    background: linear-gradient(110deg, #1e293b 8%, #475569 18%, #1e293b 33%) !important;
    background-size: 200% 100% !important;
}

body.dark-mode #ads-container,
body.dark-mode #sl-container {
    background: transparent !important;
}

body.dark-mode .skeleton-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .meta-info span,
body.dark-mode .meta-item span {
    color: #cbd5e1 !important;
    /* Lighter slate for better label readability */
}

body.dark-mode .meta-value {
    color: #ffffff !important;
    /* Pure white for values */
    font-weight: 700;
}

/* Login/Register/Logo Fix */
body.dark-mode .logo-link,
body.dark-mode .logo,
body.dark-mode .logo span {
    color: #3b82f6 !important;
}

body.dark-mode .logo-area p,
body.dark-mode .footer-text,
body.dark-mode .back-home {
    color: #94a3b8 !important;
}

body.dark-mode .form-group label {
    color: #f8fafc !important;
    /* Clear white for labels */
}

body.dark-mode .back-home:hover {
    color: #3b82f6 !important;
}

body.dark-mode .login-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .btn-ghost {
    background: #1e293b !important;
    color: #3b82f6 !important;
    border: 2px solid #3b82f6 !important;
    font-weight: 800;
}

body.dark-mode .btn-ghost:hover {
    background: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4) !important;
}

/* Toggle Button Style */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
    color: var(--text);
    margin-right: 10px;
}

.theme-toggle:hover {
    background: var(--border);
    transform: rotate(15deg);
}

/* Responsive Fixes - Ensures site name isn't too large on mobile */
@media (max-width: 768px) {

    .logo,
    .logo-link,
    .footer-logo {
        font-size: 1rem !important;
    }

    .logo span {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.8rem !important;
    }
}