/* ───── Base ───── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Hind Siliguri', 'Segoe UI', system-ui, sans-serif;
    background: #f0f4ff;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ───── Navbar ───── */
.top-nav {
    background: #1e1b4b;
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-nav .brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.top-nav .brand span { color: #a5b4fc; }

/* ───── Hero ───── */
.hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4f46e5 100%);
    padding: 3.5rem 1rem 5.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: rgba(255,255,255,.03);
    border-radius: 50%;
    top: -200px; right: -100px;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 64px;
    background: #f0f4ff;
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero h1 { color: #fff; font-size: 2rem; font-weight: 800; margin-bottom: .5rem; line-height: 1.2; }
.hero p  { color: rgba(255,255,255,.72); font-size: .95rem; max-width: 480px; margin: 0 auto; }
.hero .badge-tld {
    display: inline-block;
    background: rgba(255,255,255,.12);
    color: #c7d2fe;
    border-radius: 20px;
    padding: .2rem .7rem;
    font-size: .75rem;
    font-weight: 600;
    margin: .25rem .2rem;
    letter-spacing: .5px;
}

/* ───── Search Card ───── */
.search-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 24px 64px rgba(79,70,229,.14);
    max-width: 680px;
    margin: -2.5rem auto 2.5rem;
    position: relative;
    z-index: 10;
}

.search-input-wrap {
    display: flex;
    gap: 0;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s;
}
.search-input-wrap:focus-within { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
.search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: .85rem 1rem;
    font-size: 1.05rem;
    font-family: inherit;
    color: #1e1b4b;
}
.search-input-wrap input::placeholder { color: #9ca3af; }
.search-input-wrap .tld-display {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 700;
    padding: .85rem 1.1rem;
    font-size: 1rem;
    border-left: 2px solid #e0e7ff;
    min-width: 80px;
    text-align: center;
}
.btn-search {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .75rem 1.75rem;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: .85rem;
    transition: opacity .2s, transform .1s;
    font-family: inherit;
}
.btn-search:hover  { opacity: .92; }
.btn-search:active { transform: scale(.99); }
.btn-search:disabled { opacity: .6; cursor: not-allowed; }

/* TLD Selector */
.tld-pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tld-pill input[type=radio] { display: none; }
.tld-pill label {
    display: inline-flex; align-items: center; gap: .3rem;
    cursor: pointer;
    padding: .35rem .9rem;
    border-radius: 20px;
    border: 1.5px solid #c7d2fe;
    color: #4f46e5;
    font-size: .8rem;
    font-weight: 600;
    transition: all .15s;
    user-select: none;
}
.tld-pill input:checked + label {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}
.tld-pill .price-tag { font-size: .7rem; opacity: .8; }

/* Result */
.result-box { border-radius: 12px; padding: 1rem 1.25rem; margin-top: 1rem; display: flex; align-items: center; gap: .75rem; }
.result-available { background: #f0fdf4; border: 1.5px solid #86efac; }
.result-taken     { background: #fef2f2; border: 1.5px solid #fca5a5; }
.result-icon      { font-size: 1.5rem; }
.result-domain    { font-size: 1.05rem; font-weight: 700; color: #1e1b4b; }
.result-status    { font-size: .82rem; font-weight: 500; }
.text-available   { color: #16a34a; }
.text-taken       { color: #dc2626; }
.btn-continue {
    margin-left: auto;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .5rem 1.2rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: inherit;
    transition: opacity .2s;
}
.btn-continue:hover { opacity: .9; color: #fff; }

/* Tips */
.tips-card {
    background: #eef2ff;
    border-left: 4px solid #4f46e5;
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.25rem;
}
.tips-card h6 { color: #3730a3; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 .6rem; }
.tips-card li { font-size: .83rem; color: #3730a3; margin-bottom: .3rem; line-height: 1.5; }

/* ───── Page Content ───── */
.page-body { max-width: 720px; margin: 0 auto; padding: 0 1rem 3rem; flex: 1; }

/* Step bar */
.step-bar { display: flex; align-items: flex-start; margin-bottom: 2rem; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.step-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #818cf8;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700;
    z-index: 1;
}
.step-circle.active { background: #4f46e5; color: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.15); }
.step-circle.done   { background: #10b981; color: #fff; }
.step-label { font-size: .7rem; color: #6b7280; margin-top: .35rem; text-align: center; }
.step-line { flex: 1; height: 2px; background: #e0e7ff; margin-top: 17px; }
.step-line.done-line { background: #10b981; }

/* Cards */
.card-section {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(79,70,229,.06);
}
.card-section h5 {
    font-size: .88rem;
    font-weight: 700;
    color: #312e81;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 1.1rem;
    display: flex; align-items: center; gap: .5rem;
}

/* Domain badge */
.domain-badge {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    padding: .75rem 1.1rem;
    display: flex; align-items: center; gap: .75rem;
}
.domain-badge .icon { font-size: 1.4rem; }
.domain-badge .name { font-size: 1.1rem; font-weight: 700; color: #3730a3; }
.domain-badge .tld  { color: #818cf8; }

/* Addons */
.addon-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .85rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: .6rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.addon-item:hover { border-color: #a5b4fc; background: #fafbff; }
.addon-item.checked { border-color: #4f46e5; background: #eef2ff; }
.addon-item input[type=checkbox] { margin-top: 2px; accent-color: #4f46e5; width: 16px; height: 16px; flex-shrink: 0; }
.addon-title { font-size: .9rem; font-weight: 600; color: #1f2937; }
.addon-desc  { font-size: .78rem; color: #6b7280; margin-top: .1rem; }

/* Form */
.form-label { font-size: .82rem; font-weight: 600; color: #374151; margin-bottom: .3rem; }
.form-control, .form-select {
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    padding: .65rem .9rem;
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* Price summary */
.price-summary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 14px;
    padding: 1.5rem;
    color: #fff;
}
.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-size: .9rem; }
.price-row:last-child { margin-bottom: 0; }
.price-row .label { opacity: .85; }
.price-row .val   { font-weight: 700; }
.price-row.total  { border-top: 1px solid rgba(255,255,255,.25); padding-top: .75rem; margin-top: .5rem; }
.price-row.total .val { font-size: 1.4rem; font-weight: 800; }

.btn-pay {
    width: 100%;
    background: #fff;
    color: #4f46e5;
    border: none;
    border-radius: 10px;
    padding: .9rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    transition: transform .1s, box-shadow .15s;
}
.btn-pay:hover  { box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.btn-pay:active { transform: scale(.99); }

/* ───── Success Page ───── */
.success-wrap {
    display: flex; align-items: flex-start; justify-content: center;
    padding: 2rem 1rem 4rem;
    min-height: calc(100vh - 56px);
    background: #f0f4ff;
}
.success-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(79,70,229,.12);
    text-align: center;
}
.success-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-title { font-size: 1.35rem; font-weight: 800; color: #1e1b4b; margin-bottom: .5rem; }
.success-msg   { color: #4b5563; font-size: .92rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* Process Steps */
.process-steps { text-align: left; margin-top: 1.5rem; }
.process-step {
    display: flex; align-items: center; gap: .85rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    margin-bottom: .6rem;
    transition: all .3s;
}
.process-step.state-pending { background: #f9fafb; opacity: .5; }
.process-step.state-running { background: #eff6ff; border-color: #bfdbfe; opacity: 1; }
.process-step.state-done    { background: #f0fdf4; border-color: #86efac; opacity: 1; }

.step-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.state-pending .step-icon { background: #f1f5f9; }
.state-running .step-icon { background: #dbeafe; }
.state-done    .step-icon { background: #dcfce7; }

.step-text { flex: 1; }
.step-title { font-size: .88rem; font-weight: 600; color: #1f2937; }
.step-sub   { font-size: .75rem; color: #6b7280; margin-top: .1rem; }

.step-badge { font-size: .7rem; padding: .2rem .55rem; border-radius: 20px; font-weight: 600; }
.badge-wait    { background: #f1f5f9; color: #6b7280; }
.badge-running { background: #dbeafe; color: #1d4ed8; }
.badge-done    { background: #dcfce7; color: #15803d; }

.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Order summary in success ───── */
.order-summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem;
    text-align: left;
    font-size: .85rem;
    margin-top: 1.25rem;
}
.order-row { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid #f1f5f9; }
.order-row:last-child { border-bottom: none; }
.order-row .key { color: #6b7280; }
.order-row .val { font-weight: 600; color: #1f2937; }

/* ───── Alert ───── */
.alert-error { background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 10px; color: #dc2626; padding: .8rem 1rem; font-size: .85rem; margin-bottom: 1rem; }

/* ───── Footer ───── */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #9ca3af;
    font-size: .78rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

/* ───── Responsive ───── */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.5rem; }
    .search-card { padding: 1.25rem; margin-left: .75rem; margin-right: .75rem; }
    .result-box { flex-wrap: wrap; }
    .btn-continue { margin-left: 0; margin-top: .5rem; width: 100%; justify-content: center; }
}
