/*
  Ultra-Minimal Fortnite Explainer
*/

@font-face {
  font-family: 'Burbank';
  src: url('../BurbankBigCondensed-Black.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BrutalType';
  src: url('../BrutalType-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: 
    linear-gradient(60deg, rgba(255,255,255,0.05) 50%, transparent 50%),
    linear-gradient(-60deg, rgba(255,255,255,0.05) 50%, transparent 50%),
    linear-gradient(0deg, transparent 24%, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.05) 26%, transparent 27%),
    linear-gradient(135deg, #0066cc 0%, #004499 25%, #0088ff 50%, #0066cc 75%, #003366 100%);
  background-size: 60px 35px, 60px 35px, 30px 30px, 100% 100%;
  background-position: 0 0, 30px 17.5px, 0 0, 0 0;
  color: #ffffff;
  min-height: 100vh;
  padding: 2rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 10vh;
}

.title {
  font-family: 'Burbank', 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: normal;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 4rem;
  color: #ffffff;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
}

/* STATE MANAGEMENT */
.state {
  transition: all 0.5s ease;
}

.hidden {
  display: none;
}

/* INPUT STATE STYLES */
.input-wrapper {
  position: relative;
  margin-bottom: 3rem;
}

#input {
  width: 100%;
  min-height: 40px;
  padding: 1.5rem;
  background: rgba(0, 153, 255, 0.2);
  border: 2px solid rgba(0, 153, 255, 0.4);
  border-radius: 0;
  color: #ffffff;
  font-family: 'BrutalType', 'Burbank', 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  line-height: 1.4;
  resize: vertical;
  outline: none;
  transform: skew(3deg);
  transition: all 0.2s ease;
  backdrop-filter: blur(15px);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#input:focus {
  border-color: rgba(0, 153, 255, 0.8);
  background: rgba(0, 153, 255, 0.3);
}

#input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-transform: none;
  letter-spacing: normal;
}

.char-counter {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  font-size: 1rem;
  color: #ffffff;
  background: rgba(0, 153, 255, 0.8);
  padding: 8px 12px;
  border-radius: 0;
  transform: skew(3deg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 153, 255, 1);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 153, 255, 0.3);
}

#explainBtn {
  display: block;
  margin: 0 auto;
}

/* LOADING STATE STYLES */
#loadingState {
  text-align: center;
  padding: 4rem 2rem;
}

.dots-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.dot {
  width: 16px;
  height: 16px;
  background: #FFD700;
  border-radius: 1%;
  animation: mexicanWave 1.5s ease-in-out infinite;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes mexicanWave {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-20px);
  }
}

.loading-message {
  font-family: 'Burbank', 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* OUTPUT STATE STYLES */
.output {
  min-height: 200px;
  padding: 2rem;
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 1.6rem;
  line-height: 1.4;
  color: #ffffff;
  backdrop-filter: blur(10px);
  margin-bottom: 3rem;
}

.output:empty::before {
  content: "Your explanation will appear here...";
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

#askAnotherBtn {
  display: block;
  margin: 0 auto;
}

/* FORTNITE BUTTON SYSTEM */
/* Replicated from authentic Fortnite UI buttons */

/* Base button styles */
.btn-fortnite {
  font-family: 'Burbank', 'Bebas Neue', sans-serif;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  user-select: none;
}

/* PRIMARY BUTTON - Yellow/Gold (Call-to-Action) */
.btn-primary {
  background: #FFD700;
  color: #000000;
  font-size: 1.6rem;
  padding: 1rem 2.5rem;
  border-bottom: 4px solid #E6C200;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: #FFED4A;
  border-bottom-color: #FFD700;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* SECONDARY BUTTON - Blue (Important Actions) */
.btn-secondary {
  background: #0099FF;
  color: #FFFFFF;
  font-size: 1.6rem;
  padding: 1rem 2.5rem;
  border-bottom: 4px solid #0077CC;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: #33AAFF;
  border-bottom-color: #0088DD;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* TERTIARY BUTTON - Dark (Subtle Actions) */
.btn-tertiary {
  background: #2D2D2D;
  color: #FFFFFF;
  font-size: 1.4rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 3px solid #1A1A1A;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.btn-tertiary:hover {
  background: #404040;
  border-bottom-color: #262626;
  transform: translateY(-1px);
}

.btn-tertiary:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* DISABLED STATE for all buttons */
.btn-fortnite:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  border-bottom-width: 2px !important;
}

.btn-fortnite:disabled:hover {
  transform: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  .container {
    padding-top: 5vh;
  }
  
  .title {
    margin-bottom: 2rem;
  }
  
  .input-wrapper {
    margin-bottom: 2rem;
  }
  
  #input {
    min-height: 25px;
    padding: 1rem;
  }
  
  .output {
    padding: 1.5rem;
  }
  
  /* Responsive button sizes */
  .btn-primary,
  .btn-secondary {
    font-size: 1.4rem;
    padding: 0.85rem 2rem;
  }
  
  .btn-tertiary {
    font-size: 1.2rem;
    padding: 0.65rem 1.25rem;
  }
  
  #input {
    font-size: 1.4rem;
    min-height: 35px;
  }
  
  .loading-message {
    font-size: 1.4rem;
  }
  
  .output {
    font-size: 1.4rem;
  }
  
  .char-counter {
    font-size: 1rem;
  }
}