.warning-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(45deg, #ff0000, #990000);
  color: white;
  z-index: 9999;
  padding: 15px 0;
  text-align: center;
  font-family: 'EASVHS', 'Roboto Mono', monospace;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  animation: warningPulse 2s infinite;
}

.warning-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 15px;
}

.warning-icon {
  font-size: 24px;
  animation: warningBounce 1s infinite;
}

.warning-text {
  font-size: 16px;
  text-align: left;
  line-height: 1.4;
  flex-grow: 1;
}

.warning-text strong {
  font-weight: bold;
  letter-spacing: 1px;
}

.warning-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0 10px;
  transition: transform 0.3s ease;
}

.warning-close:hover {
  transform: scale(1.2);
}

@keyframes warningPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes warningBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@font-face {
  font-family: 'EASVHS';
  src: url('easvhs.ttf') format('truetype');
}

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;700&display=swap');

body {
  font-family: 'EASVHS', 'Roboto Mono', monospace;
  background-color: #000;
  color: #fff;
  margin: 0;
  padding-top: 70px;
  padding: 20px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  animation: subtleFlicker 8s infinite;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

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

.eas-container {
  background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 2px solid rgba(255, 255, 255, 0.8);
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  box-shadow: 
    0 0 15px rgba(255, 255, 255, 0.2),
    inset 0 0 15px rgba(0, 0, 0, 0.5);
  animation: fadeIn 1s ease-out;
  position: relative;
  overflow: hidden;
}

.eas-header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #fff;
  padding-bottom: 10px;
}

.eas-logo {
  font-size: 3em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 10px #fff;
  font-family: 'EASVHS', monospace;
  margin-bottom: 10px;
  animation: logoPulse 4s ease-in-out infinite;
}

h1 {
  color: #fff;
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'EASVHS', monospace;
}

.input-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 5px;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.8em;
}

input, select, textarea {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px;
  font-family: 'EASVHS', 'Roboto Mono', monospace;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.1);
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.eas-button {
  grid-column: span 2;
  background: linear-gradient(45deg, #fff 0%, #ddd 100%);
  color: #000;
  border: none;
  padding: 15px;
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.eas-button::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: 0.5s;
}

.eas-button:hover::before {
  left: 100%;
}

.eas-button:hover {
  background-color: #ddd;
  box-shadow: 0 0 20px #fff;
  transform: scale(1.05);
}

.eas-button:disabled {
  background-color: #666;
  color: #333;
  cursor: not-allowed;
}

.output-section {
  margin-top: 20px;
  border: 1px solid #fff;
}

.eas-alert-header {
  background-color: #fff;
  color: #000;
  text-align: center;
  padding: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.alert-display {
  min-height: 150px;
  padding: 15px;
  background-color: #000;
  color: #fff;
  white-space: pre-wrap;
  font-size: 1.1em;
}

.word-count {
  text-align: right;
  padding: 5px;
  color: #ccc;
  font-size: 0.8em;
}

#speakAlert, #downloadAlert {
  margin-top: 10px;
  background-color: #fff;
  color: #000;
}

#speakAlert:disabled, #downloadAlert:disabled {
  background-color: #666;
  color: #333;
  cursor: not-allowed;
}

#speakAlert:hover:not(:disabled), #downloadAlert:hover:not(:disabled) {
  background-color: #ddd;
}

.eas-broadcast-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 1000;
  color: #fff;
  font-family: 'EASVHS', 'Roboto Mono', monospace;
  animation: fadeInBroadcast 0.5s ease-in;
}

.eas-broadcast-screen {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.eas-noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15) 0px,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.15) 0px,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
  animation: noiseAnimation 0.2s steps(2) infinite;
  opacity: 0.3;
}

@keyframes noiseAnimation {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

.eas-broadcast-content {
  text-align: center;
  z-index: 10;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.9);
  border: 2px solid #fff;
  max-width: 80%;
  font-family: 'EASVHS', monospace;
  color: #fff;
  box-shadow: 
    0 0 30px rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  animation: contentPulse 2s infinite;
}

.glitch {
  position: relative;
  color: #fff;
  animation: textDistortion 0.1s infinite;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}
.glitch::before {
  color: #ccc;
  clip: rect(0, 900px, 0, 0);
  animation: glitchAnim 2s infinite linear alternate-reverse;
}
.glitch::after {
  color: #999;
  clip: rect(0, 900px, 0, 0);
  animation: glitchAnim2 3s infinite linear alternate-reverse;
}
@keyframes glitchAnim {
  0% {
    clip: rect(10px, 9999px, 15px, 0);
    transform: translate(0.5px, -0.5px);
  }
  20% {
    clip: rect(20px, 9999px, 25px, 0);
    transform: translate(-0.5px, 0.5px);
  }
  40% {
    clip: rect(5px, 9999px, 10px, 0);
    transform: translate(-1px, 1px);
  }
  60% {
    clip: rect(15px, 9999px, 20px, 0);
    transform: translate(1px, -1px);
  }
  80% {
    clip: rect(25px, 9999px, 30px, 0);
    transform: translate(-0.5px, 0.5px);
  }
  100% {
    clip: rect(10px, 9999px, 15px, 0);
    transform: translate(0.5px, -0.5px);
  }
}
@keyframes glitchAnim2 {
  0% {
    clip: rect(15px, 9999px, 20px, 0);
    transform: translate(-0.5px, 0.5px);
  }
  20% {
    clip: rect(10px, 9999px, 15px, 0);
    transform: translate(0.5px, -0.5px);
  }
  40% {
    clip: rect(20px, 9999px, 25px, 0);
    transform: translate(1px, -1px);
  }
  60% {
    clip: rect(5px, 9999px, 10px, 0);
    transform: translate(-1px, 1px);
  }
  80% {
    clip: rect(15px, 9999px, 20px, 0);
    transform: translate(0.5px, -0.5px);
  }
  100% {
    clip: rect(10px, 9999px, 15px, 0);
    transform: translate(-0.5px, 0.5px);
  }
}

@keyframes contentPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.1); }
  50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.2); }
}

@keyframes fadeInBroadcast {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes textDistortion {
  0% { transform: skew(0deg); }
  20% { transform: skew(0.5deg); }
  40% { transform: skew(-0.5deg); }
  60% { transform: skew(0.25deg); }
  80% { transform: skew(-0.25deg); }
  100% { transform: skew(0deg); }
}

.eas-footer-text {
  margin-top: 20px;
  font-size: 1.2em;
  color: #fff;
  text-transform: uppercase;
  animation: blinkText 1s infinite;
}

@keyframes blinkText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

#cancelBroadcast {
  margin-top: 20px;
  background-color: #fff;
  color: #000;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-family: 'EASVHS', monospace;
  text-transform: uppercase;
}

#cancelBroadcast:hover {
  background-color: #ccc;
}

.spinner {
  border: 8px solid #fff;
  border-top: 8px solid #000;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.history-section {
  background: linear-gradient(135deg, #111 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.history-section h2 {
  text-align: center;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'EASVHS', monospace;
}

.history-section ul {
  list-style: none;
  padding: 0;
}

.history-section li {
  padding: 10px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #fff;
  color: #fff;
  font-family: 'EASVHS', monospace;
  transition: all 0.3s ease;
}

.history-section li:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(255, 255, 255, 0.5);
  transform: translateX(5px);
}

.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(0, 0, 0, 0.1) 50%
  );
  background-size: 100% 4px;
  mix-blend-mode: multiply;
  z-index: 2;
  animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

.vignette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    transparent 20%,
    rgba(0, 0, 0, 0.4) 80%,
    rgba(0, 0, 0, 0.8) 100%
  );
  mix-blend-mode: multiply;
  z-index: 1;
}

@keyframes subtleFlicker {
  0% { filter: brightness(1); }
  5% { filter: brightness(0.95); }
  10% { filter: brightness(1); }
  15% { filter: brightness(0.95); }
  20% { filter: brightness(1); }
  80% { filter: brightness(1); }
  85% { filter: brightness(0.95); }
  90% { filter: brightness(1); }
  95% { filter: brightness(0.95); }
  100% { filter: brightness(1); }
}

@keyframes logoPulse {
  0%, 100% { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ff0000; }
  50% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff0000; }
}

@media (max-width: 768px) {
  .warning-banner {
    padding: 10px 0;
  }
  
  .warning-text {
    font-size: 14px;
  }
  
  body {
    padding-top: 60px;
  }
  
  body {
    padding: 10px;
  }

  .eas-container {
    padding: 10px;
    margin: 0;
    width: auto;
  }

  .input-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .eas-button {
    grid-column: 1;
    padding: 12px;
    font-size: 14px;
  }

  .eas-logo {
    font-size: 2em;
  }

  h1 {
    font-size: 1.5em;
    margin: 5px 0;
  }

  .form-group {
    margin-bottom: 10px;
  }

  input, select, textarea {
    font-size: 16px;
    padding: 8px;
  }

  .output-section {
    margin-top: 15px;
  }

  .alert-display {
    min-height: 100px;
    font-size: 0.9em;
  }

  .eas-broadcast-content {
    max-width: 95%;
    padding: 10px;
  }

  .history-section {
    margin: 15px 0;
    padding: 10px;
  }

  .history-section li {
    font-size: 0.9em;
    padding: 8px;
  }

  .crt-overlay {
    background-size: 100% 2px;
  }

  input[type="range"] {
    width: 100%;
    margin: 10px 0;
  }

  button {
    min-height: 44px;
  }

  .eas-broadcast-content {
    font-size: 0.9em;
  }

  .scrolling-text {
    font-size: 0.85em;
  }

  .eas-header-text {
    font-size: 1.2em;
    padding: 5px 0;
  }

  .eas-footer-text {
    font-size: 1em;
    margin-top: 10px;
  }

  #cancelBroadcast {
    margin-top: 10px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .warning-content {
    flex-direction: column;
    gap: 10px;
  }
  
  .warning-close {
    position: absolute;
    top: 5px;
    right: 5px;
  }
  
  body {
    padding-top: 100px;
  }
  
  .eas-logo {
    font-size: 1.5em;
  }

  h1 {
    font-size: 1.2em;
  }

  .alert-display {
    font-size: 0.8em;
  }

  .word-count {
    font-size: 0.7em;
  }

  .eas-broadcast-content {
    font-size: 0.8em;
  }
}

@media (hover: none) {
  .eas-button:hover {
    transform: none;
  }

  .history-section li:hover {
    transform: none;
  }

  .eas-button:active {
    background-color: #ddd;
    transform: scale(0.98);
  }

  .history-section li:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 768px) {
  .form-group + .form-group {
    margin-top: 15px;
  }

  textarea {
    min-height: 80px;
  }

  .voice-controls {
    flex-direction: column;
  }

  .slider-container {
    width: 100%;
    margin: 10px 0;
  }

  label {
    font-size: 0.9em;
    margin-bottom: 8px;
  }
}

#alertScope {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px;
  font-family: 'EASVHS', 'Roboto Mono', monospace;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#alertScope option[value="global"] {
  color: #ff0000;
  font-weight: bold;
}

.try-now-button {
  display: block;
  margin: 10px auto 20px;
  padding: 12px 25px;
  background: linear-gradient(45deg, #fff 0%, #ddd 100%);
  color: #000;
  border: none;
  font-family: 'EASVHS', 'Roboto Mono', monospace;
  font-size: 1.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.try-now-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.try-now-button::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: 0.5s;
}

.try-now-button:hover::before {
  left: 100%;
}

@media (max-width: 768px) {
  .try-now-button {
    font-size: 1em;
    padding: 10px 20px;
  }
}