:root {
    --bg: #06070b;
    --panel: rgba(16, 18, 26, 0.72);
    --ink: #e4eaf2;
    --ink-strong: #ffffff;
    --line: rgba(255, 255, 255, 0.07);
    --dark: #0e1018;
    --muted: #8a9cb8;
    --brand: #e63946;
    --brand-light: #ff6b6b;
    --brand-dark: #d62e3b;
    --danger: #f43f5e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }

header { background: rgba(6,7,11,0.75); backdrop-filter: saturate(150%) blur(14px); color: #fff; padding: 16px 24px; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.nav { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; }
.logo-wrap { display: flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: 2px; font-size: 18px; text-decoration: none; color: #fff; }
.logo-wrap img { width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 3px 10px rgba(0,0,0,0.35)); }
nav ul { list-style: none; display: flex; gap: 30px; font-size: 14px; font-weight: 600; }
nav a { text-decoration: none; color: #f5f5f5; padding: 10px 4px; border-bottom: 2px solid transparent; transition: border-color 0.2s, color 0.2s; }
nav a:hover, nav a.active { color: #fff; border-color: var(--brand-light); }
.nav-icons { display: flex; gap: 18px; font-size: 14px; align-items: center; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; }
.nav-icon { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.nav-icon:hover { transform: translateY(-1px); }
.nav-menu-toggle { display: none; border: 0; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; width: 42px; height: 42px; border-radius: 999px; align-items: center; justify-content: center; gap: 4px; flex-direction: column; cursor: pointer; padding: 0; transition: background 0.2s, transform 0.2s; }
.nav-menu-toggle span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 999px; }
.nav-menu-toggle:hover { background: rgba(255,255,255,0.14); transform: translateY(-1px); }
.nav-menu-panel { display: none; position: absolute; top: calc(100% + 10px); right: 0; width: min(260px, 90vw); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; background: rgba(10,12,18,0.97); box-shadow: 0 18px 40px rgba(0,0,0,0.5); overflow: hidden; z-index: 30; }
.nav-menu-panel a { display: block; padding: 13px 16px; color: #fff; text-decoration: none; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.2s; }
.nav-menu-panel a:last-child { border-bottom: 0; }
.nav-menu-panel a:hover { background: rgba(230, 57, 70,0.1); color: var(--brand-light); }
.nav-menu-panel.is-hidden { display: none; }
.nav-menu-panel:not(.is-hidden) { display: block; }

main { max-width: 1180px; margin: 0 auto; padding: 56px 24px 72px; display: flex; justify-content: center; }
.register-panel { width: 100%; max-width: 640px; text-align: center; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.brand-mark img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(230, 57, 70,0.25)); }
.brand-mark span { font-size: 16px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--brand-light); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 6px; text-transform: uppercase; color: var(--ink-strong); }
.subtitle { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.title-line { width: 240px; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 57, 70,0.3), transparent); margin: 0 auto 32px; }

.form-card { border: 1px solid var(--line); border-radius: 18px; padding: 36px 32px 28px; text-align: left; background: var(--panel); box-shadow: 0 16px 40px rgba(0,0,0,0.4); backdrop-filter: blur(16px); }
.field-group { margin-bottom: 18px; }
.autocomplete-wrap { position: relative; }
.address-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); border: 1px solid var(--line); border-radius: 12px; background: rgba(14,16,24,0.97); box-shadow: 0 12px 28px rgba(0,0,0,0.5); max-height: 220px; overflow: auto; z-index: 20; }
.address-suggestions.is-hidden { display: none; }
.address-suggestion { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; cursor: pointer; font-size: 13px; color: var(--ink); line-height: 1.35; }
.address-suggestion + .address-suggestion { border-top: 1px solid var(--line); }
.address-suggestion:hover, .address-suggestion:focus { outline: none; background: rgba(230, 57, 70,0.08); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px; }
.toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; color: var(--muted); }
.toggle-password svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toggle-password:hover { color: var(--brand-light); }

label { display: block; font-size: 14px; margin-bottom: 8px; color: var(--ink-strong); font-weight: 600; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
    width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px;
    background: rgba(6,7,11,0.6); padding: 10px 14px; font-size: 14px; color: var(--ink);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
input.is-invalid { border-color: var(--danger); }
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="password"]:focus {
    outline: none; border-color: rgba(230, 57, 70,0.4); box-shadow: 0 0 0 3px rgba(230, 57, 70,0.08); background: rgba(14,16,24,0.8);
}
input.is-invalid:focus { border-color: var(--danger); }

.field-error { display: none; margin-top: 6px; font-size: 12px; color: var(--danger); }
.field-error.is-visible { display: block; }

input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="tel"]::placeholder, input[type="password"]::placeholder { color: #5a6a82; }
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none; }

.terms-box { margin: 8px 0 24px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6,7,11,0.4); padding: 14px; }
.terms-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink); line-height: 1.5; }

.register-btn {
    width: 100%; height: 50px; border: 0; border-radius: 12px;
    background: var(--brand); color: #fff;
    font-size: 15px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    cursor: pointer; margin-bottom: 26px; transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.register-btn:hover { transform: translateY(-2px); background: var(--brand-light); box-shadow: 0 8px 20px rgba(230, 57, 70,0.25); }

.foot-line { border-top: 1px solid var(--line); padding-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.foot-line a { color: var(--brand-light); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

footer { background: var(--dark); color: #8a9cb8; text-align: center; padding: 22px 16px 28px; font-size: 11px; }
footer span { display: block; margin-top: 4px; color: #7a8ca6; font-size: 10px; }

@media (max-width: 900px) {
    header { padding: 12px 14px; }
    .nav { flex-wrap: nowrap; justify-content: space-between; gap: 12px; }
    nav, .nav-icons, .nav-login-btn-link, .nav-contact-link, .nav-account-link, .nav-order-link { display: none !important; }
    .logo-wrap { font-size: 16px; letter-spacing: 1.6px; }
    .logo-wrap img { width: 48px; height: 48px; }
    .nav-menu-toggle { display: inline-flex !important; }
    main { padding: 40px 16px 56px; }
    .title-line { width: min(240px, 100%); }
    .form-card { padding: 28px 20px 22px; }
    .register-panel { max-width: 100%; }
}

@media (max-width: 640px) {
    .nav { gap: 10px; }
    .logo-wrap { gap: 10px; font-size: 15px; letter-spacing: 1.4px; }
    .logo-wrap img { width: 50px; height: 50px; }
    .brand-mark { flex-direction: column; gap: 8px; }
    .brand-mark img { width: 46px; height: 46px; }
    h1 { font-size: 18px; letter-spacing: 1px; }
    .subtitle { font-size: 11px; }
    .form-card { padding: 22px 16px 20px; border-radius: 16px; }
    label { font-size: 13px; }
    input[type="text"], input[type="email"], input[type="tel"], input[type="password"] { height: 46px; font-size: 16px; }
    .terms-box { padding: 10px; margin-bottom: 18px; }
    .terms-check { font-size: 13px; line-height: 1.5; }
    .register-btn { height: 48px; font-size: 14px; }
    .foot-line { font-size: 11px; }
    footer { padding: 18px 14px 24px; }
}

/* Footer */
.site-footer { background: #06070b; color: #8a9cb8; padding: 28px 20px 18px;  margin-top: 24px; }
.site-footer .footer-wrap { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 24px; }
.site-footer .footer-col h3, .site-footer .footer-col h4 { margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; color: #fff; }
.site-footer .footer-col h3 { font-size: 16px; }
.site-footer .footer-col h4 { font-size: 12px; }
.site-footer .footer-col p { margin-bottom: 8px; font-size: 12px; line-height: 1.5; color: #b0bfd4; }
.site-footer .footer-note { color: #7a8ca6; }
.site-footer a { color: var(--brand-light); text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom { max-width: 1180px; margin: 14px auto 0; padding-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 11px; color: #7a8ca6; }
@media (max-width: 900px) { .site-footer .footer-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .site-footer .footer-wrap { grid-template-columns: 1fr; } }

.nav-login-btn-link { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border: 1px solid rgba(230, 57, 70,0.5); border-radius: 10px; color: var(--brand-light); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: rgba(230, 57, 70,0.08); transition: all 0.25s; }
.nav-login-btn-link:hover { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.nav-contact-link { color: #fff; text-decoration: none; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; padding: 6px 8px; }
.is-hidden { display: none !important; }

/* Terms Modal */
body.terms-modal-open { overflow: hidden; }
.terms-modal-backdrop { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(0,0,0,0.7); }
.terms-modal-backdrop.is-open { display: flex; }
.terms-modal { width: min(760px, 100%); max-height: min(88vh, 760px); border-radius: 18px; overflow: hidden; background: rgba(14,16,24,0.97); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,0.6); display: flex; flex-direction: column; }
.terms-modal-head { padding: 18px 20px; background: linear-gradient(92deg, rgba(230, 57, 70,0.12), rgba(214, 46, 59,0.08)); border-bottom: 1px solid var(--line); color: #fff; }
.terms-modal-head h2 { font-size: 17px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; color: var(--brand-light); }
.terms-modal-head p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.terms-modal-body { padding: 18px 20px; overflow-y: auto; height: min(52vh, 420px); border-bottom: 1px solid var(--line); line-height: 1.65; font-size: 13px; color: var(--ink); }
.terms-modal-body h3 { margin-top: 14px; margin-bottom: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--brand-light); }
.terms-modal-body p, .terms-modal-body ul { margin-bottom: 8px; }
.terms-modal-body ul { padding-left: 18px; }
.terms-modal-foot { padding: 14px 20px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.terms-scroll-note { font-size: 12px; color: var(--muted); }
.terms-modal-actions { display: flex; gap: 10px; }
.terms-btn { border: 0; background: var(--brand); color: #fff; border-radius: 10px; padding: 10px 18px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; cursor: pointer; transition: all 0.2s; }
.terms-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(230, 57, 70,0.3); }
.terms-btn:disabled { cursor: not-allowed; opacity: 0.35; transform: none; }
.terms-btn-ghost { background: rgba(255,255,255,0.06); color: var(--ink); border: 1px solid var(--line); }
.terms-btn-ghost:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 640px) {
    .terms-modal-backdrop { padding: 12px; }
    .terms-modal { max-height: 92vh; }
    .terms-modal-head { padding: 14px; }
    .terms-modal-head h2 { font-size: 15px; }
    .terms-modal-body { padding: 14px; height: min(56vh, 420px); font-size: 12px; }
    .terms-modal-body h3 { font-size: 12px; }
    .terms-modal-foot { padding: 12px 14px 14px; flex-direction: column; align-items: stretch; }
    .terms-modal-actions { width: 100%; }
    .terms-btn { flex: 1; text-align: center; font-size: 11px; }
}
