:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    width: 90%;
    margin: auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.15);
}

.auth-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 40px;
    cursor: pointer;
    color: var(--text-muted);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.auth-footer {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* User Panel Layout */
.app-header {
    background: var(--card-bg);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.balance-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    margin: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

/* Plan Card */
.plan-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.plan-card:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

.plan-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: left;
}
.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
/* ===== FORCE POPUP FIX ===== */
.site-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.75) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
}

.popup-box {
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 20px 22px !important;
    border-radius: 14px !important;
    width: 90% !important;
    max-width: 420px !important;
    position: relative !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6) !important;
}

.popup-box p {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.close-popup {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    font-size: 22px !important;
    cursor: pointer !important;
    color: #fff !important;
}
.site-popup {
    pointer-events: auto !important;
}

.popup-box {
    pointer-events: auto !important;
}

.close-popup {
    pointer-events: auto !important;
}
