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

/* --- MOBILE FIRST STYLE DESIGN SYSTEM --- */
:root {
    --bg-light: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    
    --primary: #07a35a;        /* EasyPaisa Green */
    --primary-light: #e6f6ef;
    --secondary: #eab308;      /* JazzCash Gold */
    --secondary-light: #fef9c3;
    
    --text-dark: #111827;      /* High contrast dark text */
    --text-muted: #4b5563;     /* Muted reading text */
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #ca8a04;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-fast: all 0.2s ease-out;
}

/* --- RESET & BASIC STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #e5e7eb; /* Background of desktop */
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Enforce Mobile Container on Desktop Screens */
.app-container {
    width: 100%;
    max-width: 480px; /* Mobile App Viewport width */
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
}

/* --- APP BAR / HEADER --- */
.app-header {
    background-color: var(--primary);
    color: #ffffff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
}

.app-header .logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.app-header .user-info {
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 50px;
}

/* --- BOTTOM MENU --- */
.bottom-nav {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary);
    text-decoration: none;
}

.bottom-nav-icon {
    font-size: 1.4rem;
}

/* --- CARDS & PANELS --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.main-content {
    flex: 1;
    padding: 16px;
    padding-bottom: 40px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    gap: 8px;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(7, 163, 90, 0.2);
}
.btn-primary:hover {
    background-color: #068e4e;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--secondary-light);
    color: #854d0e;
    border: 1px solid #fef08a;
}
.btn-secondary:hover {
    background-color: #fef08a;
    text-decoration: none;
}

.btn-danger {
    background-color: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
}
.btn-danger:hover {
    background-color: #fecaca;
    text-decoration: none;
}

.btn-success {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid #a7f3d0;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 1.1rem;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 14px;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(7, 163, 90, 0.1);
}

/* --- DASHBOARD ELEMENTS --- */
.wallet-card {
    background: linear-gradient(135deg, var(--primary) 0%, #068e4e 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(7, 163, 90, 0.3);
}

.wallet-card .lbl {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.wallet-card .bal {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 8px 0;
    line-height: 1;
}

.wallet-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.quick-menu-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
    transition: var(--transition-fast);
}

.quick-menu-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    text-decoration: none;
}

.quick-menu-icon {
    font-size: 2rem;
}

/* --- BADGES --- */
.badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    border: 1px solid transparent;
}

.badge-gray { background-color: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.badge-blue { background-color: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-green { background-color: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-gold { background-color: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-purple { background-color: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
.badge-red { background-color: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Status banners */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* --- AD CARDS --- */
.ad-item-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ad-item-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.ad-item-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ad-item-reward {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- PLAY VIEW --- */
.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.timer-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 8px solid var(--primary-light);
    border-top-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    animation: spin 1s linear infinite;
}

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

.timer-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- PACKAGE LISTINGS --- */
.package-card {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.package-card.active {
    border-color: var(--primary);
}

.package-card.active::before {
    content: 'Active';
    position: absolute;
    top: 12px;
    right: -25px;
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 25px;
    transform: rotate(45deg);
}

.package-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.package-card .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.package-card ul {
    list-style: none;
    margin-bottom: 16px;
}

.package-card li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- ADMIN LAYOUT --- */
.admin-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.admin-card {
    border: 1px solid var(--border-color);
    padding: 16px;
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 12px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.table th, .table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-align: left;
}
.table th {
    font-weight: 700;
    color: var(--text-muted);
}
