:root {
    --primary:    #c0392b;
    --primary-dk: #96281b;
    --accent:     #f39c12;
    --text-dark:  #2c3e50;
    --text-mid:   #555;
    --text-light: #888;
    --bg-light:   #f8f4f0;
    --bg-white:   #fff;
    --border:     #e0d5cc;
    --radius:     10px;
    --shadow:     0 2px 16px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; color: var(--text-dark); background: var(--bg-light); }

/* --- HEADER --- */
header {
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; }
nav a { color: var(--text-dark); text-decoration: none; margin-left: 20px; font-size: 0.95rem; }
nav a:hover { color: var(--primary); }

/* --- CONTAINER --- */
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* --- REGISTER SECTION --- */
.register-section { padding: 40px 0 60px; }
.register-box {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 48px;
    max-width: 680px;
    margin: 0 auto;
}
.reg-header { text-align: center; margin-bottom: 28px; }
.reg-header h1 { font-size: 1.8rem; color: var(--primary); }
.reg-header p  { color: var(--text-light); margin-top: 6px; }

/* --- PROGRESS BAR --- */
.progress-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    position: relative;
}
.progress-bar::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    font-size: 13px;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}
.step::before {
    content: attr(data-num);
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 6px;
}
.step:nth-child(1)::before { content: '1'; }
.step:nth-child(2)::before { content: '2'; }
.step:nth-child(3)::before { content: '3'; }
.step.active::before {
    background: var(--primary);
    color: #fff;
}
.step span { font-size: 12px; }

/* --- FORMS --- */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 0.87rem; font-weight: 600; color: var(--text-mid); display: block; margin-bottom: 6px; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: border 0.2s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
}

/* --- RADIO CARDS (Profile For) --- */
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.radio-card { cursor: pointer; }
.radio-card input { display: none; }
.radio-card span {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 0.87rem;
    color: var(--text-mid);
    transition: all 0.2s;
}
.radio-card input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

/* --- PASSWORD EYE --- */
.input-eye { position: relative; }
.input-eye input { padding-right: 40px; }
.eye-icon {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
}

/* --- PASSWORD STRENGTH --- */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 6px;
    background: var(--border);
    transition: all 0.3s;
}
.strength-weak   { background: #e74c3c; width: 33%; }
.strength-medium { background: #f39c12; width: 66%; }
.strength-strong { background: #27ae60; width: 100%; }

/* --- CHECKBOX --- */
.checkbox-group label { font-weight: 400; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.checkbox-inline { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.space-between { justify-content: space-between; align-items: center; }

/* --- BUTTONS --- */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dk); }
.btn-full { width: 100%; margin-top: 8px; }

/* --- ALERTS --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert-error { background: #fdf0f0; border: 1px solid #f5c6c6; color: #c0392b; }
.alert-error ul { padding-left: 18px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* --- LOGIN --- */
.login-section { padding: 60px 0; }
.login-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 48px;
    max-width: 440px;
    margin: 0 auto;
    text-align: center;
}
.login-box h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 6px; }
.login-box p  { color: var(--text-light); margin-bottom: 24px; }
.login-box .form-group { text-align: left; }

/* --- LINKS --- */
a { color: var(--primary); }
.login-link { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-mid); }

/* --- FOOTER --- */
footer {
    background: var(--text-dark);
    color: #aaa;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    margin-top: 60px;
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
    .register-box, .login-box { padding: 24px 16px; }
    .form-row { grid-template-columns: 1fr; }
}
.otp-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.otp-input-row input {
    flex: 1;
}
.otp-input-row button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.otp-input-row button:hover     { background: var(--primary-dk); }
.otp-input-row button:disabled  { background: #ccc; cursor: not-allowed; }

/* OTP timer */
.otp-timer {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}
.otp-timer a { color: var(--primary); font-weight: 600; }

/* OTP messages */
.otp-msg {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
}
.otp-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.otp-msg-error {
    background: #fdf0f0;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

/* Verified badge */
.verified-badge {
    margin-top: 8px;
    padding: 8px 14px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Pulse animation on send OTP button */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}
.btn-pulse { animation: pulse 1.5s infinite; }

/* Strong image protection */
.protected-img-wrap {
    position: relative;
    display: inline-block;
    overflow: hidden;
}
.protected-img-wrap::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    cursor: default;
}
