/*
Title: main.css
Author: Tango Hunter
Date Created: 4/1/26
Date Modified: 4/20/26
Description: Style Sheet for the Twitch Website
*/

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

:root{
  --bg-main:#0B0F0C;
  --bg-secondary:#121A14;
  --accent-main:#00C853;
  --accent-secondary:#64DD17;
  --text-main:#E6F4EA;
  --text-secondary:#9FB8A7;
  --border:#1f5f3a;
}

[data-theme="light"]{
  --bg-main:#F4F7F5;
  --bg-secondary:#E1E8E4;
  --accent-main:#2E7D32;
  --accent-secondary:#66BB6A;
  --text-main:#1B2A1F;
  --text-secondary:#4C5F52;
  --border:#1f5f3a;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  max-width: 1600px;
  margin: auto;
  text-align: center;
  font-family: Consolas, monospace;
  background-image:
    linear-gradient(rgba(0,255,100,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,100,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: var(--grid-x, 0px) var(--grid-y, 0px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,120,0.03),
    rgba(0,255,120,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanline 8s linear infinite;
}

@keyframes scanline{
  from{transform:translateY(0)}
  to{transform:translateY(10px)}
}

[data-theme="light"] body {
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
}

/* HEADER */
header {
  background-image: url("../assets/images/header-banner.png");
  position: relative;
  width: 100%;
  background-size: contain;
  aspect-ratio: 5 / 1;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* LIVE BANNER */
.live-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  align-items: center;
  padding: .5rem 1rem;
  font-weight: bold;
  background: red;
  box-shadow: 0 0 8px red;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%{box-shadow:0 0 5px red}
  50%{box-shadow:0 0 18px red}
  100%{box-shadow:0 0 5px red}
}

.banner-active {
  display: inline-block;
}

.live-status a {
  color: inherit;
}

.banner-active ~ header {
  top: 2.2rem;
}

/* THEME TOGGLE */
.theme-toggle{
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
}

.theme-toggle input{
  display: none;
}

.toggle-slider{
  width: 60px;
  height: 32px;
  background: var(--accent-main);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  border: 2px solid var(--border);
}

.toggle-slider::before{
  content: "🌙";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 22px;
  height: 22px;
  background: #0B0F0C;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: .3s ease;
}

.theme-toggle input:checked + .toggle-slider::before {
  transform: translateX(30px);
  content: "☀️";
}

h1 {
  position: relative;
  top: -20%;
  margin: 0;
  line-height: 1;
  font-size: clamp(24px,8vw, 120px);
  font-family: Rockwell, "Arial Black", "Roboto Slab", serif;
  color: var(--accent-main);
  -webkit-text-stroke: 3px rgba(0, 0, 0, 0.75);
}

/* NAVIGATIONAL ELEMENTS */
.mobile-toggle {
position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  width: 35px;
  height: 27px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-main);
  cursor: pointer;
  z-index: 1001;
  border: 1px solid var(--text-main);
  border-radius: 10%;
  padding: 5px;
}

.mobile-toggle span{
  display: block;
  height: 3px;
  background: var(--text-main);
  border-radius: 2px;
  transition: .3s ease;
}

.mobile-toggle.active span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.mobile-toggle.active span:nth-child(2){opacity:0}
.mobile-toggle.active span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  z-index: 999;
}

.overlay.show {
  opacity:1;
  visibility: visible;
}

.nav-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
}

.neon-btn {
  top: -1rem;
  margin: 0px 30px;
  background-color: var(--bg-main);
  color: var(--accent-main);
  font-size: 20px;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  border: var(--accent-main) 4px solid;
  border-radius: 10px;
  padding: 5px;
  text-shadow: 1px 1px 10px var(--accent-main);
  width: 125px;
  text-align: center;
  box-shadow: 0 0 10px 5px var(--accent-main), inset 0 0 10px 5px var(--accent-main);
  position: relative;
}

.neon-btn::before {
  content: "";
  pointer-events: none;
  position: absolute;
  background: var(--accent-main);
  top: 120%;
  left: 0;
  width: 100%;
  height: 100%;
  transform: perspective(20px) rotateX(40deg) scale(1, 0.35);
  filter: blur(20px);
  opacity: 0.5;
}

.neon-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: 0 0 20px 10px var(--accent-main);
  opacity: 0.5;
}

.neon-btn:hover,
.neon-btn:focus {
  background: var(--accent-main);
  color: #000;
  text-shadow: none;
  outline: none;
}

.neon-btn:hover::before,
.neon-btn:hover::after,
.neon-btn:focus::before,
.neon-btn:focus::after {
  opacity: 1;
  outline: none;
}

/* MAIN CONTENT */
main {
  margin: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* TERMINALS */
.terminal {
  background: #0B0F0C;
  border: 1px solid var(--border);
  border-radius: .5rem;
  box-shadow: 0 .6rem 1.6rem rgba(0, 0, 0, .4);
  overflow: hidden;
  margin: 1rem;
  min-height: 300px;
}

.terminal-header {
  background: #121A14;
  padding: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.dot {
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
  margin-left: .7rem;
  color: #9fb8a7;
  font-size: .8rem;
}

.terminal-body {
  padding: 1rem;
  color: #00ff9c;
  min-height: 120px;
  white-space: pre-line;
  text-align: left;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background:#00ff9c;
  margin-left: 3px;
  animation: blink 1s steps(2, start) infinite;
  vertical-align: bottom;
}

@keyframes blink {
  to { visibility: hidden; }
}

iframe {
  aspect-ratio: 16 / 9;
  margin: auto;
}

h2, h3 {
  text-align: left;
}

/* DIVIDED CONTENT */
section {
  padding: 1rem;
}

.socials-link {
  color: var(--accent-main);
}

.cards {
  display: flex;
  margin-top: .5rem;
  gap: 2rem;
  justify-content: center;
}

.card {
  background: var(--bg-secondary);
  padding: 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: 0.2s ease;
}

.card h3 {
  color: var(--accent-secondary)
}

.card:hover {
  box-shadow: 0 0 12px var(--accent-main);
  transform: translateY(-3px);
}

/* FOOTER */
footer {
  position: relative;
  margin: 2rem 0;
  background-image: url(../assets/images/dogtag-hr.png);
  width: 100%;
  aspect-ratio: 7 / 1;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 80px;
  z-index: 0;
}

.copywrite {
  position: absolute;
  bottom: -1rem;
  width: 100%;
  left: 50%;
  transform: translateX(-50%)
}

/* RESPONSIVE DESIGN */
@media (max-width: 950px) {

  .mobile-toggle {
    display: flex;
    top: .5rem;
    left: .5rem;
  }

  .theme-toggle {
    top: .5rem;
    right: .5rem;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    padding: 80px 20px;
    background: var(--bg-main);
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .nav-list {
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
  }

  .neon-btn::before {
    content: none;
  }

  .main-nav.open {
    left: 0;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .cards {
    flex-direction: column;
  }
}

/* LIVE BANNER OVERFLOW CORRECTION */
@media (max-width: 480px) {
  .banner-active ~ header {
    top: 3.2rem;
  }
  .hero {
    margin-top: 2.2rem;
  }
}
