
/* TJR R&D - AEON-inspired theme */
:root{
  --bg:#070B12;
  --panel:#0B1220;
  --muted:#9FB3C8;
  --text:#E6F0FF;
  --accent:#39CBFF;
  --accent-2:#0C6CFF;
  --danger:#ff4d4f;
  --success:#15c27a;
  --focus: rgba(57,203,255,.35);
  --radius:14px;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif}
html[lang="ar"] body{font-family:'Tajawal','Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif}
a{color:var(--accent);text-decoration:none}
.container{max-width:960px;margin:0 auto;padding:20px}
header{
  position:sticky;top:0;z-index:50;
  backdrop-filter:saturate(120%) blur(10px);
  background:rgba(7,11,18,.7);border-bottom:1px solid rgba(255,255,255,.06);
  transition:transform .3s ease,opacity .3s ease;
}
.lang-bar{display:flex;justify-content:center;padding:16px 0}
.lang-switch{display:flex;gap:16px;align-items:center;justify-content:center;flex-wrap:wrap}
.lang-switch button{padding:12px 22px;border-radius:999px;border:1px solid rgba(255,255,255,.16);background:transparent;color:var(--text);cursor:pointer;font-size:16px;font-weight:600;min-width:72px;transition:background .2s ease,border-color .2s ease,transform .2s ease}
.lang-switch button:hover{transform:translateY(-1px);border-color:rgba(57,203,255,.4)}
.lang-switch button.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#051427;border:none;box-shadow:var(--shadow)}
.btn{
  display:inline-flex;gap:10px;align-items:center;justify-content:center;
  padding:12px 18px;border-radius:12px;background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#051427;font-weight:700;border:none;cursor:pointer;box-shadow: var(--shadow);
}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,.12);color:var(--text);box-shadow:none}
.btn:focus{outline:3px solid var(--focus)}
.main-content{
  padding:48px 0 64px;background:
  radial-gradient(1000px 400px at 80% -50%, rgba(12,108,255,.35), transparent 60%),
  radial-gradient(900px 400px at -10% 40%, rgba(57,203,255,.25), transparent 60%);
  min-height:100vh;
}
.intro{text-align:center}
.intro h1{font-size:38px;margin:0 0 12px}
.intro p{max-width:760px;margin:0 auto;color:var(--muted);font-size:18px}
.form-section{margin-top:32px}
.card{background:var(--panel);border:1px solid rgba(255,255,255,.08);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}
.grid{display:grid;gap:18px}
.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:900px){.grid.cols-3,.grid.cols-2{grid-template-columns:1fr}}
/* Form */
form{width:100%}
.form-step{display:none}
.form-step.active{display:block}
label{display:block;margin:10px 0 8px;font-weight:600}
input[type="text"], input[type="email"], input[type="number"], select, textarea{
  width:100%;padding:12px 14px;border-radius:12px;background:#0B1728;border:1px solid rgba(255,255,255,.12);
  color:var(--text);
}
textarea{min-height:120px;resize:vertical}
.helper{color:var(--muted);font-size:13px;margin-top:4px}
.required::after{content:" *";color:var(--accent)}
fieldset{border:none;padding:0;margin:0}
.options{display:grid;gap:10px}
.options.inline{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
.option{padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:12px;display:flex;gap:10px;align-items:center;background:#0B1728}
.option input{transform:scale(1.2)}
.other-field{margin-top:10px}
.other-field label{margin-top:0}
.other-field[hidden]{display:none!important}
.progress{height:8px;background:rgba(255,255,255,.08);border-radius:999px;overflow:hidden}
.progress .bar{height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent-2));transition:width .3s ease}
.form-actions{display:flex;gap:10px;justify-content:space-between;margin-top:18px;flex-wrap:wrap}
.error{color:var(--danger);font-size:13px;margin-top:6px}
.submit-status{margin-top:16px;padding:14px 16px;border-radius:12px;font-weight:600;line-height:1.5;background:rgba(57,203,255,.12);color:var(--accent);border:1px solid rgba(57,203,255,.35)}
.submit-status[data-state="success"]{background:rgba(21,194,122,.14);color:var(--success);border-color:rgba(21,194,122,.45)}
.submit-status[data-state="error"]{background:rgba(255,77,79,.14);color:var(--danger);border-color:rgba(255,77,79,.45)}
.submit-status[hidden]{display:none!important}
.share-actions{margin-top:18px;display:grid;gap:14px}
.share-heading{margin:0;font-weight:700;font-size:16px;color:var(--success)}
.share-subtitle{margin:0;font-size:14px;color:var(--muted)}
.share-buttons{display:flex;flex-wrap:wrap;gap:10px}
.share-pill{display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;border-radius:999px;font-weight:600;background:rgba(57,203,255,.16);color:var(--accent);border:1px solid rgba(57,203,255,.35);transition:background .2s ease,transform .2s ease}
.share-pill:hover,.share-pill:focus-visible{background:rgba(57,203,255,.22);transform:translateY(-1px);outline:none}
.share-secondary-actions{display:flex;flex-wrap:wrap;gap:10px}
.share-secondary-actions .btn{flex:1 1 180px;min-width:180px;justify-content:center}
/* RTL support */
[dir="rtl"] body,[dir="rtl"] .container{direction:rtl}
[dir="rtl"] .lang-switch{flex-direction:row-reverse}
small.hint{display:block;color:var(--muted);margin-top:4px}
hr.sep{border:none;border-top:1px solid rgba(255,255,255,.08);margin:24px 0}

body.form-focused header{display:none}
body.form-focused .intro{display:none}
body.form-focused .main-content{padding-top:24px}

.country-field{position:relative;margin-top:6px}
.country-input{display:flex;align-items:center;gap:6px;padding:4px;border-radius:12px;background:#0B1728;border:1px solid rgba(255,255,255,.12);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.country-input:focus-within{border-color:rgba(57,203,255,.6);box-shadow:0 0 0 4px var(--focus);transform:translateY(-1px)}
.country-input-field{flex:1 1 auto;min-width:0;background:transparent!important;border:none!important;color:var(--text);padding:10px 12px;font-size:16px;line-height:1.4}
.country-input-field::placeholder{color:rgba(255,255,255,.45)}
.country-input-field:focus{outline:none}
.country-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(57,203,255,.08);color:var(--accent);cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease;flex:0 0 auto;padding:0}
.country-toggle svg{display:block}
.country-toggle:hover,.country-toggle:focus-visible{background:rgba(57,203,255,.18);border-color:rgba(57,203,255,.4);transform:translateY(-1px);outline:none}
.country-field.open .country-toggle{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#051427;border-color:transparent}
.country-dropdown{position:absolute;left:0;right:0;top:calc(100% + 10px);padding:14px;border-radius:14px;background:rgba(9,17,30,.96);border:1px solid rgba(57,203,255,.25);box-shadow:0 18px 60px rgba(5,15,28,.45);max-height:320px;overflow-y:auto;backdrop-filter:blur(16px);opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .18s ease,transform .18s ease;z-index:40;display:flex;flex-direction:column;gap:10px;scroll-padding-top:26px}
.country-dropdown.open{opacity:1;transform:translateY(0);pointer-events:auto}
.country-dropdown::-webkit-scrollbar{width:6px}
.country-dropdown::-webkit-scrollbar-thumb{background:rgba(57,203,255,.35);border-radius:999px}
.country-options{display:flex;flex-direction:column;gap:10px}
.country-group{display:flex;flex-direction:column;gap:6px}
.country-group+.country-group{margin-top:4px}
.country-group-heading{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);padding:4px 10px;border-radius:999px;background:rgba(57,203,255,.08);border:1px solid rgba(57,203,255,.12);align-self:flex-start;position:sticky;top:0;z-index:1;backdrop-filter:blur(12px)}
.country-group-options{display:flex;flex-direction:column;gap:8px}
.country-option{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:12px 14px;border-radius:12px;background:rgba(11,23,40,.78);border:1px solid rgba(255,255,255,.04);color:var(--text);font-size:15px;text-align:left;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;box-shadow:0 8px 22px rgba(5,15,28,.28)}
.country-option[aria-selected="true"],.country-option:hover,.country-option.active{background:rgba(57,203,255,.18);border-color:rgba(57,203,255,.45);transform:translateY(-1px);box-shadow:0 14px 34px rgba(5,15,28,.38)}
.country-option-label{font-weight:600}
.country-option-secondary{font-size:12px;color:var(--muted)}
.country-option mark{background:transparent;color:var(--accent);font-weight:700}
.country-empty,.country-hint{margin:0;font-size:13px;color:var(--muted);padding:4px 2px}
.country-empty{font-weight:600}
.country-hint{display:flex;align-items:center;gap:6px}
.country-hint::before{content:"\2600";font-size:14px;color:var(--accent);opacity:.8}
.error[hidden]{display:none!important}

.criteria-row{margin-bottom:26px;display:grid;gap:12px}
.criteria-header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.criteria-title{font-weight:600;font-size:16px;margin:0}
.criteria-value{font-size:14px;color:var(--muted);min-width:72px;text-align:right}
.criteria-slider{display:flex;flex-direction:column;gap:10px}
.criteria-slider input[type="range"]{appearance:none;width:100%;height:8px;border-radius:999px;background:rgba(255,255,255,.16);outline:none}
.criteria-slider input[type="range"]::-webkit-slider-thumb{appearance:none;width:26px;height:26px;border-radius:50%;background:linear-gradient(90deg,var(--accent),var(--accent-2));box-shadow:0 0 0 4px rgba(57,203,255,.25);cursor:pointer}
.criteria-slider input[type="range"]::-moz-range-thumb{width:26px;height:26px;border:none;border-radius:50%;background:linear-gradient(90deg,var(--accent),var(--accent-2));box-shadow:0 0 0 4px rgba(57,203,255,.25);cursor:pointer}
.criteria-scale{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);font-weight:600}
.criteria-scale span{padding:2px 6px;border-radius:999px;transition:color .2s ease,background .2s ease}
.criteria-scale span.active{background:rgba(57,203,255,.16);color:var(--accent)}
[dir="rtl"] .criteria-scale{flex-direction:row-reverse}
[dir="rtl"] .criteria-value{text-align:left}

@media (max-width:720px){
  .container{padding:16px}
  .intro h1{font-size:30px}
  .intro p{font-size:16px}
  .card{padding:18px}
  .form-actions{flex-direction:column}
  .form-actions .btn{width:100%}
  .criteria-header{flex-direction:column;align-items:flex-start}
  .criteria-value{text-align:left}
  .country-dropdown{max-height:260px;padding:12px;top:calc(100% + 8px)}
  .country-option{padding:12px}
}

@media (prefers-reduced-motion:reduce){
  .country-input,.country-toggle,.country-option,.country-dropdown{transition:none}
}
