@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Plus+Jakarta+Sans:wght@500;700&family=Space+Grotesk:wght@700&display=swap');

/* ===== RithiaMC Crimson Ash Theme ===== */

:root {
  /* Brutalist Dark Matrix */
  --bg-main: #101116;
  --bg-darker: #0b0c0f;
  --bg-panel: #181a20;
  --bg-card: #202229;
  --bg-card-hover: #272a33;
  
  /* Crimson Accents */
  --accent-crimson: #E60023;
  --accent-light: #FF1A3C;
  --accent-dark: #990016;
  
  /* Borders & Highlights */
  --border-solid: #2a2c35;
  --border-active: #E60023;
  
  /* Typography */
  --text-main: #f5f5f6;
  --text-muted: #9a9ea8;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

/* Light Theme Variables — "Warm Ash" (Göz yormayan yumuşak tonlar) */
[data-theme="light"] {
  --bg-main: #f5f3f0;
  --bg-darker: #ebe8e4;
  --bg-panel: #f0eeeb;
  --bg-card: #e8e5e1;
  --bg-card-hover: #dfdcd8;
  
  /* Crimson Accents (biraz yumuşatılmış) */
  --accent-crimson: #cc1a2e;
  --accent-light: #e63348;
  --accent-dark: #8a0f1e;
  
  /* Borders & Highlights */
  --border-solid: #d9d5d0;
  --border-active: #cc1a2e;
  
  /* Typography (düşük kontrast — göz yormaz) */
  --text-main: #2d2a26;
  --text-muted: #7a7572;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(rgba(230,0,35,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,0,35,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Adjust background pattern for light theme — warm subtle grid */
[data-theme="light"] body {
  background-image: 
    linear-gradient(rgba(180,120,80,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,120,80,0.03) 1px, transparent 1px);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); border-left: 1px solid var(--border-solid); }
::-webkit-scrollbar-thumb { background: var(--border-solid); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-crimson); }

/* ===== UTILITIES (BRUTALIST CARDS) ===== */
.brutal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-solid);
  border-radius: 4px; /* Minimal radius */
  position: relative;
  /* Cut corner effect at bottom right */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  transition: all 0.3s;
}

.brutal-card::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 20px; height: 20px;
  background: var(--border-solid);
  transition: background 0.3s;
}

.brutal-card:hover {
  background: var(--bg-card);
  border-color: var(--accent-dark);
}

.brutal-card:hover::after {
  background: var(--accent-crimson);
}

.text-crimson {
  color: var(--accent-light);
  text-shadow: 0 0 10px rgba(230,0,35,0.4);
}

/* Adjust text shadow for light theme */
[data-theme="light"] .text-crimson {
  text-shadow: 0 0 8px rgba(230,0,35,0.3);
}

/* ===== LOCKED NAVBAR ===== */
.navbar-wrapper {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar {
  background: var(--bg-darker);
  border-bottom: 2px solid var(--border-solid);
  padding: 1.5rem 2rem;
  transition: border-bottom-color 0.3s, padding 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--accent-dark);
  padding: 1rem 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Light theme navbar adjustments */
[data-theme="light"] .navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

[data-theme="light"] .navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem 1rem;
  max-width: 1400px;
  margin: auto;
  min-width: 0;
}

.nav-brand {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-heading);
  font-size: 1.6rem; font-weight: 900;
  color: var(--text-main); text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: 0;
  flex-shrink: 0;
  transition: color 0.3s;
}

.nav-brand img { width: 36px; height: 36px; object-fit: contain; }

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none; align-items: center;
  margin: 0;
  padding: 0;
}

/* Orta: metin linkleri — tek satırda kalır; dar alanda yatay kaydırma */
.nav-menu.nav-left {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  margin-left: 1rem;
  gap: clamp(0.35rem, 1vw, 1rem);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.nav-menu.nav-left::-webkit-scrollbar {
  height: 4px;
}

.nav-menu.nav-left::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 2px;
}

.nav-menu.nav-right {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.nav-menu li a {
  color: var(--text-muted);
  font-weight: 800; font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 4px;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  white-space: nowrap;
}

.nav-menu li a::before {
  content: ''; position: absolute; bottom: 0; left: 50%;
  width: 0; height: 2px; background: var(--accent-crimson);
  transition: all 0.3s; transform: translateX(-50%);
}

.nav-menu li a:hover {
  color: var(--text-main);
  background: rgba(128,128,128,0.08);
}

.nav-menu li a:hover::before { width: 80%; }

.nav-menu li a.active-link {
  color: var(--text-main);
}
.nav-menu li a.active-link::before { width: 100%; box-shadow: 0 0 10px var(--accent-crimson); }

[data-theme="light"] .nav-menu li a.active-link::before { box-shadow: 0 0 6px rgba(230,0,35,0.3); }

/* Navbar CTA: Discord → Sürüm/IP → Mağaza (brutalist) */
.nav-cta-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--border-solid);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: transform 0.2s, filter 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-nav-cta:hover { transform: translateY(-1px); }

.btn-nav-cta.discord {
  background: #5865F2;
  color: #fff !important;
  border-color: #5865F2;
}

.btn-nav-cta.discord:hover { filter: brightness(1.08); }

.btn-nav-cta.ip {
  background: var(--bg-card);
  color: var(--accent-light) !important;
  border-color: var(--accent-dark);
}

.btn-nav-cta.ip:hover {
  border-color: var(--accent-crimson);
  background: var(--bg-panel);
}

.btn-nav-cta.shop {
  background: var(--accent-dark);
  color: #fff !important;
  border-color: var(--accent-crimson);
}

.btn-nav-cta.shop:hover { background: var(--accent-crimson); }

.btn-nav-cta.active-link {
  box-shadow: 0 0 14px rgba(230, 0, 35, 0.45);
  border-color: var(--accent-light) !important;
}

.hamburger { display:none; font-size:1.6rem; color:var(--text-main); cursor:pointer; transition: color 0.3s; }

@media (max-width: 900px) {
  .navbar-inner {
    flex-wrap: wrap;
  }
  .nav-menu.nav-left {
    justify-content: flex-start;
    overflow-x: visible;
  }
  .nav-brand { margin-right: 0; flex: 1; min-width: 0; }
  .nav-left, .nav-right {
    display: none; flex-direction: column;
    background: var(--bg-darker);
    width: 100%;
    padding: 1rem 2rem;
    gap: 1rem;
    align-items: stretch;
    order: 3;
    border-top: 1px solid var(--border-solid);
  }
  .nav-left.show, .nav-right.show {
    display: flex;
    position: relative;
    top: auto;
    left: auto;
  }
  .nav-right.show {
    border-bottom: 2px solid var(--accent-crimson);
  }
  .nav-cta-row {
    flex-direction: column;
    width: 100%;
    margin-right: 0;
  }
  .nav-cta-row .btn-nav-cta {
    justify-content: center;
    width: 100%;
  }
  .hamburger { display: block; margin-left: auto; order: 2; }
}

/* ===== PROFILE DROPDOWN ===== */
.profile-wrapper {
  position: relative;
  display: inline-block;
}
.profile-dropdown {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-solid);
  min-width: 220px;
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 400;
  display: flex; flex-direction: column;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

[data-theme="light"] .profile-dropdown {
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border-color: var(--border-solid);
}
.profile-wrapper:hover .profile-dropdown {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.profile-dropdown a {
  padding: 1rem 1.5rem;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800; font-size: 0.9rem; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.8rem;
  border-bottom: 1px dashed var(--border-solid);
  transition: background 0.2s, padding-left 0.2s;
}
.profile-dropdown a:last-child { border-bottom: none; }
.profile-dropdown a:hover { background: var(--bg-card); padding-left: 2rem; color: var(--text-main); }

/* ===== BRUTALIST BUTTONS ===== */
.btn-brutal {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.8rem 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-solid);
  color: var(--text-main); font-family: var(--font-heading);
  font-weight: 800; font-size: 0.95rem; text-transform: uppercase;
  letter-spacing: 1px; text-decoration: none;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-brutal::before {
  content: ''; position: absolute; inset: 0;
  background: var(--accent-crimson);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
  z-index: 0;
}

.btn-brutal span, .btn-brutal i { position: relative; z-index: 1; transition: color 0.3s; }

.btn-brutal:hover {
  border-color: var(--accent-crimson);
  color: #fff;
}
.btn-brutal:hover span, .btn-brutal:hover i { color: #fff; }
.btn-brutal:hover::before { transform: scaleX(1); }

.btn-brutal.primary {
  background: var(--accent-dark);
  border-color: var(--accent-crimson);
  color: #fff;
}
.btn-brutal.primary span, .btn-brutal.primary i { color: #fff; }
.btn-brutal.primary::before { background: var(--accent-crimson); }
.btn-brutal.primary:hover { box-shadow: 0 0 20px rgba(230,0,35,0.4); color: #fff; }

/* Discord button removed from navbar — kept minimal for footer usage */
.discord-button {
  background: #5865F2;
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 800; text-transform: uppercase; font-size: 0.9rem;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  white-space: nowrap; transition: background 0.3s;
}
.discord-button:hover { background: #4752c4; }

/* ===== AGGRESSIVE FOOTER ===== */
.site-footer {
  background: var(--bg-darker);
  border-top: 4px solid var(--accent-dark);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
  position: relative;
}

.site-footer::before {
  content:''; position:absolute; top:-4px; left:0; width:150px; height:4px;
  background: var(--accent-light);
  box-shadow: 0 0 15px var(--accent-crimson);
}

.footer-inner {
  max-width: 1400px; margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand a {
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 900;
  text-decoration: none; color: var(--text-main); text-transform: uppercase;
  margin-bottom: 1.2rem;
  transition: color 0.3s;
}

.footer-brand img { width: 36px; height: 36px; }
.footer-desc { color: var(--text-muted); font-size: 0.95rem; max-width: 400px; }

.footer-col h4 {
  font-family: var(--font-heading); font-size: 1.1rem;
  margin-bottom: 1.2rem; color: var(--text-main); text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
}
.footer-col h4 span { color: var(--accent-crimson); }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
  font-weight: 700; transition: color 0.2s;
  display: flex; align-items: center; gap: 0.5rem;
}
.footer-col ul li a::before { content: '»'; color: var(--accent-dark); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--text-main); }
.footer-col ul li a:hover::before { color: var(--accent-light); }

.footer-bottom {
  max-width: 1400px; margin: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-solid);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

.footer-copy { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }

.social-icons { display:flex; gap:0.5rem; }
.social-icons a {
  width: 40px; height: 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-solid);
  color: var(--text-main); font-size: 1.1rem;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: all 0.3s;
}
.social-icons a:hover {
  background: var(--accent-crimson); border-color: var(--accent-crimson); color: #fff;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: left; align-items: flex-start;}
}

/* ===== BACK TO TOP ===== */
.back-top {
  position:fixed; bottom:2rem; right:2rem;
  width:48px; height:48px;
  background: var(--bg-panel); border: 1px solid var(--border-solid);
  color:var(--text-muted); font-size:1.2rem; cursor:pointer;
  z-index:999; opacity:0; transform:translateY(20px);
  clip-path: polygon(50% 0%, 100% 25%, 100% 100%, 0 100%, 0 25%);
  transition: all 0.3s ease;
  display:flex; align-items:center; justify-content:center;
}

.back-top.visible { opacity:1; transform:translateY(0); }
.back-top:hover { 
  background: var(--accent-crimson); color: #fff; border-color: var(--accent-crimson);
  transform: translateY(-5px);
}

[data-theme="light"] .back-top {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== LIGHT THEME GLOBAL OVERRIDES ===== */
[data-theme="light"] .site-footer::before {
  box-shadow: 0 0 8px rgba(230,0,35,0.2);
}

[data-theme="light"] .site-footer {
  border-top-color: var(--border-solid);
}

[data-theme="light"] .brutal-card:hover {
  border-color: rgba(230,0,35,0.3);
}

/* Smooth theme transition for all elements */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== SECTION COMMONS ===== */
section { padding: 6rem 2rem; position: relative; }
.section-inner { max-width: 1400px; margin: auto; position: relative; z-index: 2; }

.section-label {
  display: inline-block; color: var(--accent-light); font-weight: 800; font-family: var(--font-mono);
  font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; margin-bottom: 1rem;
  text-transform: uppercase; line-height: 1.1;
}

.section-desc {
  color: var(--text-muted); font-size: 1.1rem;
  max-width: 600px; line-height: 1.7; margin-bottom: 3rem;
}

/* Reveal */
.reveal {
  opacity:0; transform:translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity:1; transform:translateY(0); }
