/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #667eea;
    --primary-glow: rgba(102, 126, 234, 0.3);
    --accent: #764ba2;
    --bg-start: #0a0a1a;
    --bg-mid: #111128;
    --bg-end: #0d0d20;
    --card-bg: rgba(255,255,255,0.035);
    --card-border: rgba(255,255,255,0.07);
    --text: #ffffff;
    --text-secondary: rgba(255,255,255,0.55);
    --text-muted: rgba(255,255,255,0.3);
    --success: #10b981;
    --input-bg: rgba(255,255,255,0.05);
    --input-border: rgba(255,255,255,0.1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === OPERATOR THEMES === */
body.theme-azercell {
    --primary: #6F2C91; /* Gerçek Azercell Moru */
    --primary-glow: rgba(111, 44, 145, 0.25);
    --accent: #4A1D61;
    --bg-start: #0a040f;
    --bg-mid: #14081c;
    --bg-end: #0a040f;
}
body.theme-bakcell {
    --primary: #E3000F; /* Gerçek Bakcell Kırmızısı */
    --primary-glow: rgba(227, 0, 15, 0.25);
    --accent: #A3000B;
    --bg-start: #120003;
    --bg-mid: #1a0006;
    --bg-end: #100004;
}
body.theme-nar {
    --primary: #DF0059; /* Gerçek Nar Rengi */
    --primary-glow: rgba(223, 0, 89, 0.25);
    --accent: #A30040;
    --bg-start: #120007;
    --bg-mid: #1c000b;
    --bg-end: #120007;
}

html {
    font-size: 16px;
    background: #080810;
    height: 100%;
}

body {
    font-family: var(--font);
    background: #080810;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: -50px;
    right: -50px;
    bottom: -200px;
    background:
        radial-gradient(ellipse 500px 500px at 30% 30%, var(--primary-glow), transparent),
        linear-gradient(160deg, var(--bg-start), var(--bg-mid), var(--bg-end));
    pointer-events: none;
    z-index: 0;
    transition: background 0.5s ease;
}

/* ===== CONTAINER ===== */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0 auto;
    padding: 20px 16px 50px;
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== HEADER ===== */
.header-area { text-align: center; margin-bottom: 6px; }

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    box-shadow: 0 4px 18px var(--primary-glow);
    transition: all 0.5s ease;
}

/* ===== HERO ===== */
.hero-section { margin: 20px 0 6px; }

.main-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.data-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.data-amount {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: background 0.5s ease;
}

.free-tag {
    background: var(--success);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.sub-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

.text-center { text-align: center; }

/* ===== PROGRESS BAR ===== */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.step-indicator.completed.clickable { cursor: pointer; }
.step-indicator.completed.clickable:hover .step-circle.done {
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--primary-glow);
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.35s ease;
}

.step-circle.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 14px var(--primary-glow);
}

.step-circle.done {
    background: var(--success);
    border-color: transparent;
    color: #fff;
    transition: all 0.2s ease;
}

.step-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: var(--text-secondary);
}

.step-line {
    width: 44px;
    height: 2px;
    background: var(--input-border);
    margin: 0 8px;
    margin-bottom: 18px;
    transition: background 0.4s ease;
}

.step-line.active {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ===== CARD ===== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px 22px;
    margin-bottom: 16px;
    animation: cardIn 0.4s ease-out;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.card-icon {
    color: var(--primary);
    font-size: 1.1rem;
    transition: color 0.5s ease;
}

/* ===== OPERATOR GRID ===== */
.operator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}

.operator-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 8px 14px;
    border-radius: 16px;
    background: var(--input-bg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.operator-card:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
}

.operator-card.selected {
    border-color: var(--primary);
    background: rgba(255,255,255,0.07);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
}

.check-mark {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.55rem;
    color: #fff;
}

.operator-card.selected .check-mark {
    opacity: 1;
    transform: scale(1);
}

.op-logo-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid rgba(255,255,255,0.15);
}

.op-logo-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
}

.op-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}

.operator-card:hover .op-logo-wrap { transform: scale(1.05); }

.azercell-bg {
    background: #ffffff;
    border-color: rgba(111, 44, 145, 0.35); /* Azercell Moru RGBA */
    box-shadow: 0 2px 10px rgba(111, 44, 145, 0.12);
}
.bakcell-bg {
    background: #ffffff;
    border-color: rgba(227, 0, 15, 0.35); /* Bakcell Kırmızısı RGBA */
    box-shadow: 0 2px 10px rgba(227, 0, 15, 0.12);
}
.nar-bg {
    background: #ffffff;
    border-color: rgba(223, 0, 89, 0.35); /* Nar Rengi RGBA */
    box-shadow: 0 2px 10px rgba(223, 0, 89, 0.12);
}

.operator-name {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.op-tag {
    font-size: 0.62rem;
    color: var(--text-muted);
}

/* ===== SELECTED OPERATOR BAR ===== */
.selected-operator-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

.selected-op-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-op-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
}

.selected-op-logo.azercell-bg {
    background: linear-gradient(135deg, #6F2C91, #4A1D61) !important;
    border-color: transparent;
    box-shadow: none;
}
.selected-op-logo.bakcell-bg {
    background: linear-gradient(135deg, #E3000F, #A3000B) !important;
    border-color: transparent;
    box-shadow: none;
}
.selected-op-logo.nar-bg {
    background: linear-gradient(135deg, #DF0059, #A30040) !important;
    border-color: transparent;
    box-shadow: none;
}

.selected-op-info span {
    font-size: 0.85rem;
    font-weight: 600;
}

.change-op-btn {
    background: none;
    border: 1px solid var(--input-border);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.change-op-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== PREFIX SECTION ===== */
.prefix-section {
    margin-bottom: 16px;
}

.prefix-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.prefix-chips {
    display: flex;
    gap: 8px;
}

.prefix-chip {
    padding: 9px 20px;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.prefix-chip:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--text);
    background: rgba(255,255,255,0.07);
}

.prefix-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 12px var(--primary-glow);
}

/* ===== INPUT ===== */
.input-box {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 14px;
    padding: 0 14px;
    height: 54px;
    margin-bottom: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.flag-area {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.flag-area img {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

.country-code {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--input-border);
    margin: 0 10px;
    flex-shrink: 0;
}

.prefix-display {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-right: 6px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

#phoneInput {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font);
    letter-spacing: 1.2px;
}

#phoneInput::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ===== BUTTON ===== */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--primary-glow);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: translateX(-100%);
}

.btn:hover::after {
    animation: shimmer 0.5s ease;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== SECURE TEXT ===== */
.secure-text {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ===== INFO ROW ===== */
.info-row {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.info-card {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.info-icon {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 4px;
    display: block;
    transition: color 0.5s ease;
}

.info-value {
    font-size: 0.9rem;
    font-weight: 700;
}

.info-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== OTP ===== */
.otp-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 18px;
}

.otp-digit {
    width: 46px;
    height: 54px;
    border-radius: 12px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    font-family: var(--font);
    outline: none;
    transition: all 0.2s ease;
}

.otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(255,255,255,0.06);
}

/* ===== SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 0.7s linear infinite;
}

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

.loading-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== TIMER ===== */
.timer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timer-text #seconds { font-weight: 700; }

.resend-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s;
}

.resend-link:hover { opacity: 0.8; }

/* ===== TOAST ===== */
.toast {
    visibility: hidden;
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    z-index: 999;
    max-width: 360px;
    text-align: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast i { color: var(--primary); font-size: 0.9rem; }

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== HIDDEN ===== */
.hidden { display: none !important; }

/* ===== TRUST FOOTER ===== */
.trust-footer {
    text-align: center;
    margin-top: 24px;
    padding: 16px;
}

.trust-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-muted);
}

.trust-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .app-container { padding: 14px 14px 36px; }
    
    /* Compact hero */
    .header-area { margin-bottom: 2px; }
    .promo-badge { padding: 5px 14px; font-size: 0.62rem; }
    .hero-section { margin: 10px 0 2px; }
    .main-title { font-size: 1.15rem; margin-bottom: 6px; }
    .data-highlight { margin-bottom: 6px; gap: 8px; }
    .data-amount { font-size: 2rem; }
    .free-tag { padding: 3px 10px; font-size: 0.68rem; }
    .sub-text { font-size: 0.78rem; line-height: 1.5; }
    
    /* Compact progress */
    .progress-bar { margin: 14px 0; }
    .step-circle { width: 34px; height: 34px; font-size: 0.72rem; }
    .step-label { font-size: 0.58rem; }
    .step-line { width: 36px; margin: 0 6px; margin-bottom: 16px; }
    
    /* Card */
    .card { padding: 20px 16px; border-radius: 18px; margin-bottom: 12px; }
    .card-title { font-size: 0.95rem; margin-bottom: 16px; }
    
    /* Operator grid — make cards touchable and well-spaced */
    .operator-grid { gap: 8px; margin-bottom: 2px; }
    .operator-card { padding: 14px 6px 12px; gap: 6px; border-radius: 14px; }
    .op-logo-wrap { width: 52px; height: 52px; border-radius: 14px; }
    .op-logo-img { width: 78%; height: 78%; }
    .operator-name { font-size: 0.72rem; }
    .op-tag { font-size: 0.56rem; }
    .check-mark { width: 18px; height: 18px; top: 5px; right: 5px; font-size: 0.5rem; }
    
    /* Button */
    .btn { padding: 12px; font-size: 0.85rem; border-radius: 12px; }
    
    /* Input */
    .input-box { height: 50px; border-radius: 12px; padding: 0 12px; }
    .prefix-chip { padding: 8px 16px; font-size: 0.82rem; }
    
    /* OTP */
    .otp-digit { width: 42px; height: 50px; font-size: 1.15rem; border-radius: 10px; }
    
    /* Info row */
    .info-row { margin-top: 14px; gap: 6px; }
    .info-card { padding: 10px 6px; border-radius: 10px; }
    .info-icon { font-size: 0.9rem; }
    .info-value { font-size: 0.82rem; }
    .info-label { font-size: 0.58rem; }
    
    /* Trust footer */
    .trust-footer { margin-top: 16px; padding: 12px; }
}

@media (max-width: 340px) {
    .app-container { padding: 10px 10px 28px; }
    .main-title { font-size: 1.05rem; }
    .data-amount { font-size: 1.8rem; }
    .op-logo-wrap { width: 44px; height: 44px; }
    .otp-digit { width: 36px; height: 44px; font-size: 1rem; }
    .card { padding: 16px 12px; }
    .operator-card { padding: 12px 4px 10px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
