/**
 * Rx Ariful Telecom Server V10 - Main User Stylesheet
 * DEVELOPER: Dev Ariful Source ✅🇧🇩💜
 * Version: 1.0.0
 * Description: A modern, mobile-first, and responsive stylesheet for the user panel.
 */

/* ----------------------------------------------------------------
   1. CSS Variables (Custom Properties) for Easy Theming
   ---------------------------------------------------------------- */
:root {
    --primary-color: #0052D4;
    --primary-gradient: linear-gradient(135deg, #0052D4, #4364F7, #6FB1FC);
    --secondary-color: #f0f2f5;
    --text-color-dark: #333;
    --text-color-light: #6c757d;
    --white-color: #ffffff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --border-color: #dee2e6;
    --font-family: 'Segoe UI', 'Roboto', sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 10px;
    --transition-speed: 0.3s;
}

/* ----------------------------------------------------------------
   2. General Body & Reset Styles
   ---------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--secondary-color);
    color: var(--text-color-dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* Main Container for Mobile View */
.mobile-container {
    width: 100%;
    max-width: 450px; /* Simulates a mobile screen */
    min-height: 100vh;
    background-color: var(--white-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 70px; /* Space for bottom navbar */
}

/* ----------------------------------------------------------------
   3. Splash Screen & Login/Register Form Styles
   ---------------------------------------------------------------- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

#splash-screen .logo {
    width: 120px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

#splash-screen .loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1.5s linear infinite;
}

.form-container {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.form-container .logo-small {
    width: 80px;
    margin-bottom: 20px;
    align-self: center;
}

.form-container h2 {
    margin-bottom: 10px;
    font-size: 1.8em;
}

.form-container p {
    color: var(--text-color-light);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 1em;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 212, 0.2);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: var(--primary-gradient);
    color: var(--white-color);
    font-size: 1.1em;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 82, 212, 0.3);
}

.bottom-text {
    margin-top: 20px;
    color: var(--text-color-light);
}

.bottom-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
/* --- Login & Country Selector Styles --- */
.country-phone-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #fff;
    padding: 5px;
    transition: all 0.3s ease;
}

.country-phone-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 212, 0.1);
}

.country-select {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    border-right: 1px solid #eee;
}

.country-select img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 5px;
}

.country-select select {
    border: none;
    background: transparent;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
    outline: none;
    cursor: pointer;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
}

.phone-input-area {
    flex-grow: 1;
    padding: 0 10px;
}

.phone-input-area input {
    border: none !important;
    padding: 8px 0 !important;
    font-size: 1.1em !important;
    letter-spacing: 1px;
    font-weight: 500;
}

.phone-input-area input:focus {
    box-shadow: none !important;
}

/* Loading Spinner for Button */
.btn.loading {
    position: relative;
    color: transparent;
}
.btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


/* --- HIDE SCROLLBAR (App Feel) --- */
/* For Chrome, Safari and Opera */
body::-webkit-scrollbar, 
.mobile-container::-webkit-scrollbar {
    display: none;
}

/* For IE, Edge and Firefox */
body, .mobile-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    overflow-y: scroll; /* Allow scrolling but hide bar */
}

/* --- Registration Page Specific Styles --- */
.page-header {
    padding: 20px 0;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 10px;
}

.country-picker-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

.country-picker-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.flag-display {
    width: 32px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dial-code-display {
    font-weight: 600;
    color: #333;
    margin-left: 10px;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid #eee;
    min-width: 45px;
}

.phone-field {
    border: none;
    outline: none;
    font-size: 1.1em;
    font-weight: 500;
    width: 100%;
    color: #333;
    background: transparent;
}

/* Hidden Select for logic, overlaid on flag */
.country-select-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px; /* Only covers flag and code */
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.helper-text {
    font-size: 0.8em;
    color: #888;
    margin-top: 15px;
}

/* Custom Checkbox for Terms */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.85em;
    color: #666;
}

.terms-check input {
    margin-top: 3px;
    accent-color: var(--primary-color);
}

/* ----------------------------------------------------------------
   /* --- SNAP WALLET PREMIUM GREEN THEME --- */

:root {
    --brand-color: #00897b; /* The Green from screenshot */
    --brand-dark: #00695c;
    --bg-light: #f5f5f5;
    --text-dark: #333;
    --text-grey: #666;
}

body {
    background-color: var(--bg-light);
}

.app-layout {
    background: #fdfdfd;
}

/* 1. GREEN HEADER SECTION */
.green-header {
    background-color: var(--brand-color);
    padding: 15px 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    color: white;
    position: relative;
    z-index: 10;
}

.profile-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-circle i {
    font-size: 35px;
    color: #ccc;
    margin-top: 5px; 
}

.notification-bell {
    font-size: 24px;
    color: white;
    position: relative;
}
.notif-dot {
    width: 10px;
    height: 10px;
    background: red;
    border-radius: 50%;
    position: absolute;
    top: 0;
    right: 0;
    border: 1px solid white;
}

/* Balance Pill (White on Green) */
.balance-pill-white {
    background: #fff;
    color: var(--brand-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 160px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.balance-pill-white i { font-size: 16px; }

/* Balance Animation Details */
.balance-info-hidden {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #333;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.balance-pill-white.show-balance .balance-info-hidden {
    transform: translateY(0);
}

/* 2. SCROLLING NOTICE */
.notice-wrapper {
    background: #fff3e0;
    color: #e65100;
    padding: 8px 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.notice-icon { font-weight: bold; }

/* 3. SLIDER & SECTIONS */
.section-head {
    padding: 0 20px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #333;
    font-size: 15px;
}

.slider-box {
    margin: 0 20px 20px 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 140px;
}

/* Verification Banner */
.verify-banner {
    margin: 0 20px 20px 20px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.verify-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}
.verify-btn {
    background: var(--brand-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

/* 4. GRID MENU (Pastel Colors) */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 10px;
    padding: 0 20px;
    margin-bottom: 30px;
}
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
}
.menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
    transition: transform 0.2s;
}
.menu-item:active .menu-icon { transform: scale(0.9); }
.menu-text { font-size: 11px; font-weight: 500; text-align: center; }

/* Pastel Backgrounds */
.bg-peach { background: #ffe0b2; color: #e65100; }
.bg-sky { background: #e1f5fe; color: #0277bd; }
.bg-purple-light { background: #f3e5f5; color: #7b1fa2; }
.bg-green-light { background: #e8f5e9; color: #2e7d32; }
.bg-mint { background: #e0f2f1; color: #00695c; }
.bg-blue-light { background: #e3f2fd; color: #1565c0; }
.bg-pink-light { background: #fce4ec; color: #c2185b; }
.bg-red-light { background: #ffebee; color: #c62828; }

/* 5. OFFER CARDS (Horizontal Scroll) */
.offers-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 20px 20px 20px;
    gap: 15px;
    scrollbar-width: none; /* Hide scrollbar */
}
.offers-scroll::-webkit-scrollbar { display: none; }

.offer-card {
    min-width: 260px;
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
    border: 1px solid #f0f0f0;
}
.offer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.op-logo { width: 30px; height: 30px; border-radius: 50%; }
.offer-title { font-weight: 700; font-size: 15px; color: #333; }

.offer-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}
.offer-meta i { margin-right: 4px; }

.offer-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.price-discount {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-color);
}
.price-regular {
    font-size: 13px;
    text-decoration: line-through;
    color: #999;
}
.offer-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--brand-color);
    color: white;
    font-size: 10px;
    padding: 4px 12px;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* 6. NEW BOTTOM NAV */
.nav-bar-new {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
}
.nav-btn {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    font-size: 11px;
    font-weight: 500;
}
.nav-btn i { font-size: 20px; margin-bottom: 5px; }
.nav-btn.active { color: var(--brand-color); }

/* Center Action Button */
.nav-center-action {
    margin-top: -30px;
    background: white;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 -5px 10px rgba(0,0,0,0.05);
}
.circle-btn {
    width: 50px;
    height: 50px;
    background: var(--brand-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}


/* ----------------------------------------------------------------
   5. Bottom Navigation Bar
   ---------------------------------------------------------------- */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 65px;
    background-color: var(--white-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color-light);
    transition: color var(--transition-speed);
}

.nav-item.active, .nav-item:hover {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.4em;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 0.75em;
    font-weight: 500;
}


/* ----------------------------------------------------------------
   6. PIN Modal Styles
   ---------------------------------------------------------------- */
.pin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.pin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pin-modal-content {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    width: 90%;
    max-width: 320px;
    transform: scale(0.9);
    transition: transform var(--transition-speed);
}

.pin-modal-overlay.active .pin-modal-content {
    transform: scale(1);
}

.pin-modal-content h3 {
    margin-bottom: 10px;
}

.pin-modal-content p {
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.pin-input {
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 1.5em;
    letter-spacing: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.pin-input:focus {
    outline: none;
    border-color: var(--primary-color);
}


/* ----------------------------------------------------------------
   7. Flash Messages & Helper Classes
   ---------------------------------------------------------------- */
.flash-message {
    padding: 15px;
    margin: 0 20px 20px 20px;
    border-radius: var(--border-radius);
    color: var(--white-color);
    text-align: center;
}
.flash-message.success { background-color: var(--success-color); }
.flash-message.error { background-color: var(--error-color); }
.flash-message.info { background-color: var(--primary-color); }

.hidden {
    display: none !important;
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }


/* ----------------------------------------------------------------
   8. Animations
   ---------------------------------------------------------------- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ----------------------------------------------------------------
   9. Media Queries for larger screens (Desktop view)
   ---------------------------------------------------------------- */
@media (min-width: 768px) {
    body {
        align-items: center; /* Center the container vertically on larger screens */
    }

    .mobile-container {
        border-radius: 20px;
        min-height: auto; /* Allow height to adjust to content */
        max-height: 90vh; /* Limit height */
        overflow-y: auto; /* Add scroll for content overflow */
    }

    .bottom-navbar {
        max-width: 450px; /* Keep navbar width consistent with the container */
        border-radius: 0;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }
}