:root{
  --primary:#0d6efd; --ink:#1a1a2e; --muted:#6c757d; --accent:#ffd966;
  --radius:16px; --card-shadow:0 14px 40px rgba(13,110,253,0.08);
}
*{box-sizing:border-box}
html,body{height:100%}
body{font-family:'Vazir',sans-serif;margin:0;background:linear-gradient(135deg,#eaf4ff 0%,#dbeeff 100%);color:var(--ink);-webkit-font-smoothing:antialiased;min-height:100vh}
.fade-in{animation:fadeIn .36s ease both}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* canvas underlay: ensure it's behind content */
#note-canvas{position:fixed;top:0;left:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:1}

/* Header */
.site-header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;background:rgba(255,255,255,0.86);backdrop-filter:blur(6px);box-shadow:var(--card-shadow);position:sticky;top:0;z-index:30;border-bottom:1px solid rgba(13,110,253,0.03)}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:40px;width:auto;max-width:150px;object-fit:contain;border-radius:10px}
.site-title{font-size:18px;font-weight:800;color:var(--primary)}

/* nav */
.main-nav a{margin-left:14px;text-decoration:none;color:var(--ink);padding:8px 12px;border-radius:10px;transition:all .2s ease}
.main-nav a:hover{background:#eef8ff;color:var(--primary);transform:translateY(-3px)}

/* layout */
.container{max-width:1200px;margin:20px auto;padding:18px;position:relative;z-index:2}
.wrap{max-width:980px;margin:18px auto;padding:18px;position:relative;z-index:2}
.hero{background:white;padding:36px;border-radius:18px;box-shadow:var(--card-shadow);text-align:center;transition:transform .22s ease}
.hero:hover{transform:translateY(-6px)}
.hero h1{font-size:30px;margin:6px 0}
.hero p{color:var(--muted);margin:8px 0 18px}
.hero-actions{display:flex;gap:12px;justify-content:center;align-items:center;flex-wrap:wrap}
.btn{background:var(--primary);color:white;padding:10px 18px;border-radius:12px;border:none;cursor:pointer;font-weight:700;box-shadow:0 8px 20px rgba(13,110,253,0.14);transition:transform .15s ease,box-shadow .15s}
.btn.ghost{background:transparent;color:var(--primary);border:2px solid rgba(13,110,253,0.08);box-shadow:none}

/* arts: animated svgs */
.arts{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:14px;margin:26px 0}
.art{background:white;padding:16px;border-radius:14px;box-shadow:var(--card-shadow);text-align:center;transition:transform .25s,box-shadow .25s;overflow:visible}
.art:hover{transform:translateY(-8px);box-shadow:0 26px 80px rgba(13,110,253,0.06)}
.art svg{width:64px;height:64px;margin-bottom:8px;transition:transform .6s cubic-bezier(.2,.9,.2,1)}
.art:hover svg{transform:rotate(-8deg) scale(1.04)}
.art-name{font-weight:700;font-size:14px}

/* why-us */
.why-us{background:white;border-radius:14px;padding:20px;box-shadow:var(--card-shadow);margin:20px 0}
.why-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.why-list li{padding:10px 12px;border-radius:10px;background:linear-gradient(90deg,#f8fbff,#ffffff);font-weight:600;color:var(--muted)}

/* projects */
.projects{background:white;border-radius:14px;padding:16px;box-shadow:var(--card-shadow);margin:18px 0}
.projects-list .project{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #f1f6fb}
.projects-list .project:last-child{border-bottom:none}

/* card */
.card{background:white;border-radius:14px;padding:18px;box-shadow:var(--card-shadow);margin-bottom:18px}

/* search (artists) */
.search-bar{display:flex;gap:8px;margin-bottom:12px}
.search-bar input{flex:1;padding:10px;border-radius:10px;border:1px solid #e6f0ff}

/* modal */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.5);display:none;align-items:center;justify-content:center;padding:20px;z-index:120}
.modal-content{background:white;padding:18px;border-radius:12px;max-width:520px;width:100%;box-shadow:0 30px 70px rgba(10,50,120,0.08)}
.form-row{display:flex;gap:8px}
.form-group{margin:10px 0;text-align:right}
.form-group label{display:block;margin-bottom:6px;font-weight:700}
.form-group input, .form-group select, .form-group textarea{width:100%;padding:10px;border-radius:10px;border:1px solid #e6f0ff}

/* footer */
.footer{margin:30px 0;text-align:center;color:var(--muted);font-size:13px}

/* responsive */
@media (max-width:720px){
  .main-nav{display:none}
  .hero h1{font-size:22px}
  .arts{grid-template-columns:repeat(3,1fr)}
}


/* ===== Dark Mode (Pro) ===== */
:root{
  --bg-dark:#0b1220; --surface-dark:#0f172a; --ink-dark:#e5e7eb; --muted-dark:#9ca3af; --primary-dark:#60a5fa;
}
body.theme-dark{background:linear-gradient(135deg,#0b1220 0%,#0f172a 100%); color:var(--ink-dark)}
body.theme-dark .site-header{background:rgba(15,23,42,0.86); border-bottom-color:rgba(96,165,250,0.1)}
body.theme-dark .main-nav a{color:var(--ink-dark)}
body.theme-dark .main-nav a:hover{background:#0b2546; color:var(--primary-dark)}
body.theme-dark .hero, body.theme-dark .art, body.theme-dark .card, body.theme-dark .why-us, body.theme-dark .projects,
body.theme-dark .list-box, body.theme-dark .stats-box{background:var(--surface-dark); box-shadow:0 14px 40px rgba(0,0,0,0.35)}
body.theme-dark .why-list li{background:linear-gradient(90deg,#0f172a,#111827)}
body.theme-dark .muted{color:var(--muted-dark)}
body.theme-dark .btn{background:var(--primary-dark)}
body.theme-dark .btn.ghost{color:var(--primary-dark); border-color:rgba(96,165,250,0.25)}
body.theme-dark .search-bar input, body.theme-dark .form-group input, body.theme-dark .form-group select, body.theme-dark .form-group textarea{
  background:#0b1220; border-color:#1f2a44; color:var(--ink-dark)
}

/* Floating Theme Toggle */
.theme-toggle{
  position:fixed; left:16px; bottom:16px; z-index:1200; background:white; border:1px solid #e6f0ff; color:var(--primary);
  padding:10px 12px; border-radius:999px; box-shadow:0 10px 30px rgba(13,110,253,0.18); cursor:pointer; user-select:none
}
body.theme-dark .theme-toggle{background:#0f172a; color:var(--ink-dark); border-color:#22314f}

.form-progress{transition:width .25s ease}


/* === Dark Mode Fix: Buttons & Links (Final) === */
body.theme-dark .btn {
  background: var(--primary-dark);
  color: #fff !important;
  border: none;
  box-shadow: 0 8px 20px rgba(96,165,250,0.25);
}

body.theme-dark .btn:hover {
  background: #3b82f6;
  color: #fff !important;
}

body.theme-dark .btn.ghost {
  background: transparent;
  border: 1px solid rgba(96,165,250,0.4);
  color: var(--primary-dark) !important;
}

body.theme-dark .btn.ghost:hover {
  background: rgba(96,165,250,0.15);
  color: #fff !important;
}

body.theme-dark a.btn {
  color: #fff !important;
}

body.theme-dark a.btn:hover {
  color: #fff !important;
}


/* =====================================================
   PRO THEME — Royal Blue (آبی درباری)
   Palette refs:
   --royal-700: #1d33c7  | --royal-600: #2542e0 | --royal-500: #2b4bf2
   --royal-400: #4762ff  | --royal-300: #8ca3ff | --royal-200: #c9d4ff
===================================================== */
:root{
  --primary:#2b4bf2;          /* آبی درباری اصلی */
  --primary-600:#2542e0;
  --primary-700:#1d33c7;
  --primary-400:#4762ff;
  --primary-200:#c9d4ff;
  --accent:#ffd966;
  --ink:#0f172a;
  --muted:#6b7280;
  --card:#ffffff;
  --glass: rgba(255,255,255,0.14);
  --glass-border: rgba(43,75,242,0.25);
  --shadow-pro: 0 16px 50px rgba(43,75,242,0.18);
}

/* Background & structure (light) */
body{
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(43,75,242,0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(142,156,255,0.12), transparent 60%),
    linear-gradient(135deg, #eef3ff 0%, #f7f9ff 100%);
  color: var(--ink);
}

/* Header glass */
.site-header{
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43,75,242,0.08);
  box-shadow: var(--shadow-pro);
}

/* Buttons — Pro (Glass + Gradient) */
.btn{
  background: linear-gradient(180deg, var(--primary-400), var(--primary));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(43,75,242,0.28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 14px 36px rgba(43,75,242,0.34); }
.btn:active{ transform: translateY(0); filter: brightness(.95); }

.btn.ghost{
  background: rgba(43,75,242,0.06);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.btn.ghost:hover{ background: rgba(43,75,242,0.12); color:#fff; }

/* Theme toggle (floating) */
.theme-toggle{
  position:fixed; left:16px; bottom:16px; z-index:1200;
  background: rgba(255,255,255,0.75);
  color: var(--primary);
  border: 1px solid rgba(43,75,242,0.15);
  padding:10px 12px; border-radius:999px;
  box-shadow: var(--shadow-pro); cursor:pointer; user-select:none;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.theme-toggle:active{ transform: rotate(-12deg) scale(.98); }
body.theme-dark .theme-toggle{ background: rgba(17,24,39,0.7); color:#e5e7eb; border-color: rgba(96,165,250,0.2); }

/* Cards, hero, art tiles — Pro */
.card, .hero, .art, .projects, .why-us{
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(43,75,242,0.06);
  box-shadow: var(--shadow-pro);
}
.art:hover{ transform: translateY(-6px); box-shadow: 0 24px 70px rgba(43,75,242,0.20); }

/* Inputs */
.form-group input, .form-group select, .form-group textarea, .search-bar input{
  border: 1px solid rgba(43,75,242,0.18);
  background: rgba(255,255,255,0.9);
}

/* Scrollbar */
*{ scrollbar-width: thin; scrollbar-color: var(--primary) #e9efff; }
::-webkit-scrollbar{ height:10px; width:10px; }
::-webkit-scrollbar-track{ background:#e9efff; border-radius:10px; }
::-webkit-scrollbar-thumb{ background: linear-gradient(180deg, var(--primary-400), var(--primary)); border-radius:10px; }

/* Chat bubbles */
.msg{ max-width: 78%; padding:10px 12px; border-radius:14px; margin:8px 10px; box-shadow: 0 8px 24px rgba(43,75,242,0.08); animation: msgIn .2s ease both; }
.msg.me{ margin-left:auto; background: linear-gradient(180deg, var(--primary-400), var(--primary)); color:#fff; }
.msg.them{ margin-right:auto; background:#ffffff; border:1px solid rgba(43,75,242,0.08); }
.msg .muted{ opacity:.8 }

@keyframes msgIn{ from{ opacity:0; transform: translateY(6px) scale(.98);} to{ opacity:1; transform:none;} }

/* Toasts */
#toast-root{ position: fixed; top:16px; right:16px; z-index:1300; display:flex; flex-direction:column; gap:10px; }
.toast{ background:#0b1220; color:#fff; padding:10px 14px; border-radius:12px; box-shadow: 0 16px 40px rgba(0,0,0,0.25); border:1px solid rgba(96,165,250,0.22); }
.toast.success{ background: linear-gradient(180deg, #10b981, #059669); }
.toast.error{ background: linear-gradient(180deg, #ef4444, #b91c1c); }
.toast.info{ background: linear-gradient(180deg, var(--primary-400), var(--primary)); }

/* Dark theme harmony */
:root{
  --bg-dark:#0b1220; --surface-dark:#0f172a; --ink-dark:#e5e7eb; --muted-dark:#9ca3af; --primary-dark:#60a5fa;
}
body.theme-dark{ background: radial-gradient(900px 600px at 100% -10%, rgba(96,165,250,0.09), transparent 60%), linear-gradient(135deg,#0b1220 0%,#0f172a 100%); color:var(--ink-dark); }
body.theme-dark .main-nav a{ color:var(--ink-dark) }
body.theme-dark .main-nav a:hover{ background:#0b2546; color:var(--primary-dark) }
body.theme-dark .hero, body.theme-dark .art, body.theme-dark .card, body.theme-dark .why-us, body.theme-dark .projects{ background: rgba(17,24,39,0.72); border-color: rgba(96,165,250,0.16); box-shadow: 0 16px 50px rgba(0,0,0,0.35); }
body.theme-dark .why-list li{ background: linear-gradient(90deg,#0f172a,#111827) }

/* Dark mode buttons — ensure readable text */
body.theme-dark .btn{
  background: linear-gradient(180deg, var(--primary-dark), #3b82f6);
  color: #fff !important;
  border: none;
  box-shadow: 0 12px 28px rgba(59,130,246,0.35);
}
body.theme-dark .btn:hover{ filter:brightness(1.06); }
body.theme-dark .btn.ghost{
  background: transparent;
  border: 1px solid rgba(96,165,250,0.35);
  color: var(--primary-dark) !important;
}
body.theme-dark .btn.ghost:hover{ background: rgba(96,165,250,0.16); color:#fff !important; }
body.theme-dark a.btn{ color:#fff !important; }


/* Dark-mode polish for auth modal */
body.theme-dark .modal-overlay{
  background:rgba(0,0,0,0.78);
}

body.theme-dark .modal-content{
  background:var(--surface-dark);
  color:var(--ink-dark);
  box-shadow:0 26px 70px rgba(0,0,0,0.75);
}

body.theme-dark .modal-content h3{
  color:var(--ink-dark);
}



/* ==== UI6 Dark Mode for Signup Modal ==== */
body.theme-dark .modal-content{
  background:#0d1220;
  color:#e5e7eb;
  box-shadow:0 25px 70px rgba(0,0,0,0.8);
}
body.theme-dark .modal-content input,
body.theme-dark .modal-content select,
body.theme-dark .modal-content textarea{
  background:#0b1120 !important;
  color:#e5e7eb !important;
  border:1px solid #1e293b !important;
}
body.theme-dark .modal-content input::placeholder,
body.theme-dark .modal-content textarea::placeholder{
  color:#94a3b8 !important;
}
body.theme-dark .modal-content label,
body.theme-dark .modal-content h3{
  color:#e5e7eb !important;
}
body.theme-dark .role-card{
  background:#1e293b;
  color:#e5e7eb;
  border:1px solid #334155;
}
body.theme-dark .role-card.active{
  background:#3b82f6;
  color:white;
  border:none;
}
body.theme-dark .modal-content .btn{
  background:#2563eb;
  color:white;
}
body.theme-dark .error-text{
  color:#f87171 !important;
}

/* ===== Profile PRO bits ===== */
.chip{
  display:inline-flex;align-items:center;gap:4px;
  padding:4px 8px;border-radius:999px;
  background:rgba(43,75,242,0.08);
  border:1px solid rgba(43,75,242,0.18);
  font-size:12px;font-weight:700;color:var(--text);
}
.stat-box{
  background:var(--card);
  border:1px solid rgba(43,75,242,0.08);
  border-radius:12px;padding:10px;text-align:center;
}
.stat-num{ font-size:20px;font-weight:900;color:var(--primary); }
body.theme-dark .chip{ background:rgba(96,165,250,0.12); border-color:rgba(96,165,250,0.22); }


/* Seven Arts blog articles */
.blog-article{padding:18px;margin-bottom:14px}
.blog-article h3{margin-top:0}
.blog-article h4{margin:10px 0 6px}



/* Layout helpers */
.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:14px;
}

/* Mobile nav button */
.mobile-nav-btn{
  display:none;
}

/* Stronger responsive tweaks */
@media (max-width:720px){
  .site-header{
    padding:10px 14px;
  }
  .container,
  .wrap{
    padding:12px;
    margin:10px auto;
  }
  .hero{
    padding:22px;
  }
  .grid-2{
    grid-template-columns:1fr;
  }
  .search-bar{
    flex-direction:column;
  }
  .projects-list .project{
    flex-direction:column;
    align-items:flex-start;
  }
  .mobile-nav-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-right:auto;
    background:transparent;
    border:1px solid rgba(13,110,253,0.3);
    border-radius:999px;
    padding:6px 10px;
    font-size:20px;
    color:var(--primary);
  }
  .main-nav{
    display:none;
    position:absolute;
    right:16px;
    top:64px;
    background:#ffffff;
    padding:10px 16px;
    border-radius:14px;
    box-shadow:0 18px 40px rgba(15,23,42,0.18);
    flex-direction:column;
    gap:4px;
  }
  .main-nav.nav-open{
    display:flex;
  }
}
