/* Reset & variables */
:root{
  --bg-1: #0f1724;
  --bg-2: #071029;
  --card: rgba(255,255,255,0.06);
  --glass: rgba(255,255,255,0.04);
  --accent: linear-gradient(90deg,#6ee7b7,#60a5fa);
  --muted: #9aa4b2;
  --radius: 14px;
  /* default header height (will be updated by JS on load/resize) */
  --site-header-height: 72px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(96,165,250,0.06), transparent), linear-gradient(180deg,var(--bg-1),var(--bg-2));
  color:#e6eef6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.6;
  letter-spacing:0.01em;
}
main{flex:1;padding-top:var(--site-header-height)}
.container{max-width:1100px;margin:0 auto;padding:2rem}
.site-header{position:sticky;top:0;backdrop-filter:blur(6px);background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent);border-bottom:1px solid rgba(255,255,255,0.03);z-index:1000;height:60px;}
.nav{display:flex;align-items:center;justify-content:space-between;padding:0.5rem 1rem;height:60px;}
.header-menu{font-size:0.8rem !important;flex-shrink:0;}
.header-menu .btn{padding:0.4rem 0.7rem;font-size:0.8rem;white-space:nowrap;}
.logo{font-size:1rem;gap:0.5rem;}
.logo-img{height:36px !important;}
.logo-text{font-size:0.95rem;}
.logo{font-weight:700;letter-spacing:0.4px;color:#fff;text-decoration:none;font-size:1.1rem}
.hero{display:flex;align-items:flex-start;justify-content:center;padding:2rem 1rem 4rem;min-height:auto;flex:1}
.hero-card{width:100%;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border:1px solid rgba(255,255,255,0.04);box-shadow:0 8px 20px rgba(2,6,23,0.45);padding:3rem;border-radius:var(--radius);backdrop-filter: blur(6px);margin-bottom:0;position:relative;z-index:2;min-height:auto;height:auto}
.hero h1{font-size:2.4rem;margin-bottom:0.5rem;font-weight:800;letter-spacing:-0.02em}
.lead{color:var(--muted);margin-bottom:1.25rem;font-size:1.05rem;line-height:1.7}
p{line-height:1.7}
h1,h2,h3,h4,h5,h6{font-weight:700;letter-spacing:-0.01em;line-height:1.2}
.actions{display:flex;gap:0.75rem;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;gap:0.6rem;padding:0.7rem 1rem;border-radius:10px;text-decoration:none;font-weight:600;transition:all 200ms ease;letter-spacing:0.01em}
.btn.primary{background:var(--accent);color:#061025;box-shadow:0 6px 18px rgba(96,165,250,0.15);}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted)}
.btn:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(2,6,23,0.6)}

/* Navigation Dropdown Menu */
.nav-dropdown{position:relative;display:inline-block}
.nav-dropdown-trigger{cursor:pointer;user-select:none}
.nav-dropdown-menu{position:absolute;top:100%;left:50%;transform:translateX(-50%);min-width:140px;background:linear-gradient(180deg,#1a1a2e,#16213e);border:1px solid rgba(139,92,246,0.3);border-radius:10px;padding:0.5rem 0;opacity:0;visibility:hidden;transition:all 0.2s ease;z-index:1001;margin-top:0.5rem;box-shadow:0 8px 25px rgba(0,0,0,0.4)}
.nav-dropdown:hover .nav-dropdown-menu{opacity:1;visibility:visible;margin-top:0.25rem}
.nav-dropdown-menu a{display:block;padding:0.6rem 1rem;color:#e2e8f0;text-decoration:none;font-size:0.85rem;transition:all 0.15s}
.nav-dropdown-menu a:hover{background:rgba(139,92,246,0.2);color:#8b5cf6}

.site-footer{padding:2rem 0;text-align:center;color:var(--muted);font-size:0.95rem;margin-top:auto;background:rgba(2,6,23,0.12);border-top:1px solid rgba(255,255,255,0.02);position:relative;z-index:1}

/* Links */
a{color:inherit}

/* Utilities */
@media (max-width:700px){
  .hero h1{font-size:1.8rem}
  .container{padding:1rem}
  .hero-card{padding:2rem}
}

/* small accent animations */
@keyframes float {
  0%{transform:translateY(0)}
  50%{transform:translateY(-6px)}
  100%{transform:translateY(0)}
}
.logo{animation:float 6s ease-in-out infinite;display:flex;align-items:center;gap:0.75rem}
.logo-img{
  height:44px;
  width:auto;
  border-radius:8px;
  box-shadow:0 6px 18px rgba(2,6,23,0.5);
  filter: drop-shadow(0 0 15px rgba(110,231,183,0.6)) drop-shadow(0 0 8px rgba(96,165,250,0.4)) brightness(1.2) !important;
  animation: logo-glow 3s ease-in-out infinite !important;
}
@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(110,231,183,0.6)) drop-shadow(0 0 8px rgba(96,165,250,0.4)) brightness(1.2) !important; }
  50% { filter: drop-shadow(0 0 25px rgba(110,231,183,0.9)) drop-shadow(0 0 15px rgba(96,165,250,0.7)) brightness(1.4) !important; }
}
.logo-text{
  font-weight:700;
  background: linear-gradient(90deg, #6ee7b7, #60a5fa, #a78bfa, #6ee7b7);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 4s ease-in-out infinite;
}
@keyframes text-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (max-width:700px){
  .logo-img{height:34px}
}

/* Global animation / accessibility vars */
:root{
  --anim-fast: 160ms;
  --anim-medium: 280ms;
  --anim-ease: cubic-bezier(.2,.9,.2,1);
}

/* Smooth scrolling (user preference respected by browsers) */
html { scroll-behavior: smooth }

/* Button ripple */
.btn{position:relative;overflow:hidden}
.btn .ripple{position:absolute;border-radius:50%;background:rgba(255,255,255,0.12);transform:scale(0);opacity:1;pointer-events:none;animation:ripple-anim 700ms var(--anim-ease)}
@keyframes ripple-anim{to{transform:scale(1);opacity:0}}

/* reveal on scroll */
.reveal{opacity:0;transform:translateY(10px);transition:opacity var(--anim-medium) var(--anim-ease),transform var(--anim-medium) var(--anim-ease)}
.reveal.show{opacity:1;transform:none}

/* header shadow when scrolled */
.site-header.scrolled{box-shadow:0 8px 22px rgba(2,6,23,0.45);border-bottom-color: rgba(255,255,255,0.04)}

/* reduce motion preference */
@media (prefers-reduced-motion: reduce){
  .reveal{transition:none;opacity:1;transform:none}
  .logo{animation:none}
}


/* Auth form styles */
.auth-card{max-width:680px;margin:0 auto}
.auth-top{text-align:center;margin-bottom:1.25rem}
.auth-toggle{display:flex;gap:0.5rem;background:rgba(255,255,255,0.02);padding:0.5rem;border-radius:10px;margin-bottom:1rem}
.toggle-btn{flex:1;background:transparent;border:0;padding:0.6rem 0;border-radius:8px;color:var(--muted);font-weight:600;cursor:pointer}
.toggle-btn.active{background:linear-gradient(90deg,#316eff,#6ee7b7);color:#061025}
.auth-forms{display:flex;gap:1.25rem}
.form{flex:1}
.form-row{display:flex;flex-direction:column;margin-bottom:0.9rem}
.form-row label{font-size:0.9rem;color:var(--muted);margin-bottom:0.35rem}
.form-row input{padding:0.8rem;border-radius:10px;border:1px solid rgba(255,255,255,0.04);background:rgba(255,255,255,0.02);color:inherit}
.form-row select{
  padding:0.9rem 1rem;
  height:48px;
  line-height:1.1;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.04);
  background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));
  color:inherit;
  font-weight:600;
  font-size:0.98rem;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat:no-repeat;background-position:calc(100% - 14px) center;padding-right:2.6rem;box-shadow:0 6px 18px rgba(2,6,23,0.08) inset;
}
.form-row select:focus{outline:none;box-shadow:0 6px 18px rgba(96,165,250,0.08);border-color:#6ee7b7}
/* Dropdown option styling (not all browsers support full styling of <option>) */
.form-row select option{color:#e6eef6;background:transparent;padding:10px}
.form-row select option[disabled]{color:var(--muted)}
.form-row select option:hover, .form-row select option:focus{background:#f2fbff;color:#061025}
/* hide default IE arrow */
.form-row select::-ms-expand{display:none}
.form-actions{display:flex;gap:0.75rem;align-items:center}
.helper-link{font-size:0.9rem;color:var(--muted);text-decoration:underline;opacity:0.9}

/* Header / badges */
.header-menu{display:flex;align-items:center;gap:0.6rem}
.server-badge{display:inline-block;background:linear-gradient(90deg,#9f7aea,#667eea);color:#fff;padding:0.2rem 0.75rem;border-radius:10px;font-weight:700;font-size:0.8rem;white-space:nowrap}

/* Animations pour badges */
@keyframes badge-pulse{0%,100%{box-shadow:0 0 5px currentColor,0 0 10px currentColor}50%{box-shadow:0 0 15px currentColor,0 0 25px currentColor,0 0 35px currentColor}}
@keyframes badge-sparkle{0%,100%{filter:brightness(1)}50%{filter:brightness(1.4)}}
@keyframes badge-pulse-sparkle{0%,100%{box-shadow:0 0 5px currentColor,0 0 10px currentColor;filter:brightness(1)}25%{filter:brightness(1.3)}50%{box-shadow:0 0 15px currentColor,0 0 25px currentColor;filter:brightness(1.5)}75%{filter:brightness(1.2)}}

.guild-role-badge{display:inline-block;background:linear-gradient(90deg,#60a5fa,#6ee7b7);color:#061025;padding:0.2rem 0.75rem;border-radius:10px;font-weight:700;font-size:0.8rem;white-space:nowrap}

/* Marchant - Jaune basique */
.guild-role-badge.merchant-role{background:linear-gradient(90deg,rgba(251,191,36,0.8),rgba(245,158,11,0.8));color:#1a1a2e;font-weight:700;text-shadow:0 1px 2px rgba(0,0,0,0.3)}

/* Premier Orateur - Rouge pulsation */
.guild-role-badge.first-orator-role{background:linear-gradient(90deg,rgba(220,38,38,0.8),rgba(239,68,68,0.8));color:#fff;font-weight:700;animation:badge-pulse 2s ease-in-out infinite;text-shadow:0 0 10px #ff6b6b}

/* Deuxieme Orateur - Or scintillant */
.guild-role-badge.second-orator-role{background:linear-gradient(90deg,rgba(255,215,0,0.8),rgba(255,193,7,0.8));color:#1a1a2e;font-weight:700;animation:badge-sparkle 1.5s ease-in-out infinite;text-shadow:0 0 8px #ffd700}

/* Troisieme Orateur - Vert scintillant */
.guild-role-badge.third-orator-role{background:linear-gradient(90deg,rgba(34,197,94,0.8),rgba(74,222,128,0.8));color:#1a1a2e;font-weight:700;animation:badge-sparkle 1.5s ease-in-out infinite;text-shadow:0 0 8px #4ade80}

/* Grand Chasseur - Bordeaux pulsation+scintillance */
.guild-role-badge.grand-hunter-role{background:linear-gradient(90deg,rgba(127,29,29,0.9),rgba(153,27,27,0.9));color:#f87171;font-weight:700;animation:badge-pulse-sparkle 2s ease-in-out infinite;text-shadow:0 0 10px #dc2626;border:1px solid rgba(220,38,38,0.5)}

/* Pionnier - Blanc lisible */
.guild-role-badge.pioneer-role{background:linear-gradient(90deg,rgba(255,255,255,0.3),rgba(226,232,240,0.3));color:#ffffff;font-weight:700;text-shadow:0 1px 3px rgba(0,0,0,0.8);border:1px solid rgba(255,255,255,0.4)}

/* Maitre de guerre - Violet scintillant */
.guild-role-badge.war-master-role{background:linear-gradient(90deg,rgba(139,92,246,0.8),rgba(168,85,247,0.8));color:#fff;font-weight:700;animation:badge-sparkle 1.5s ease-in-out infinite;text-shadow:0 0 10px #a855f7}

/* Guerrier - Bleu basique */
.guild-role-badge.warrior-role{background:linear-gradient(90deg,rgba(59,130,246,0.7),rgba(96,165,250,0.7));color:#fff;font-weight:600;text-shadow:0 1px 2px rgba(0,0,0,0.3)}

/* Webmaster - Pulsation + scintillance */
.guild-role-badge.webmaster-role{background:linear-gradient(90deg,rgba(236,72,153,0.8),rgba(219,39,119,0.8));color:#fff;font-weight:700;animation:badge-pulse-sparkle 2s ease-in-out infinite;text-shadow:0 0 10px #ec4899;border:1px solid rgba(236,72,153,0.5)}

/* Prince Marchant - Or pulsation+scintillance */
.guild-role-badge.prince-merchant-role{background:linear-gradient(90deg,rgba(255,215,0,0.8),rgba(255,193,7,0.8));color:#1a1a2e;font-weight:700;animation:badge-pulse-sparkle 2s ease-in-out infinite;text-shadow:0 0 12px #ffd700;border:1px solid rgba(255,215,0,0.5)}

/* Chasseur - Vert basique */
.guild-role-badge.hunter-role{background:linear-gradient(90deg,rgba(34,197,94,0.7),rgba(74,222,128,0.7));color:#1a1a2e;font-weight:600;text-shadow:0 1px 2px rgba(0,0,0,0.2)}

/* Essaie - Gris sobre */
.guild-role-badge.trial-role{background:linear-gradient(90deg,rgba(107,114,128,0.6),rgba(156,163,175,0.6));color:#d1d5db;font-weight:500}

.admin-badge{display:inline-block;background:#6ee7b7;color:#061025;padding:0.18rem 0.6rem;border-radius:10px;font-weight:700;font-size:0.8rem;margin-left:0.25rem}
.header-menu .btn{margin-left:0.5rem}

/* Global badge defaults to avoid overflow for long role names */
.badge {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Admin panel sidebar */
.admin-panel{display:flex;gap:1.5rem;align-items:flex-start}
.admin-sidebar{width:220px}
.admin-tab{display:block;width:100%;padding:0.85rem 1rem;margin-bottom:0.8rem;border-radius:10px;background:transparent;border:1px solid rgba(255,255,255,0.03);color:var(--muted);font-weight:700;cursor:pointer;text-align:center}
.admin-tab.active{background:linear-gradient(90deg,#316eff,#6ee7b7);color:#061025;border-color:transparent}
.admin-content{flex:1}

/* News admin item styling */
.news-item-admin{padding:0.9rem;border-radius:8px;background:rgba(255,255,255,0.01);border:1px solid rgba(255,255,255,0.02)}
.news-item-admin .news-excerpt{margin-bottom:0.5rem}
.news-edit-form{background:transparent;padding-top:0.5rem}
.news-edit-form .image-preview img{max-width:160px;border-radius:8px;display:block}
@media (max-width:900px){
  .admin-panel{flex-direction:column}
  .admin-sidebar{width:100%;display:flex;gap:0.5rem;overflow:auto}
  .admin-tab{flex:1}
  .admin-hero .hero-card{position:relative;max-height:none}
}

/* Admin page spacing & scroll behavior to avoid overlap with footer */
.admin-hero .hero-card{margin-bottom:6rem;position:relative}
/* Let the page perform the scrolling (single scrollbar) — avoid inner overflow on the card */
.admin-content{padding-bottom:1rem}
.admin-content img{max-width:100%;height:auto}

/* Constrain images inside posts/news to avoid layout break when large images are uploaded */
.post-content img,
.forum-post img,
.forum-topic img,
.post img,
.news-item img,
.hero-card img {
  display:block;
  max-width:100%;
  height:auto;
  max-height:720px; /* prevents extremely tall images */
  object-fit:cover;
  border-radius:8px;
  margin:0.6rem auto;
}

/* For image containers that must keep a fixed box (e.g. thumbnails) */
.post-image, .post-image img { width:100%; max-width:520px; height:auto; }

/* Ensure footer sits below content and visual separation */
.site-footer{box-shadow:0 -6px 30px rgba(2,6,23,0.25)}
@media (max-width:700px){
  .auth-forms{flex-direction:column}
  .auth-card{padding:1.25rem}
}

/* Social widgets (Twitch + YouTube + Discord) */
.social-widgets{position:fixed;left:14px;top:calc(var(--site-header-height) + 10px);display:flex;flex-direction:column;gap:10px;z-index:999}
.social-widgets a{color:inherit;text-decoration:none;display:block}
.twitch-widget,.youtube-widget{width:88px;padding:6px;box-sizing:border-box;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border:1px solid rgba(255,255,255,0.04);border-radius:10px;overflow:hidden;box-shadow:0 8px 20px rgba(2,6,23,0.45);text-align:center;cursor:pointer;position:relative}
.twitch-widget::after,.youtube-widget::after,.discord-invite-widget::after{content:'';position:absolute;left:-120%;top:0;height:100%;width:60%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.08),transparent);transform:skewX(-20deg);transition:left 0.9s linear}
.twitch-widget:hover::after,.youtube-widget:hover::after,.discord-invite-widget:hover::after{left:120%}
.twitch-widget img,.youtube-widget img{width:64px !important;height:64px !important;max-width:64px !important;max-height:64px !important;object-fit:contain;border-radius:6px;display:block;margin:0 auto}
.twitch-widget .twitch-live,.youtube-widget .yt-live{display:none;position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);background:rgba(0,0,0,0.72);padding:0.45rem 0.6rem;border-radius:6px;font-size:0.82rem;white-space:nowrap;color:#bff2d9}
.twitch-widget:hover,.youtube-widget:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(2,6,23,0.6);transition:all 200ms var(--anim-ease)}
.twitch-widget:hover .twitch-live,.youtube-widget:hover .yt-live{display:block}

/* Discord widget (right side) */
.discord-widget{position:fixed;right:14px;top:calc(var(--site-header-height) + 10px);width:350px;height:500px;border-radius:10px;overflow:hidden;background:transparent;box-shadow:0 8px 30px rgba(2,6,23,0.45);transition:transform 200ms var(--anim-ease);z-index:999}
.discord-widget iframe{width:100%;height:100%;border:0;display:block}
.discord-widget.closed{transform:translateX(320px)}
.discord-toggle{position:absolute;right:8px;top:8px;width:34px;height:34px;border-radius:8px;background:linear-gradient(90deg,#ff4d4f,#ff7a7a);color:#fff;border:0;font-weight:700;cursor:pointer;box-shadow:0 6px 18px rgba(2,6,23,0.3);z-index:5}

/* bouton d'ouverture Discord avec fond blanc visible */
.discord-open{position:fixed;right:12px;top:calc(var(--site-header-height) + 12px);width:40px;height:40px;border-radius:10px;background:#fff;border:0;cursor:pointer;box-shadow:0 6px 18px rgba(2,6,23,0.35);z-index:1000;display:none;align-items:center;justify-content:center;transition:all 160ms var(--anim-ease)}
.discord-open-img{width:24px;height:24px;display:block;filter:none}
.discord-open:hover{transform:translateY(-3px);box-shadow:0 10px 30px rgba(2,6,23,0.5)}

/* show the open button when the widget is closed */
.discord-widget.closed + .discord-open{display:flex}

@media (max-width:900px){.social-widgets{display:none}.discord-widget{display:none}.discord-open{display:none}}

/* Discord invite button (under YouTube) */
.discord-invite-widget{width:88px;padding:6px;box-sizing:border-box;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border:1px solid rgba(255,255,255,0.04);border-radius:10px;overflow:hidden;box-shadow:0 8px 20px rgba(2,6,23,0.45);text-align:center;cursor:pointer;position:relative}
.discord-invite-widget .discord-icon{width:64px;height:64px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:transparent;margin:0 auto}
.discord-invite-widget .discord-icon-img{width:64px;height:64px;object-fit:contain;display:block;border-radius:8px;margin-top:2px}
.discord-invite-widget .discord-label{display:none;position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);background:rgba(0,0,0,0.72);padding:0.45rem 0.6rem;border-radius:6px;font-size:0.82rem;white-space:nowrap;color:#bff2d9}
.discord-invite-widget:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(2,6,23,0.6);transition:all 200ms var(--anim-ease)}
.discord-invite-widget:hover .discord-label{display:block}

/* Avatar button in header */
.avatar-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:10px;
  text-decoration:none;
  overflow:hidden;
  background:rgba(255,255,255,0.06);
  border:2px solid rgba(110,231,183,0.3);
  transition:all 200ms ease;
  padding:0;
  flex-shrink:0;
}
.avatar-btn:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(96,165,250,0.3);
  border-color:rgba(110,231,183,0.6);
}
.avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:8px;
}

/* optional improved link underlines */
a:hover{opacity:0.95;}
/* Forum & scrollable content pages */
body.forum-page {
  background: radial-gradient(1200px 600px at 10% 10%, rgba(96,165,250,0.06), transparent), linear-gradient(180deg,var(--bg-1),var(--bg-2));
  background-attachment: fixed;
}

main.forum-main {
  padding-top: var(--site-header-height);
}

main.forum-main > .container {
  padding: 2rem 1rem 3rem;
}

/* Admin panel with forum-page styling */
body.forum-page main.admin-hero {
  padding-top: var(--site-header-height);
}

body.forum-page .admin-hero .hero-card {
  margin-bottom: 0;
  padding: 2rem;
}

body.forum-page .hero-card.auth-card {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero card with forum-main pages */
body.forum-page main.forum-main .hero-card {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Unified Dropdown Styling */
select,
.form-row select,
.profession-dropdown,
#profession-dropdown {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  color: inherit;
  transition: all 200ms ease;
}

/* Native select improvements */
select {
  padding: 0.8rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  padding-right: 2.2rem;
  background-size: 20px;
}

select::-ms-expand {
  display: none;
}

/* Enhanced select styling */
select {
  font-weight: 500;
  letter-spacing: 0.3px;
}

select option {
  padding: 0.8rem;
  background: #0f1724;
  color: #e6eef6;
  font-weight: 500;
}

select option:hover {
  background: linear-gradient(90deg, rgba(110,231,183,0.2), rgba(96,165,250,0.2));
  color: #6ee7b7;
}

select option:checked {
  background: linear-gradient(90deg, #316eff, #6ee7b7);
  color: #061025;
  font-weight: 700;
}

select:hover,
.form-row select:hover,
.profession-dropdown:hover {
  border-color: rgba(255,255,255,0.12);
  background-color: rgba(255,255,255,0.04);
}

select:focus,
.form-row select:focus,
.profession-dropdown:focus-within {
  outline: none;
  border-color: #6ee7b7;
  box-shadow: 0 6px 18px rgba(96,165,250,0.1), inset 0 1px 3px rgba(110,231,183,0.1);
  background-color: rgba(255,255,255,0.03);
}

/* Dropdown menu styling (custom dropdowns) */
.profession-dropdown,
.custom-dropdown {
  position: relative;
}

.profession-dropdown-btn,
.custom-dropdown-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.8rem;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  z-index: 101;
}

.profession-dropdown-menu,
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(20,30,50,0.96), rgba(15,23,36,0.96));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
}

.profession-dropdown-menu.active,
.custom-dropdown-menu.active {
  display: block;
  animation: slideDown 200ms ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profession-option,
.custom-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  background: none;
  color: #e6eef6;
  text-align: left;
  cursor: pointer;
  transition: all 200ms ease;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
}

.profession-option:hover,
.custom-dropdown-item:hover,
.profession-option:focus,
.custom-dropdown-item:focus {
  background: linear-gradient(90deg, rgba(110,231,183,0.1), rgba(96,165,250,0.1));
  color: #6ee7b7;
  outline: none;
}

.profession-option:last-child,
.custom-dropdown-item:last-child {
  border-bottom: none;
}

/* Input fields styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea {
  padding: 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  transition: all 200ms ease;
  width: 100%;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
textarea:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus {
  outline: none;
  border-color: #6ee7b7;
  box-shadow: 0 6px 18px rgba(96,165,250,0.1), inset 0 1px 3px rgba(110,231,183,0.1);
  background: rgba(255,255,255,0.03);
}

/* Specific width overrides for small inputs */
input[type="number"][min="1"][max="200"] {
  width: 100px;
}

input[type="number"][min="1"][max="200"]:hover,
input[type="number"][min="1"][max="200"]:focus {
  width: 100px;
}

/* File Input Styling (Upload buttons) */
input[type="file"] {
  padding: 0.8rem;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: all 200ms ease;
  width: 100%;
  position: relative;
}

/* Style the file input using ::file-selector-button */
input[type="file"]::file-selector-button {
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, #316eff, #6ee7b7);
  color: #061025;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 0.8rem;
  transition: all 200ms ease;
  box-shadow: 0 4px 12px rgba(49,110,255,0.2);
  font-size: 0.9rem;
}

input[type="file"]::file-selector-button:hover {
  background: linear-gradient(90deg, #4a7eff, #7ff0c4);
  box-shadow: 0 6px 18px rgba(49,110,255,0.35);
  transform: translateY(-2px);
}

input[type="file"]::file-selector-button:active {
  transform: scale(0.98);
}

input[type="file"]:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 4px 12px rgba(96,165,250,0.1);
}

input[type="file"]:focus {
  outline: none;
  border-color: #6ee7b7;
  background: rgba(255,255,255,0.03);
  box-shadow: 0 6px 18px rgba(96,165,250,0.15), inset 0 1px 3px rgba(110,231,183,0.1);
}

/* For browsers that don't support ::file-selector-button */
input[type="file"]::-webkit-file-upload-button {
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, #316eff, #6ee7b7);
  color: #061025;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 0.8rem;
  transition: all 200ms ease;
  box-shadow: 0 4px 12px rgba(49,110,255,0.2);
  font-size: 0.9rem;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background: linear-gradient(90deg, #4a7eff, #7ff0c4);
  box-shadow: 0 6px 18px rgba(49,110,255,0.35);
  transform: translateY(-2px);
}

/* Custom file input label overlay */
.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-input-wrapper input[type="file"] {
  margin: 0;
}

.file-input-info {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.file-input-info strong {
  color: #6ee7b7;
}

/* Button standardization across site */
button {
  font-family: inherit;
  font-weight: 600;
  transition: all 200ms ease;
}

/* Standard button (no class) styling */
button:not([class]) {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: inherit;
  cursor: pointer;
}

button:not([class]):hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* Ghost button enhancement */
.btn.ghost {
  transition: all 200ms ease;
}

.btn.ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(110,231,183,0.4);
  color: #6ee7b7;
}

/* Primary button enhancement */
.btn.primary {
  position: relative;
  overflow: hidden;
}

.btn.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 500ms ease;
}

.btn.primary:hover::before {
  left: 100%;
}

.btn.primary:active {
  transform: scale(0.98);
}

/* Admin tab button styling */
.admin-tab {
  transition: all 200ms ease;
  position: relative;
}

.admin-tab:hover:not(.active) {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
}

.admin-tab:focus {
  outline: none;
}

/* Small buttons */
.btn-small {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.btn-sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
}

/* Danger button variant */
.btn.danger {
  background: linear-gradient(90deg, rgba(255,107,107,0.3), rgba(255,77,77,0.3));
  border: 1px solid rgba(255,107,107,0.4);
  color: #ff9999;
}

.btn.danger:hover {
  background: linear-gradient(90deg, rgba(255,107,107,0.5), rgba(255,77,77,0.5));
  border-color: rgba(255,107,107,0.6);
  color: #ffcccc;
  box-shadow: 0 6px 18px rgba(255,107,107,0.2);
}

.btn.danger:active {
  transform: scale(0.98);
}

.site-footer {
  background: linear-gradient(180deg, rgba(2,6,23,0.3), rgba(2,6,23,0.5));
  border-top: 2px solid rgba(96,165,250,0.15);
  flex-shrink: 0;
}

/* Forum Image Container - Beautiful gallery-like display */
.forum-image-container {
  margin: 1.5rem 0 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(110,231,183,0.2);
  background: linear-gradient(135deg, rgba(49,110,255,0.1), rgba(110,231,183,0.1));
  padding: 0.75rem;
  display: block;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 8px 24px rgba(110,231,183,0.08);
  transition: all 300ms ease;
}

.forum-image-container:hover {
  border-color: rgba(110,231,183,0.4);
  box-shadow: 0 12px 32px rgba(110,231,183,0.15);
  background: linear-gradient(135deg, rgba(49,110,255,0.12), rgba(110,231,183,0.12));
}

.forum-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  transition: transform 250ms ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  aspect-ratio: auto;
}

.forum-image:hover {
  transform: scale(1.03);
}

@media (max-width: 640px) {
  .forum-image-container {
    max-width: 100%;
    margin: 1rem 0 0 0;
  }
  .forum-image {
    max-width: 100%;
  }
}
/* Post Reactions System - Facebook Style */
.post-reactions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem 0 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
  position: relative;
  overflow: visible;
}

.reactions-display {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Reaction Badge - Individual reaction button */
.reaction-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(135deg, rgba(110,231,183,0.08), rgba(110,231,183,0.06));
  border: 1px solid rgba(110,231,183,0.25);
  border-radius: 22px;
  color: #6ee7b7;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.2, 0.9, 0.2, 1);
  user-select: none;
  white-space: nowrap;
  position: relative;
}

.reaction-badge:hover {
  background: linear-gradient(135deg, rgba(110,231,183,0.18), rgba(110,231,183,0.12));
  border-color: rgba(110,231,183,0.5);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(110,231,183,0.1);
}

.reaction-badge.active {
  background: linear-gradient(135deg, rgba(110,231,183,0.35), rgba(96,165,250,0.35));
  border-color: rgba(110,231,183,0.7);
  color: #a8f5e0;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(110,231,183,0.2);
}

.reaction-emoji {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
}

.reaction-count {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  background: rgba(110,231,183,0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
}

.reaction-badge.active .reaction-count {
  background: rgba(110,231,183,0.25);
}

/* Add Reaction Button */
.add-reaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: linear-gradient(135deg, rgba(96,165,250,0.12), rgba(96,165,250,0.08));
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: 22px;
  color: #60a5fa;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.2, 0.9, 0.2, 1);
  user-select: none;
  position: relative;
  z-index: 50;
}

.add-reaction-btn:hover {
  background: linear-gradient(135deg, rgba(96,165,250,0.22), rgba(96,165,250,0.15));
  border-color: rgba(96,165,250,0.5);
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 6px 16px rgba(96,165,250,0.15);
}

/* Reaction Picker Popup */
.reaction-picker {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0f1724, #071029);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  gap: 0.8rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
  z-index: 1000;
  animation: slideUp 250ms cubic-bezier(0.2, 0.9, 0.2, 1);
  margin-bottom: 0.8rem;
  white-space: nowrap;
}

.reaction-picker .reaction-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 150ms ease;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.reaction-picker .reaction-option:hover {
  background: rgba(110,231,183,0.15);
  border-color: rgba(110,231,183,0.3);
  transform: scale(1.15) translateY(-3px);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .reaction-picker {
    right: auto;
    left: 0;
  }
  
  .post-reactions {
    gap: 0.3rem;
  }
  
  .reaction-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* Hide native select when data-custom is used (prevents white native dropdown flash) */
select[data-custom="true"]{position:absolute !important;left:-9999px !important;opacity:0 !important;height:0 !important;width:0 !important;pointer-events:none !important}