/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0a0a0a;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* GLITCH ANIMATIONS */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  97% { opacity: 0.9; }
  98% { opacity: 1; }
}

@keyframes glitch-border {
  0%, 100% { border-color: #00ff41; box-shadow: 0 0 20px #00ff4166; }
  25% { border-color: #ff0055; box-shadow: 0 0 20px #ff005566; }
  50% { border-color: #00e5ff; box-shadow: 0 0 20px #00e5ff66; }
  75% { border-color: #ffdd00; box-shadow: 0 0 20px #ffdd0066; }
}

@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff4144; }
  50% { text-shadow: 0 0 20px #00ff41, 0 0 40px #00ff4188; }
}

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

/* OVERLAY SCANLINE */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(transparent, rgba(0, 255, 65, 0.1), transparent);
  animation: scanline 8s linear infinite;
  pointer-events: none;
  z-index: 9998;
}

/* NAVBAR */
nav {
  background: #0a0a0a !important;
  border-bottom: 2px solid #00ff41;
  box-shadow: 0 0 20px #00ff4133;
}

nav .nav-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}

nav .brand-logo {
  display: flex;
  align-items: center;
  font-family: 'Courier New', monospace;
  font-size: 1.5rem !important;
  font-weight: bold;
  color: #00ff41 !important;
  letter-spacing: 2px;
  animation: flicker 15s infinite, pulse-glow 3s ease-in-out infinite;
  text-transform: uppercase;
}

nav .brand-logo img {
  height: 48px;
  filter: drop-shadow(0 0 8px #00ff4188);
}

/* MAIN */
main {
  flex: 1;
  padding: 20px 16px;
}

#global_container { padding: 0; }
#main_container { max-width: 700px; margin: 0 auto; }

/* TYPOGRAPHY */
h1 {
  font-size: 1.4rem;
  color: #ff0055;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 8px;
  animation: flicker 10s infinite;
}

h2 {
  font-size: 1rem;
  color: #00e5ff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

p {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* UPLOAD ZONE */
#corruption-form { margin-top: 30px; }

.form-panel {
  width: 100%;
  border: 2px solid #00ff41;
  background: #111;
  padding: 0;
  animation: glitch-border 4s ease-in-out infinite;
  border-radius: 0;
}

.select-file-panel .card {
  background: transparent !important;
  box-shadow: none !important;
  border: none;
}

.select-file-panel .card-content {
  padding: 24px 20px 16px;
  text-align: center;
}

.select-file-panel .card-title {
  color: #00ff41;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.selected-file-name {
  color: #ffdd00;
  font-size: 0.8rem;
  margin-bottom: 16px;
  min-height: 20px;
}

/* BUTTONS */
.select-file-panel button {
  background: transparent !important;
  border: 2px solid #00ff41 !important;
  color: #00ff41 !important;
  font-family: 'Courier New', monospace !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0 !important;
  transition: all 0.2s !important;
  margin-bottom: 10px !important;
}

.select-file-panel button:hover {
  background: #00ff41 !important;
  color: #0a0a0a !important;
  box-shadow: 0 0 20px #00ff4188;
}

.select-file-panel button i {
  color: inherit !important;
}

.select-file-panel .corrupt-button {
  border-color: #ff0055 !important;
  color: #ff0055 !important;
}

.select-file-panel .corrupt-button:hover {
  background: #ff0055 !important;
  color: #fff !important;
  box-shadow: 0 0 20px #ff005588;
}

.select-file-panel .corrupt-button.disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

.select-file-panel .corrupt-button.disabled:hover {
  background: transparent !important;
  color: #ff0055 !important;
  box-shadow: none !important;
}

/* UPLOAD + PROCESSING PANELS */
.upload-panel, .processing-panel {
  padding: 40px 20px;
  text-align: center;
}

.upload-panel p, .processing-panel p {
  color: #00ff41 !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: pulse-glow 2s ease-in-out infinite;
}

/* PROGRESS BAR */
.progress {
  background: #222 !important;
  border-radius: 0 !important;
  height: 8px !important;
  margin-top: 16px;
}

.progress .determinate {
  background: #00ff41 !important;
  box-shadow: 0 0 10px #00ff41;
}

/* PROCESSING SPINNER */
.preloader-wrapper.big {
  width: 60px !important;
  height: 60px !important;
  margin-top: 20px;
}

.spinner-yellow-only .circle {
  border-color: #00ff41 !important;
  border-top-color: transparent !important;
}

/* RESULT PANEL */
.download-corrupted-file-panel {
  border-color: #ffdd00 !important;
  animation: none !important;
}

.download-corrupted-file-panel .card {
  background: transparent !important;
  box-shadow: none !important;
}

.download-corrupted-file-panel .card-title {
  color: #ffdd00 !important;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem !important;
}

.download-corrupted-file-panel p {
  color: #aaa !important;
}

/* ERROR PANEL */
.error-panel .card {
  background: #1a0008 !important;
  border: 2px solid #ff0055 !important;
}

.error-panel .card-title {
  color: #ff0055 !important;
}

.error-panel p { color: #ff6688 !important; }

.error-panel a {
  color: #ff0055 !important;
  border-color: #ff0055 !important;
}

/* SHARING BUTTONS */
.main-action-button-container a {
  background: transparent !important;
  border: 2px solid #ffdd00 !important;
  color: #ffdd00 !important;
  font-family: 'Courier New', monospace !important;
  text-transform: uppercase;
  font-size: 0.75rem !important;
  letter-spacing: 1px;
  border-radius: 0 !important;
}

.main-action-button-container a:hover {
  background: #ffdd00 !important;
  color: #0a0a0a !important;
  box-shadow: 0 0 20px #ffdd0088;
}

.secondary-action-button-container a {
  background: transparent !important;
  border: 2px solid #00ff41 !important;
  color: #00ff41 !important;
  border-radius: 0 !important;
}

.secondary-action-button-container a:hover {
  background: #00ff41 !important;
  color: #0a0a0a !important;
}

/* QR MODAL */
#qrcode-modal .modal-content {
  background: #111;
  border: 2px solid #00ff41;
}

#qrcode-modal h4 {
  color: #00ff41;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
}

#qrcode-modal p { color: #888; }

#qrcode-modal .modal-footer {
  border-top: 1px solid #00ff4133;
}

#qrcode-modal .btn-flat {
  color: #00ff41 !important;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

/* MISSING FILE MODAL */
#no-file-modal .modal-content,
#file-too-big-modal .modal-content {
  background: #111;
  border: 2px solid #ff0055;
}

#no-file-modal h4,
#file-too-big-modal h4 {
  color: #ff0055;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#no-file-modal .modal-footer,
#file-too-big-modal .modal-footer {
  border-top: 1px solid #ff005533;
}

#file-too-big-modal .file-name,
#file-too-big-modal .file-size {
  color: #ffdd00;
  font-family: 'Courier New', monospace;
}

/* FOOTER */
footer {
  background: #0a0a0a;
  border-top: 2px solid #00ff41;
  padding: 20px 16px;
  text-align: center;
}

footer a {
  color: #00ff41 !important;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 12px;
  text-decoration: none;
  transition: all 0.2s;
}

footer a:hover {
  color: #ffdd00 !important;
  text-shadow: 0 0 10px #ffdd00;
}

footer .footer-copyright {
  color: #555 !important;
  font-size: 0.7rem;
  margin-top: 10px;
}

/* MODAL OVERLAY */
.modal {
  background: #0a0a0acc !important;
}

/* RESET BUTTON */
.reset-corruption-form-button {
  border: 2px solid #00e5ff !important;
  color: #00e5ff !important;
  border-radius: 0 !important;
}

.reset-corruption-form-button:hover {
  background: #00e5ff !important;
  color: #0a0a0a !important;
}

/* SHARE BUTTONS CONTAINER */
.sharing-buttons-container {
  text-align: right;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  nav .brand-logo img { height: 40px; }
  nav .brand-logo { font-size: 1.1rem !important; }
  h1 { font-size: 1.1rem; }
  h2 { font-size: 0.85rem; }
  footer a { display: block; margin: 8px 0; }
}

/* PICK FROM DROPBOX / GOOGLE DRIVE */
.pick-from-dropbox-container {
  display: none !important; /* hide third party integrations */
}

/* Lean modal overrides */
lean-modal { background: #111; }
/* Button icons (Unicode, no font dependency) */
.btn-icon {
  display: inline-block;
  margin-right: 6px;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

/* Hide any remaining material-icons text that failed to load as font */
.material-icons { overflow: hidden; max-width: 24px; max-height: 24px; }
.material-icons img { display: block; }

/* Email modal flex centering handled by JS */

/* Google Drive button container - hidden */
#pick-google-drive-file-button {
  display: none !important;
}

/* Drag-over state */
#file-section-container.drag-over {
  border-color: #ffdd00 !important;
  box-shadow: 0 0 30px #ffdd0066;
}
