@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@500;600;700&display=swap');

/* =========================================
   RESET
   ========================================= */
* {
    box-sizing: border-box;
}

/* =========================================
   BODY
   ========================================= */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #fafbfc;
    color: #001f3f;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* =========================================
   MAIN HEADING
   ========================================= */
h1 {
    text-align: center;
    font-family: var(--font-heading) !important;
    color: #001f3f;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin: 25px 0 5px;
    text-shadow: 0 0 10px rgba(0, 31, 63, 0.12);
}

/* =========================================
   REGISTER HEADING
   ========================================= */
h2 {
    text-align: center;
    color: #155a9f;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px;
    letter-spacing: 0.2px;
}

/* =========================================
   REGISTER CARD
   ========================================= */
.register-card {
    width: 90%;
    max-width: 550px;
    margin: 0 auto 40px;
    padding: 30px 25px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 31, 63, 0.18);
    border: 2px solid rgba(0, 31, 63, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.register-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 204, 0, 0.75);
    box-shadow:
        0 0 15px rgba(255, 204, 0, 0.22),
        0 0 35px rgba(0, 31, 63, 0.16),
        0 15px 40px rgba(0, 0, 0, 0.18);
}

/* =========================================
   LOGO
   ========================================= */
.logo {
    display: block;
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin: 0 auto 20px;
    border: 3px solid #ffcc00;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 5px 15px rgba(0, 31, 63, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.logo:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 10px rgba(255, 204, 0, 0.45),
        0 0 25px rgba(255, 204, 0, 0.25);
}

/* =========================================
   FORM
   ========================================= */
#registerForm {
    width: 100%;
}

.form-group {
    width: 100%;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: #001f3f;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.15px;
}

.form-group input {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 52px;
    padding: 12px;
    margin: 0;
    background-color: #fafbfc;
    border: 1px solid rgba(0, 31, 63, 0.20);
    border-radius: 8px;
    color: #001f3f;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease;
}

.form-group input:hover {
    border-color: rgba(0, 31, 63, 0.55);
    box-shadow: 0 0 8px rgba(0, 31, 63, 0.10);
}

.form-group input::placeholder {
    color: #888888;
}

.form-group input:focus {
    border-color: #ffcc00;
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 2px rgba(255, 204, 0, 0.18),
        0 0 12px rgba(255, 204, 0, 0.45),
        0 0 22px rgba(0, 31, 63, 0.12);
}

/* =========================================
   REGISTER BUTTON
   ========================================= */
#register {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: linear-gradient(135deg, #185b9e 0%, #012c56 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 31, 63, 0.25);
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
}

#register:hover {
    background: linear-gradient(135deg, #003366 0%, #001f3f 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 18px rgba(0, 31, 63, 0.30),
        0 0 0 2px rgba(255, 204, 0, 0.25),
        0 0 18px rgba(255, 204, 0, 0.18);
}

#register:active {
    background: linear-gradient(135deg, #f0ca35 0%, #d8b529 100%);
    color: #001f3f;
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 31, 63, 0.25);
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
    h1 {
        font-size: 1.7rem;
        margin-top: 20px;
    }

    h2 {
        font-size: 1.15rem;
        margin-bottom: 15px;
    }

    .register-card {
        width: calc(100% - 30px);
        max-width: 500px;
        padding: 25px 18px;
        border-radius: 18px;
    }

    .logo {
        width: 90px;
        height: 90px;
        margin-bottom: 15px;
    }

    .form-group input {
        height: 50px;
        font-size: 0.95rem;
    }

    #register {
        padding: 13px;
        font-size: 1rem;
    }
}

/* =========================================
   PASSWORD UI (strength meter, rules, eye toggle)
   ========================================= */
.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-right: 48px; /* room for the eye button */
}

.toggle-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-eye:hover {
    background: rgba(0, 31, 63, 0.08);
    color: #001f3f;
}

.toggle-eye i {
    font-size: 15px;
}

/* Strength meter */
.strength-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.strength-track {
    flex: 1;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #94a3b8;
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.strength-label {
    min-width: 60px;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
}

/* Rules list */
.password-rules {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
    font-size: 0.78rem;
    color: #64748b;
}

.password-rules li {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.password-rules li i {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.password-rules li.valid {
    color: #16a34a;
}

.password-rules li.valid i {
    color: #16a34a;
}

.password-rules li.invalid {
    color: #dc3545;
}

.password-rules li.invalid i {
    color: #dc3545;
}

/* Confirm-password match feedback */
.form-group input.input-ok {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.form-group input.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}

/* Responsive tweak for the rules grid */
@media (max-width: 480px) {
    .password-rules {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   DARK MODE
   ========================================= */
[data-theme="dark"] .register-card {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] h1 { color: #f8fafc !important; }
[data-theme="dark"] h2 { color: #e2e8f0 !important; }
[data-theme="dark"] .form-group label { color: #e2e8f0 !important; }
[data-theme="dark"] .form-group input {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

[data-theme="dark"] .toggle-eye {
    color: #94a3b8;
}

[data-theme="dark"] .toggle-eye:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

[data-theme="dark"] .strength-track {
    background: #334155;
}

[data-theme="dark"] .strength-label {
    color: #94a3b8;
}

[data-theme="dark"] .password-rules {
    color: #94a3b8;
}

[data-theme="dark"] .password-rules li i {
    color: #64748b;
}

[data-theme="dark"] .password-rules li.valid {
    color: #4ade80;
}

[data-theme="dark"] .password-rules li.valid i {
    color: #4ade80;
}

[data-theme="dark"] .password-rules li.invalid {
    color: #f87171;
}

[data-theme="dark"] .password-rules li.invalid i {
    color: #f87171;
}