:root {
    --primary: #2563eb;     /* Modern Vibrant Blue */
    --primary-hover: #1d4ed8;
    --secondary: #059669;   /* Emerald */
    --accent: #d97706;      /* Amber */
    --background: #f8fafc;  /* Clean bright slate */
    --text-main: #0f172a;
    --text-muted: #475569;
    --surface: rgba(255, 255, 255, 0.85);
    --border: rgba(255, 255, 255, 0.6);
    --error: #ef4444;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

[data-theme="dark"] {
    --primary: #3b82f6; 
    --primary-hover: #60a5fa;
    --background: #0b1121; /* Slightly brighter, deep tinted blue-black */
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --surface: rgba(30, 41, 59, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    transition: background-color 0.4s ease;
    padding: 20px;
}

/* Background Animated Blobs */
.blob-c {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px); /* Increased blur for modern pastel glow */
}

.shape-blob {
    background: #3b82f6; /* Bright vibrant cyan/blue */
    height: 450px;
    width: 450px;
    border-radius: 40% 50% 30% 40%;
    animation: 
        transform 18s ease-in-out infinite both alternate,
        movement_one 12s ease-in-out infinite both;
    opacity: 0.45;
    position: absolute;
    left: 10%;
    top: 20%;
}
.shape-blob.one {
    background: #10b981; /* Bright emerald glow */
    height: 400px;
    width: 400px;
    left: 60%;
    top: 40%;
    opacity: 0.4;
    animation: 
        transform 8s ease-in-out infinite both alternate,
        movement_two 20s ease-in-out infinite both;
}
.shape-blob.two {
    background: #f43f5e; /* Rose/Pink accent for modern contrast */
    height: 350px;
    width: 350px;
    left: 40%;
    top: -10%;
    opacity: 0.4;
    animation: 
        transform 10s ease-in-out infinite both alternate,
        movement_two 14s ease-in-out infinite both;
}

@keyframes transform {
    0%,
    100% { border-radius: 33% 67% 70% 30% / 30% 30% 70% 70%; } 
   20% { border-radius: 37% 63% 51% 49% / 37% 65% 35% 63%; } 
   40% { border-radius: 36% 64% 64% 36% / 64% 48% 52% 36%; } 
   60% { border-radius: 37% 63% 51% 49% / 30% 30% 70% 70%; } 
   80% { border-radius: 40% 60% 42% 58% / 41% 51% 49% 59%; } 
}
@keyframes movement_one {
    0%, 100% { transform: none; }
    50% { transform: translate(50vw, 20vh) rotateY(10deg) scale(1.2); }
}
@keyframes movement_two {
    0%, 500% { transform: none; }
    50% { transform: translate(-30vw, 30vh) rotate(-200deg) scale(1.2); }
}

/* Glassmorphism Container */
.container {
    width: 100%;
    max-width: 450px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.3s;
}
.theme-toggle:hover { color: var(--primary); }

.app-main {
    padding: 32px 24px;
    position: relative;
    min-height: 400px;
}

.step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}
.step.active {
    display: block;
    animation: slideUpFade 0.5s ease forwards;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text { margin-bottom: 32px; }
.hero-text h1 { font-size: 1.7rem; font-weight: 700; margin-bottom: 8px; }
.hero-text p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 16px;
    transition: color 0.2s;
}
.back-btn:hover { color: var(--primary); }

/* Forms & Inputs */
.form-group { margin-bottom: 24px; }
.input-container {
    position: relative;
    margin-bottom: 20px;
}
.input-container .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.input-container input {
    width: 100%;
    padding: 16px 16px 16px 45px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s;
    outline: none;
    font-weight: 500;
}
[data-theme="dark"] .input-container input { background: rgba(0, 0, 0, 0.2); }
.input-container input:focus {
    border-color: var(--primary);
    background: transparent;
    box-shadow: 0 0 0 3px rgba(0, 45, 187, 0.1);
}

.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 24px;
}
.otp-digit {
    width: calc(100% / 6 - 8px);
    aspect-ratio: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}
[data-theme="dark"] .otp-digit { background: rgba(0, 0, 0, 0.2); }
.otp-digit:focus { border-color: var(--primary); background: transparent; }

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 45, 187, 0.3);
}
.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}
.btn-outline:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
.btn.loading .btn-text { display: none; }
.btn.loading .loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.resend-text {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.resend-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
#planName { font-size: 1.4rem; font-weight: 700; }
.msisdn-text { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 1px; }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.info-item {
    background: rgba(255, 255, 255, 0.4);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}
[data-theme="dark"] .info-item { background: rgba(0,0,0,0.2); }
.info-item i { font-size: 1.5rem; color: var(--primary); opacity: 0.8; }
.info-item .label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.info-item .value { display: block; font-size: 1rem; font-weight: 700; color: var(--text-main); }
.info-item .value.gold { color: var(--accent); }

.section-title { font-size: 1.1rem; margin-bottom: 16px; font-weight: 600; border-bottom: 1px solid var(--border); padding-bottom: 8px;}

/* Quota Item layout */
.quota-item {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
[data-theme="dark"] .quota-item { background: rgba(0,0,0,0.15); }

.quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.quota-name { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.quota-icon {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.7rem;
}

.quota-values { text-align: right; }
.q-remaining { font-weight: 700; font-size: 1.1rem; }
.q-total { font-size: 0.8rem; color: var(--text-muted); }

.progress-bg {
    width: 100%; height: 8px; background: rgba(0,0,0,0.05);
    border-radius: 4px; overflow: hidden;
}
[data-theme="dark"] .progress-bg { background: rgba(255,255,255,0.05); }
.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0; 
}

.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 32px; }

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-main);
    color: var(--background);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    opacity: 0;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.error { background: var(--error); color: white; }
.toast.success { background: var(--secondary); color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; opacity: 0.5; }

/* Footer Clock */
.footer-clock {
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    display: block;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}
.footer-clock i {
    color: var(--primary);
    margin-right: 5px;
}
