/* --- VARIABLES --- */
:root {
  --accent-green: #2e4d22;
  --header-height: 80px;
  --yt-red: #FF0000;
  --dc-blue: #5865F2;
  --st-blue: #1b2838;
  --sc-orange: #FFAB19;
  --gh-dark: #24292e;
}

/* --- BASE --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: #111;
  color: #eee;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid #111; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-green); }

/* ======================
   HEADER & NAV
   ====================== */
#menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 1500;
}
#menu-overlay.active { opacity: 1; visibility: visible; }

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
  z-index: 2100;
  transition: background-color 0.3s, height 0.3s, backdrop-filter 0.3s;
  background-color: transparent;
}
.site-header.scrolled,
.site-header.menu-active {
  background-color: #1a1a1a;
  height: 60px;
  border-bottom: 1px solid #333;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  font-size: 1.5rem;
}
.brand img { width: 32px; height: 32px; border-radius: 4px; }

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: #ccc;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-link.active { background: var(--accent-green); color: white; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 18px;
  cursor: pointer;
  z-index: 2200;
  position: relative;
}
.hamburger span {
  width: 100%; height: 2px;
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hamburger.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .site-nav {
    position: fixed;
    top: 0; right: -300px;
    width: 280px; height: 100vh;
    background: #121212;
    flex-direction: column;
    padding-top: 80px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }
  .site-nav.open { right: 0; }

  .nav-link {
    width: 85%;
    padding: 18px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
}

/* ======================
   HERO
   ====================== */
.hero {
  position: relative;
  height: 50vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 120%;
  background:
    linear-gradient(rgba(0,0,0,0.4), #111),
    url('https://oatmeal3ds.github.io/assets/photo-1464822759023-fed622ff2c3b.avif');
  background-size: cover;
  background-position: center;
  z-index: -1;
}
.hero-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  font-size: 4.5rem;
  margin: 0;
  color: white;
  letter-spacing: 6px;
  text-align: center;
}
.hero-sub {
  color: white;
  font-weight: 300;
  letter-spacing: 2px;
  text-align: center;
  margin: 8px 0 0;
}

/* ======================
   PROGRESS BAR
   ====================== */
.progress-container {
  margin: 20px;
  background: #222;
  border: 2px solid #333;
  height: 35px;
  position: relative;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 1s ease-in-out;
  background: repeating-linear-gradient(
    -45deg,
    #fdd835 0, #fdd835 20px,
    #000    20px, #000    40px
  );
  background-size: 200% 100%;
  animation: slideTape 0.5s linear infinite;
}
.progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 8px;
  font-weight: 900;
  font-size: 14px;
  color: white;
  text-shadow: 2px 2px 0 #000;
  text-transform: uppercase;
  z-index: 2;
}
@keyframes slideTape {
  from { background-position: 0 0; }
  to   { background-position: -55px 0; }
}

/* ======================
   CARDS  (details/summary + plain)
   ====================== */
.card {
  background: #1c1c1c;
  margin: 15px 20px;
  border-radius: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  overflow: hidden;
}

/* Plain .card (not a <details>) gets padding directly */
.card:not(details) {
  padding: 16px;
}

/* <details> summary toggle */
.card summary {
  padding: 16px;
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  position: relative;
  user-select: none;
}
/* Hide WebKit's default disclosure triangle */
.card summary::-webkit-details-marker { display: none; }

.card summary::after {
  content: "▾";
  position: absolute;
  right: 20px;
  transform: rotate(-90deg);
  transition: transform 0.2s;
}
details[open] > summary::after {
  transform: rotate(0deg);
}

.card-content {
  padding: 16px;
  border-top: 1px solid #333;
}

/* ======================
   SOCIAL / DASHBOARD BUTTONS
   ====================== */
.social-container { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.dash-btn {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  border-radius: 4px;
  height: 44px;
  overflow: hidden;
  transition: transform 0.2s;
}
.dash-btn:hover { transform: translateX(8px); }

.btn-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 100%;
  color: white;
  flex-grow: 1;
}
.btn-main i { font-size: 1.2rem; color: white; }

.btn-stats {
  background: #252525;
  color: #999;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  font-size: 11px;
  letter-spacing: 1px;
  border-left: 1px solid rgba(255,255,255,0.05);
  text-transform: uppercase;
}

/* Platform colours */
.yt-dash { background: var(--yt-red); }
.dc-dash { background: var(--dc-blue); }
.st-dash { background: var(--st-blue); }
.sc-dash { background: var(--sc-orange); }
.gh-dash { background: var(--gh-dark); }

/* Scratch custom icon */
.sc-icon-wrap {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: white;
  border-radius: 50%;
  padding: 2px;
  flex-shrink: 0;
}
.sc-svg { width: 100%; height: 100%; }

/* ======================
   BUTTONS & INPUTS
   ====================== */
button {
  background: var(--accent-green);
  color: #eee;
  border: none;
  padding: 8px 18px;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
button:hover {
  background: #4a7a36;
  transform: translateY(-4px);
}
button:active {
  transform: translateY(0);
}

input, textarea {
  background: #1c1c1c;
  border: 1px solid #333;
  color: #eee;
  padding: 6px 10px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
input:hover, textarea:hover {
  border-color: #4a7a36;
}
input:focus, textarea:focus {
  border-color: var(--accent-green);
}

/* ======================
   NEWS FEED
   ====================== */
.news-item {
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 2px solid var(--accent-green);
}
.news-link {
  color: #fdd835;
  text-decoration: none;
  font-weight: bold;
  display: block;
}
.news-link:hover { text-decoration: underline; }
.news-date { font-size: 0.75rem; color: #777; }
.news-desc { margin: 0; font-size: 0.85rem; color: #bbb; }

/* ======================
   FOOTER
   ====================== */
footer {
  padding: 30px;
  text-align: center;
  color: #777;
  margin-top: auto;
  border-top: 1px solid #333;
}

/* damage the h's and p's padding until it does not thicken cards */
.card p:first-child, .card h1:first-child, .card h2:first-child { margin-top: 0; }
.card p:last-child, .card h1:last-child, .card h2:last-child { margin-bottom: 0; }
    /* ======================
   FORM ELEMENTS
   ====================== */

/* Dropdown */
select {
  background: #1c1c1c;
  border: 1px solid #333;
  color: #eee;
  padding: 6px 10px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23eee' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
select:hover { border-color: #4a7a36; }
select:focus { border-color: var(--accent-green); }
select option {
  background: #1c1c1c;
  color: #eee;
}
select option:checked,
select option:hover {
  background: var(--accent-green);
  color: white;
}

/* Checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 0;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    vertical-align: middle;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
}
input[type="checkbox"]:hover { border-color: #4a7a36; }
input[type="checkbox"]:checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: translate(-50%, -50%) rotate(45deg);
  top: 50%;
  left: 50%;
  line-height: 0;
}


/* Radio */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px; height: 16px;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 50%; cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
    vertical-align: middle;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
}

input[type="radio"]:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Range slider */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #333;
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-green);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  background: #4a7a36;
  transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent-green);
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s;
}

/* File upload */
input[type="file"] {
  background: #1c1c1c;
  border: 1px solid #333;
  color: #eee;
  padding: 6px 10px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
}
input[type="file"]:hover { border-color: #4a7a36; }
input[type="file"]::file-selector-button {
  background: var(--accent-green);
  color: #eee;
  border: none;
  padding: 6px 14px;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s;
}
input[type="file"]::file-selector-button:hover {
  background: #4a7a36;
}

/*Number Picker*/
    input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  filter: invert(1); /* makes them light colored */
}

/* URL input */
input[type="url"] {
  color: #eee;
}

/* Color picker */
    input[type="color"] {
  padding: 2px;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; }
    /* ======================
   CODE BLOCKS
   ====================== */
code {
  padding: 2px 6px;
  color: #eee;
  background: #00000090;
  border: 1px solid #222;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  font-family: monospace;
  font-size: 0.85em;
  border-radius: 3px;
}
pre {
  background: #00000090;
  border: 1px solid #222;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
  padding: 0;
  overflow-x: auto;
  border-radius: 3px;
  position: relative;
}

pre code {
  background: none;
  border: none;
  box-shadow: none;
  display: block;
  color: #eee;
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 12px;
    border-left: 3px solid #2e4d22;
}
.pre-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #222;
  background: #00000050;
  width: 100%;
  box-sizing: border-box;
}
.pre-header::before {
  content: 'Code';
  font-size: 11px;
  color: #FFFFFF;
  font-family: monospace;
  letter-spacing: 1px;
}