/* === style.css === */

/* === Colors === */
:root {
  --bg-0: #0f0f10;
  --bg-1: #151517;
  --bg-2: #1b1b1e;
  --text-0: #ffffff;
  --text-1: #c9c9cf;
  --text-2: #9a9aa1;
  --accent: #d1d1d6;
  --muted: #2a2a2f;
  --ring: #6b6b75;
  --success: #b6ffb3;
}

/* === Global styles === */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-0), #0b0b0c 60%);
  color: var(--text-1);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* === Layout === */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: color-mix(in oklab, var(--bg-1) 85%, transparent);
  border-bottom: 1px solid var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-0);
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3a3a3f, #1f1f23);
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 14px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(180deg, #17171a, #141417);
  color: var(--text-1);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.tab[aria-current="page"],
.tab:hover {
  color: var(--text-0);
  border-color: #3a3a42;
}

/* === Main / Footer === */
main { min-height: 70vh; }

footer {
  border-top: 1px solid var(--muted);
  background: var(--bg-1);
  color: var(--text-2);
}

/* === Grid === */
.grid { display: grid; gap: 16px; }

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* === Hero === */
.hero {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 40px 0;
}

.kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 700;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--text-0);
}

.lead {
  max-width: 60ch;
  color: var(--text-1);
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* === Buttons === */
.button {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(180deg, #e1e1e7, #cfcfd6);
  color: #0b0b0c;
}

.button.ghost {
  background: transparent;
  color: var(--text-1);
}

/* === Chip === */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #1a1a1f;
  border: 1px solid var(--muted);
  color: var(--text-2);
  font-size: 12px;
}

/* === Cards === */
.card {
  background: var(--bg-1);
  border: 1px solid var(--muted);
  border-radius: 16px;
  overflow: hidden;
}

.card .content { padding: 16px; }

.card h3 {
  margin: 0 0 6px 0;
  color: var(--text-0);
}

/* === Sections === */
section { padding: 24px 0; }

section h2 {
  margin: 0 0 14px 0;
  color: var(--text-0);
  font-size: 24px;
}

.sub {
  color: var(--text-2);
  margin: 0 0 16px 0;
}

/* === Gallery placeholders === */
.ph {
  height: 160px;
  background: repeating-linear-gradient(
    45deg,
    #1f1f24,
    #1f1f24 12px,
    #222229 12px,
    #222229 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c6c75;
}

/* === Table === */
table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }

th, td { padding: 12px 14px; border: 1px solid var(--muted); }

th {
  background: #19191d;
  color: var(--text-0);
  text-align: left;
}

td { background: #141417; }

/* === Toast === */
.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #141417;
  border: 1px solid var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.toast.show { opacity: 1; transform: none; }

/* === Hidden class for tabs === */
.hidden { display: none; }

/* === Focus outline === */
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 10px;
}

/* === User Menu === */
.login-area .user-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.user-tab .user-avatar {
  width: 22px;   /* small in navbar */
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dropdown menu */
.login-area .user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -150px;
  background: #2f3136;
  border-radius: 6px;
  padding: 10px;
  min-width: 200px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.login-area .user-tab.active .user-dropdown { display: block; }

.user-dropdown img {
  width: 64px;   /* big inside dropdown */
  height: 64px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
}

.user-dropdown .username-full {
  color: #fff;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
}

.user-dropdown .logout-button {
  display: block;
  padding: 6px 10px;
  background: #7289da;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  font-weight: bold;
  transition: 0.2s;
}

.user-dropdown .logout-button:hover {
  background: #fff;
  color: #7289da;
}

/* === Discord Widget === */
.discord-widget-container {
  max-width: 100%;
  margin: 20px auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.discord-widget-container iframe {
  width: 100%;
  height: 500px;
  border: none;
}

/* === Sidebar === */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100%;
  background: #1a1b26;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar.active { left: 0; }

.sidebar a {
  color: #c0caf5;
  text-decoration: none;
  font-size: 1.1rem;
}

.sidebar .close-btn {
  align-self: flex-end;
  font-size: 2rem;
  background: none;
  border: none;
  color: #c0caf5;
  cursor: pointer;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-avatar {
  width: 32px;   /* medium in sidebar */
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* === Hamburger === */
.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #c0caf5;
  cursor: pointer;
}

@media (max-width: 768px) {
  .tabs, .login-area { display: none; }
  .hamburger { display: block; }
}
