/* Modern CSS Variables for Color Gradients and Dark Mode */
:root {
    /* Primary Modern Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #13B497 0%, #10D876 100%);
    --warning-gradient: linear-gradient(135deg, #FFA500 0%, #FF6B6B 100%);
    --info-gradient: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    
    /* Network Colors - Enhanced */
    --mtn-yellow: #FFD700;
    --mtn-yellow-dark: #FFC300;
    --mtn-yellow-light: #FFED4E;
    --mtn-gradient: linear-gradient(135deg, #FFD700 0%, #FFC300 100%);
    --mtn-bg-gradient: linear-gradient(135deg, #FFD70015 0%, #FFC30015 100%);
    
    --telecel-red: #FF1744;
    --telecel-rose: #E91E63;
    --telecel-pink: #F50057;
    --telecel-gradient: linear-gradient(135deg, #FF1744 0%, #E91E63 100%);
    --telecel-bg-gradient: linear-gradient(135deg, #FF174415 0%, #E91E6315 100%);
    
    --airteltigo-blue: #4169E1;
    --airteltigo-royal: #1E3A8A;
    --airteltigo-sky: #00B4D8;
    --airteltigo-gradient: linear-gradient(135deg, #4169E1 0%, #1E3A8A 100%);
    --airteltigo-bg-gradient: linear-gradient(135deg, #4169E115 0%, #1E3A8A15 100%);
    
    /* Modern UI Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Network Theme Classes */
[data-network="mtn"] {
    --primary-gradient: var(--mtn-gradient);
    --bg-primary: var(--mtn-bg-gradient);
    --bg-secondary: #ffffff;
    --accent-color: var(--mtn-yellow);
    --accent-hover: var(--mtn-yellow-dark);
    --text-on-accent: #000000;
}

[data-network="telecel"] {
    --primary-gradient: var(--telecel-gradient);
    --bg-primary: var(--telecel-bg-gradient);
    --bg-secondary: #ffffff;
    --accent-color: var(--telecel-red);
    --accent-hover: var(--telecel-rose);
    --text-on-accent: #ffffff;
}

[data-network="airteltigo"] {
    --primary-gradient: var(--airteltigo-gradient);
    --bg-primary: var(--airteltigo-bg-gradient);
    --bg-secondary: #ffffff;
    --accent-color: var(--airteltigo-blue);
    --accent-hover: var(--airteltigo-royal);
    --text-on-accent: #ffffff;
}

/* Dark Mode Network Themes */
[data-theme="dark"][data-network="mtn"] {
    --bg-secondary: #1a1a1a;
    --bg-primary: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-theme="dark"][data-network="telecel"] {
    --bg-secondary: #2d0a15;
    --bg-primary: linear-gradient(135deg, #2d0a15 0%, #4a1a2a 100%);
}

[data-theme="dark"][data-network="airteltigo"] {
    --bg-secondary: #0a1929;
    --bg-primary: linear-gradient(135deg, #0a1929 0%, #1a2f4a 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .container {
        width: 92%;
        padding: 16px;
        margin: 12px auto;
        border-radius: var(--radius-lg);
    }
}

header {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 16px 0;
    text-align: center;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

header nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin: 0 16px;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

header nav a:hover {
    background: var(--primary-gradient);
    color: var(--text-on-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* Form Container */
.container form {
    max-width: 500px;
    margin: 32px auto;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .container form {
        margin: 24px auto;
        padding: 24px;
        border-radius: var(--radius-lg);
    }
}

.container form h2 {
    text-align: center;
    margin-bottom: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.875rem;
    font-weight: 700;
}

/* Form Elements */
form {
    display: flex;
    flex-direction: column;
}

form label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

form input[type="email"],
form input[type="password"],
form input[type="text"],
form input[type="tel"],
form input[type="number"],
form textarea,
form select {
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 100%;
    box-sizing: border-box;
}

form input::placeholder,
form textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="text"]:focus,
form input[type="tel"]:focus,
form input[type="number"]:focus,
form textarea:focus,
form select:focus {
    border-color: var(--accent-color, #667eea);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

form button {
    background: var(--primary-gradient);
    color: var(--text-on-accent, white);
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

form button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

form button:hover:before {
    left: 100%;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

form button:active {
    transform: translateY(0);
}

form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#message {
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    color: white;
    transition: all 0.3s ease;
}

#message.success {
    background: var(--success-gradient);
    border: 1px solid rgba(19, 180, 151, 0.3);
}

#message.error {
    background: var(--warning-gradient);
    border: 1px solid rgba(255, 165, 0, 0.3);
}

#message.info {
    background: var(--info-gradient);
    border: 1px solid rgba(74, 144, 226, 0.3);
}


footer {
    text-align: center;
    padding: 32px;
    margin-top: 48px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    box-shadow: var(--shadow-medium);
    border-top: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Sidebar Styles */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background: var(--bg-secondary);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
}

.sidebar a {
    padding: 16px 24px;
    text-decoration: none;
    font-size: 16px;
    color: var(--text-secondary);
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 4px 0;
}

.sidebar a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-left-color: var(--accent-color, #667eea);
    transform: translateX(5px);
}

.sidebar a.active {
    color: var(--accent-color, #667eea);
    background: var(--bg-tertiary);
    border-left-color: var(--accent-color, #667eea);
    font-weight: 600;
}

.sidebar .close-btn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

/* Header Styles */
.header-container {
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.menu-icon {
    font-size: 30px;
    cursor: pointer;
}

.header-title {
    margin: 0 auto;
}

/* Main Content */
#main-content {
    transition: margin-left .5s;
    padding: 16px;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px;
    background: var(--primary-gradient);
    color: var(--text-on-accent, white);
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 16px;
        min-height: 50vh;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
    line-height: 1.6;
}

.hero-buttons .btn {
    text-decoration: none;
    color: var(--text-on-accent, white);
    padding: 18px 36px;
    border-radius: var(--radius-lg);
    margin: 0 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
    display: inline-block;
    border: 2px solid transparent;
}

@media (max-width: 768px) {
    .hero-buttons .btn {
        display: block;
        margin: 8px auto;
        width: 200px;
    }
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-large);
    border-color: var(--text-on-accent, white);
}

.btn-primary {
    background: var(--primary-gradient);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

.btn-secondary {
    background: var(--secondary-gradient);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e91e63 0%, #f5576c 100%);
}

/* Responsive Styles */
.swal2-container {
    z-index: 1050 !important;
}

@media (min-width: 768px) {
    .sidebar {
        width: 280px;
    }

    #main-content {
        margin-left: 280px;
    }

    .menu-icon, .close-btn {
        display: none;
    }
}

@media (max-width: 767px) {
    .sidebar.open {
        width: 250px;
    }

    .header-title {
        padding-right: 30px;
    }
    
    .container {
        width: 95%;
        padding: 20px;
    }
    
    .hero-section {
        padding: 80px 15px;
    }
    
    .hero-content h1 {
        font-size: 2.5em;
    }
}

/* Mobile First Responsive Design */
@media (max-width: 480px) {
    .container {
        width: 88%;
        padding: 12px;
        margin: 8px auto;
        border-radius: var(--radius-md);
    }
    
    .container form {
        margin: 16px auto;
        padding: 20px;
        border-radius: var(--radius-md);
    }
    
    .container form h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    form input,
    form textarea,
    form select {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    form button {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .hero-section {
        padding: 60px 12px;
        min-height: 40vh;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 16px;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    
    header {
        padding: 12px 0;
    }
    
    header nav a {
        margin: 0 8px;
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .notification-slider {
        width: 100%;
        right: -100%;
        top: 60px;
        border-radius: 0;
        max-height: 70vh;
    }
    
    .notification-toggle {
        width: 44px;
        height: 44px;
        top: 70px;
        right: 12px;
        font-size: 14px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        top: 70px;
        right: 60px;
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    .container {
        width: 85%;
        padding: 8px;
    }
    
    .container form {
        padding: 16px;
    }
    
    .container form h2 {
        font-size: 1.25rem;
    }
    
    header nav a {
        display: block;
        margin: 4px 0;
        text-align: center;
    }
}

/* Tablet Styles */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        width: 90%;
        padding: 20px;
    }
    
    .hero-section {
        padding: 80px 16px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        margin: 6px;
        padding: 16px 32px;
    }
}

/* Desktop Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        width: 85%;
        padding: 28px;
    }
    
    .hero-section {
        padding: 100px 20px;
    }
}

/* Large Desktop */
@media (min-width: 1025px) {
    .container {
        width: 80%;
        max-width: 1400px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .notification-toggle,
    .theme-toggle {
        border-width: 1px;
    }
}

/* Dark Mode Specific Responsive */
@media (max-width: 768px) {
    [data-theme="dark"] .container {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    }
    
    [data-theme="dark"] .notification-slider {
        background: #1e293b;
        border-color: #334155;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 16px;
        min-height: 50vh;
    }
    
    .notification-slider {
        max-height: 40vh;
        top: 50px;
    }
    
    .notification-toggle {
        top: 70px;
    }
    
    .theme-toggle {
        top: 70px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .notification-toggle,
    .theme-toggle,
    .notification-slider,
    .hero-buttons {
        display: none !important;
    }
    
    .container {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Network Specific Colors - Enhanced */
.network-mtn {
    background: var(--mtn-gradient);
    color: #000;
}

.network-mtn:hover {
    background: linear-gradient(135deg, #FFC300 0%, #FFB300 100%);
}

.network-telecel {
    background: var(--telecel-gradient);
    color: #fff;
}

.network-telecel:hover {
    background: linear-gradient(135deg, #E91E63 0%, #F50057 100%);
}

.network-airteltigo {
    background: var(--airteltigo-gradient);
    color: #fff;
}

.network-airteltigo:hover {
    background: linear-gradient(135deg, #1E3A8A 0%, #00B4D8 100%);
}

/* Network Theme Buttons */
.btn-network-mtn {
    background: var(--mtn-gradient);
    color: #000;
    border: 2px solid var(--mtn-yellow);
}

.btn-network-mtn:hover {
    background: linear-gradient(135deg, #FFC300 0%, #FFB300 100%);
    border-color: var(--mtn-yellow-dark);
}

.btn-network-telecel {
    background: var(--telecel-gradient);
    color: #fff;
    border: 2px solid var(--telecel-red);
}

.btn-network-telecel:hover {
    background: linear-gradient(135deg, #E91E63 0%, #F50057 100%);
    border-color: var(--telecel-rose);
}

.btn-network-airteltigo {
    background: var(--airteltigo-gradient);
    color: #fff;
    border: 2px solid var(--airteltigo-blue);
}

.btn-network-airteltigo:hover {
    background: linear-gradient(135deg, #1E3A8A 0%, #00B4D8 100%);
    border-color: var(--airteltigo-royal);
}

/* Notification Slider - Enhanced */
.notification-slider {
    position: fixed;
    top: 80px;
    right: -400px;
    width: 350px;
    max-height: 500px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    box-shadow: var(--shadow-large);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .notification-slider {
        width: 100%;
        right: -100%;
        border-radius: 0;
    }
}

.notification-slider.open {
    right: 0;
}

.notification-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--info-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    z-index: 998;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

@media (max-width: 768px) {
    .notification-toggle {
        width: 48px;
        height: 48px;
        top: 80px;
        right: 16px;
    }
}

.notification-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-large);
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(-4px);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.notification-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.notification-item .time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}
