﻿:root {
  /* === Varsayılan: BEYAZ — D1Y 3+2 Renk Paleti === */
  --primary:       #F47820;        /* D1Y Turuncu */
  --primary-rgb:   244, 120, 32;
  --secondary:     #1B2D5B;        /* D1Y Lacivert */
  --secondary-rgb: 27, 45, 91;
  --accent:        #FF9A40;
  --success:       #16a34a;        /* Koyu yeşil  */
  --success-rgb:   22, 163, 74;
  --warning:       #d97706;
  --danger:        #dc2626;        /* Koyu kırmızı */
  --danger-rgb:    220, 38, 38;
  --text-heading:  #1B2D5B;        /* Başlık rengi */
  --dark-bg:       #f4f7ff;
  --dark-card:     #ffffff;
  --dark-border:   rgba(var(--secondary-rgb), 0.12);
  --text-main:     #1B2D5B;
  --text-muted:    #4a6890;
  --bg-gradient:   linear-gradient(180deg, #f4f7ff 0%, #e8edf8 100%);
  --maxw: 1200px;
}

/* === Tema: Turuncu (Koyu) === */
body[data-theme="turuncu"] {
  --primary:       #F47820;
  --primary-rgb:   244, 120, 32;
  --secondary:     #2A4585;
  --secondary-rgb: 42, 69, 133;
  --accent:        #FFB060;
  --success:       #00ff66;
  --success-rgb:   0, 255, 102;
  --warning:       #ffb700;
  --danger:        #ff3366;
  --danger-rgb:    255, 51, 102;
  --text-heading:  #ffffff;
  --dark-bg:       #07101e;
  --dark-card:     #0d1b35;
  --dark-border:   rgba(var(--primary-rgb), 0.18);
  --text-main:     #e2e8f0;
  --text-muted:    #94a3b8;
  --bg-gradient:   linear-gradient(180deg, #07101e 0%, #0d1b35 100%);
  background:      #07101e !important;
  background-image: var(--bg-gradient) !important;
  color: #e2e8f0;
}

/* === Tema: Lacivert (Koyu) === */
body[data-theme="lacivert"] {
  --primary:       #5B9BD5;
  --primary-rgb:   91, 155, 213;
  --secondary:     #F47820;
  --secondary-rgb: 244, 120, 32;
  --success:       #00ff66;
  --success-rgb:   0, 255, 102;
  --warning:       #ffb700;
  --danger:        #ff3366;
  --danger-rgb:    255, 51, 102;
  --text-heading:  #ffffff;
  --dark-bg:       #060e1c;
  --dark-card:     #0b1a30;
  --dark-border:   rgba(var(--primary-rgb), 0.2);
  --text-main:     #e2e8f0;
  --text-muted:    #94a3b8;
  --bg-gradient:   linear-gradient(180deg, #060e1c 0%, #0b1a30 100%);
  background:      #060e1c !important;
  background-image: var(--bg-gradient) !important;
  color: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--dark-bg);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
}

/* HERO SECTION */
header.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(circle at center, #0f1e3d 0%, var(--dark-bg) 80%);
  border-bottom: 1px solid var(--dark-border);
  overflow: hidden;
}

header.hero canvas#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto; /* Clickable particles */
}

header.hero .container {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 20px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 24px rgba(var(--primary-rgb), 0.5);
}

.hero h1 span {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lead {
  font-size: 1.25rem;
  margin-bottom: 35px;
  color: var(--text-muted);
  min-height: 2.5em; /* Prevent layout shift during typing */
}

/* BUTTONS */
.cta, .small-cta {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta {
  background: linear-gradient(135deg, var(--accent) 0%, #ff5100 100%);
  color: #fff;
  padding: 16px 42px;
  border-radius: 4px;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(255, 122, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.cta:hover::before {
  left: 100%;
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(255, 122, 0, 0.6);
}

.small-cta {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-top: 15px;
  box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.2);
}

.small-cta:hover {
  background: var(--primary);
  color: var(--dark-bg);
  box-shadow: 0 0 15px var(--primary);
  transform: translateY(-2px);
}

.home-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 8px;
  background: var(--success);
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.4px;
  text-transform: none;
  margin-top: 0;
  box-shadow: 0 2px 8px rgba(var(--success-rgb), 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
}
.home-apply-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 22px rgba(var(--success-rgb), 0.45);
  transform: translateY(-2px);
  color: #fff;
  background: var(--success);
}

/* SECTIONS & CARDS */
main {
  padding: 60px 0;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  text-align: center;
  color: var(--primary);
  margin-bottom: 45px;
  letter-spacing: 1px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 15px auto 0;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
}

.card {
  background: var(--dark-card);
  padding: 35px;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.card h2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

/* FILTERS */
.filter-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.filter-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--dark-bg);
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}

/* COURSES CAROUSEL */
.carousel-wrapper {
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
  padding: 10px 0 20px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  width: max-content;
  animation: carouselScroll linear infinite;
}

.carousel-track.filter-active {
  animation: none !important;
  transform: none !important;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
  gap: 24px;
}

@keyframes carouselScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.course {
  padding: 0;
  border-radius: 16px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-top: 4px solid var(--primary);
  box-shadow: 0 4px 16px rgba(27, 45, 91, 0.08);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 360px;
  flex-shrink: 0;
  overflow: hidden;
}

.course-inner {
  padding: 26px 26px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.carousel-track.filter-active .course {
  flex-shrink: 1;
  min-width: 280px;
  max-width: 400px;
  flex: 1;
}

.course:hover {
  transform: translateY(-7px);
  border-color: var(--primary);
  box-shadow: 0 16px 40px rgba(var(--primary-rgb), 0.18);
}

.course h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text-heading);
  font-size: 1.1rem;
  margin-bottom: 14px;
  line-height: 1.35;
}

.course .muted {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.course .muted span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
}

.course p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 0;
}

.course-footer {
  padding: 0 26px 24px;
}

body[data-theme="turuncu"] .home-apply-btn,
body[data-theme="lacivert"] .home-apply-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #050d1a;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}
body[data-theme="turuncu"] .home-apply-btn:hover,
body[data-theme="lacivert"] .home-apply-btn:hover {
  filter: none;
  box-shadow: 0 0 22px rgba(var(--primary-rgb), 0.4);
  color: #050d1a;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* ROBOTICS SIMULATOR WIDGET */
.simulator-section {
  margin: 60px 0;
}

.simulator-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  order: 2;
}

.sim-viewport {
  order: 1;
}

.sim-header h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text-heading);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.sim-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.command-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cmd-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cmd-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.command-queue {
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.queue-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: auto;
}

.queue-item {
  background: var(--secondary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  animation: scaleIn 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.queue-item.active {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.queue-item .remove-cmd {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  font-weight: bold;
}

.queue-item .remove-cmd:hover {
  color: #fff;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.run-btn {
  flex: 2;
  background: linear-gradient(135deg, var(--success) 0%, #00a854 100%);
  color: var(--dark-bg);
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.3);
  transition: all 0.3s ease;
}

.run-btn:hover {
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.6);
  transform: translateY(-2px);
}

.clear-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: var(--danger);
  color: #fff;
}

/* PLAYFIELD GRID */
.sim-viewport {
  background: #04060b;
  border: 2px solid var(--dark-border);
  border-radius: 12px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  grid-template-columns: repeat(5, 1fr);
  padding: 5px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.grid-cell {
  border: 1px solid rgba(var(--primary-rgb), 0.04);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-cell.target-cell {
  background: rgba(0, 255, 102, 0.06);
  border: 1px dashed var(--success);
}

.target-star {
  font-size: 1.5rem;
  color: var(--success);
  filter: drop-shadow(0 0 5px var(--success));
  animation: pulse 1.5s infinite;
}

#virtual-robot {
  width: 48px;
  height: 48px;
  position: absolute;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  filter: drop-shadow(0 0 10px var(--primary));
  z-index: 10;
}

/* SIMULATOR — SCORE ROW */
.sim-score-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.sim-score-chip {
  background: rgba(var(--primary-rgb), .07);
  border: 1px solid var(--dark-border);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
}

/* SIMULATOR — HINT ROW (direction + counter) */
.sim-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: .82rem;
}

.dir-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-weight: 600;
}

#dir-arrow {
  font-size: 1rem;
}

.cmd-counter {
  color: var(--text-muted);
  font-size: .82rem;
  transition: color .2s;
}

.cmd-counter-full {
  color: var(--danger) !important;
  font-weight: 700;
}

/* SIMULATOR — TRAIL CELL */
.grid-cell.trail-cell {
  background: rgba(var(--primary-rgb), .07);
  border-color: rgba(var(--primary-rgb), .18);
}

/* SIMULATOR — RESULT PANEL */
.sim-result {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(8, 12, 20, .97);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  animation: fadeSlideUp .35s ease;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sim-result.visible {
  display: flex;
}

.result-icon {
  font-size: 2.6rem;
  line-height: 1;
}

.result-title {
  font-size: .98rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.result-stats {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

.result-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.result-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--success), #00a854);
  color: var(--dark-bg);
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}

.result-next:hover {
  box-shadow: 0 0 16px rgba(0, 255, 102, .45);
  transform: translateY(-1px);
}

.result-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 6px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}

.result-retry:hover {
  background: rgba(var(--primary-rgb), .1);
}

/* CONTACT SECTION */
#contact {
  background: radial-gradient(circle at center, #0f2444 0%, var(--dark-card) 100%);
  border: 1px solid var(--dark-border);
  text-align: center;
  position: relative;
}

#contact h2 {
  color: #fff;
}

#contact a {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

#contact a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 122, 0, 0.5);
}

/* ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .simulator-container {
    grid-template-columns: 1fr;
  }
  .sim-viewport {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.56rem; }
  .hero .lead { font-size: 1.05rem; }
  header.hero { padding: 70px 0; }
  .course { min-width: 260px; max-width: 300px; }
  .section-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.26rem; }
  .cta { padding: 14px 28px; font-size: 0.9rem; }
  .command-buttons { grid-template-columns: 1fr; }
}

/* ===========================
   SHARED NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(27, 45, 91, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244, 120, 32, 0.25);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(20, 34, 72, 0.99);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.1rem;
  transition: opacity 0.2s ease;
}

.nav-brand:hover { opacity: 0.85; }

.nav-brand i {
  font-size: 1.4rem;
  color: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary));
}

.nav-brand strong {
  color: var(--primary);
}

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.45);
  flex-shrink: 0;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

/* Login button style */
.nav-link-login,
.nav-login-btn {
  border: 1px solid var(--primary);
  color: var(--primary) !important;
  padding: 7px 18px;
  border-radius: 6px;
  margin-left: 8px;
}

.nav-login-btn:hover,
.nav-link-login:hover,
.nav-link-login.active {
  background: var(--primary);
  color: var(--dark-bg) !important;
  box-shadow: 0 0 14px rgba(var(--primary-rgb), 0.45);
}

/* Logged-in user panel button */
.nav-panel-btn {
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  border-radius: 6px;
  padding: 6px 14px;
  margin-left: 8px;
  gap: 8px;
  color: var(--primary) !important;
}

.nav-panel-btn:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

.nav-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Logout icon button */
.nav-logout-btn {
  border: 1px solid rgba(255, 51, 102, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-muted) !important;
}

.nav-logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger) !important;
  background: rgba(255, 51, 102, 0.08);
}

/* Alert / flash messages */
.alert {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error   { background: rgba(var(--danger-rgb),  0.10); border: 1px solid rgba(var(--danger-rgb),  0.35); color: var(--danger);  }

.alert-success { background: rgba(var(--success-rgb), 0.08); border: 1px solid rgba(var(--success-rgb), 0.30); color: var(--success); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background: var(--primary);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background: var(--primary);
}

/* Offset page content below the fixed navbar */
.page-wrapper {
  padding-top: 66px;
}

/* ===========================
   UPDATED FOOTER (3-column)
   =========================== */
.footer {
  background: #1B2D5B;
  color: rgba(255, 255, 255, 0.65);
  padding: 0;
  border-top: 3px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0 30px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-brand-link {
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}

.footer-links-group h4,
.footer-contact h4 {
  font-family: 'Orbitron', sans-serif;
  color: #ffffff;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group ul a,
.footer-contact p a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s ease;
}

.footer-links-group ul a:hover,
.footer-contact p a:hover {
  color: var(--primary);
}

.footer-contact p {
  margin-bottom: 18px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-socials a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.2);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
  text-align: center;
  font-size: 0.82rem;
}

.footer-bottom span {
  color: var(--primary);
}

/* Navbar responsive */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: rgba(20, 34, 72, 0.98);
    border-bottom: 1px solid rgba(244, 120, 32, 0.2);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link, .nav-link-login {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 8px;
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 36px 0 24px;
  }
}

/* ===== FLASH MESSAGES ===== */
.flash-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.flash {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: fadeSlideUp 0.3s ease-out;
  border: 1px solid transparent;
}

.flash-success { background: rgba(var(--success-rgb), 0.10); border-color: rgba(var(--success-rgb), 0.30); color: var(--success); }
.flash-error   { background: rgba(var(--danger-rgb),  0.10); border-color: rgba(var(--danger-rgb),  0.30); color: var(--danger);  }
.flash-info    { background: rgba(var(--primary-rgb), 0.10); border-color: rgba(var(--primary-rgb), 0.25); color: var(--primary); }

.flash button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: 12px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.flash button:hover { opacity: 1; }

/* ===========================
   THEME TOGGLE BUTTON
=========================== */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  min-width: 54px;
  height: 54px;
  border-radius: 27px;
  background: rgba(var(--primary-rgb), 0.12);
  border: 2px solid rgba(var(--primary-rgb), 0.35);
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  z-index: 997;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.18);
  transition: all 0.3s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.theme-toggle span.theme-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.theme-toggle:hover {
  background: rgba(var(--primary-rgb), 0.24);
  transform: scale(1.06);
  box-shadow: 0 4px 28px rgba(var(--primary-rgb), 0.38);
}

/* ===========================
   HERO — Her temada koyu kalır
=========================== */
header.hero {
  background: #1B2D5B !important;
}
.hero h1 { color: #fff !important; }
.hero .lead { color: rgba(255, 255, 255, 0.65) !important; }

/* ===========================
   KOYU TEMALAR: Navbar & Footer & Simulator
=========================== */
body[data-theme="turuncu"] .navbar,
body[data-theme="lacivert"] .navbar {
  background: rgba(6, 8, 18, 0.88) !important;
  border-bottom-color: rgba(var(--primary-rgb), 0.15);
}
body[data-theme="turuncu"] .navbar.scrolled,
body[data-theme="lacivert"] .navbar.scrolled {
  background: rgba(6, 8, 18, 0.98) !important;
}
body[data-theme="turuncu"] .nav-links,
body[data-theme="lacivert"] .nav-links {
  background: rgba(6, 8, 18, 0.97);
}

body[data-theme="turuncu"] .footer,
body[data-theme="lacivert"] .footer {
  background: #03050a;
  border-top: 3px solid var(--primary);
}

body[data-theme="turuncu"] .simulator-container,
body[data-theme="lacivert"] .simulator-container {
  background: rgba(15, 23, 42, 0.6);
}
body[data-theme="turuncu"] .sim-viewport,
body[data-theme="lacivert"] .sim-viewport {
  background: #04060b;
}
body[data-theme="turuncu"] .cmd-btn,
body[data-theme="lacivert"] .cmd-btn {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: #fff;
}
body[data-theme="turuncu"] .command-queue,
body[data-theme="lacivert"] .command-queue {
  background: rgba(8, 12, 20, 0.8);
}

/* ===========================
   BEYAZ TEMA (Varsayılan): Simulator & Carousel
=========================== */
.simulator-container {
  background: rgba(248, 250, 252, 0.85);
  border-color: rgba(var(--secondary-rgb), 0.15);
}
.sim-viewport {
  background: #eef2f7;
  border-color: rgba(var(--secondary-rgb), 0.15);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.04);
}
.grid-cell { border-color: rgba(0, 0, 0, 0.07); }
.grid-cell.trail-cell {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.2);
}
.sim-hint-row {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.sim-result {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0, 0, 0, 0.09);
}
.cmd-btn {
  background: rgba(255,255,255,.9);
  border-color: rgba(var(--secondary-rgb), 0.15);
  color: var(--text-main);
}
.cmd-btn:hover { color: var(--secondary); border-color: var(--secondary); }
.command-queue {
  background: rgba(240, 244, 248, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

.carousel-wrapper {
  -webkit-mask-image: linear-gradient(to right, transparent, #f4f7ff 6%, #f4f7ff 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #f4f7ff 6%, #f4f7ff 94%, transparent);
}
body[data-theme="turuncu"] .carousel-wrapper {
  -webkit-mask-image: linear-gradient(to right, transparent, #07101e 6%, #07101e 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #07101e 6%, #07101e 94%, transparent);
}
body[data-theme="lacivert"] .carousel-wrapper {
  -webkit-mask-image: linear-gradient(to right, transparent, #060e1c 6%, #060e1c 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #060e1c 6%, #060e1c 94%, transparent);
}

.footer-brand-link,
footer .nav-brand { color: #ffffff; }
