/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: #121212;
  background-image: 
    radial-gradient(circle at 25px 25px, rgba(50, 50, 80, 0.2) 2%, transparent 0%), 
    radial-gradient(circle at 75px 75px, rgba(50, 50, 80, 0.2) 2%, transparent 0%);
  background-size: 100px 100px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

/* Variables */
:root {
  --primary-color: #1a1a2e;
  --secondary-color: #4ecca3;
  --accent-color: #e94560;
  --light-color: #232931;
  --dark-color: #0f0f0f;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --gradient-primary: linear-gradient(135deg, #16213e, #533483);
  --gradient-secondary: linear-gradient(135deg, #0d7377, #14c38e);
  --reptilian-color: #4ecca3;
  --human-color: #3282b8;
  --error-color: #e94560;
  --neon-glow: 0 0 5px rgba(78, 204, 163, 0.5), 0 0 10px rgba(78, 204, 163, 0.3);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  margin-top: 0;
  line-height: 1.2;
  color: var(--text-primary);
}

/* Header */
.header {
  background: var(--gradient-primary);
  color: white;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(78, 204, 163, 0.3);
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
  animation: scan 3s linear infinite;
  opacity: 0.7;
  box-shadow: 0 0 10px rgba(78, 204, 163, 0.5);
}

.scanner-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.scanner-particles::before,
.scanner-particles::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  opacity: 0.7;
  animation: float-particle 4s infinite ease-in-out;
}

.scanner-particles::before {
  left: 25%;
  top: 40%;
  animation-delay: 0.5s;
}

.scanner-particles::after {
  left: 75%;
  top: 60%;
  animation-delay: 1.5s;
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.3;
  }
}

@keyframes scan {
  0% {
    top: 0%;
  }
  100% {
    top: 100%;
  }
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

#main-title {
  font-size: 2.5rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(78, 204, 163, 0.3);
  animation: title-glow 3s infinite alternate;
}

@keyframes title-glow {
  0% {
    text-shadow: 0 0 5px rgba(78, 204, 163, 0.3);
  }
  100% {
    text-shadow: 0 0 15px rgba(78, 204, 163, 0.6), 0 0 30px rgba(78, 204, 163, 0.3);
  }
}

#subtitle {
  font-size: 1.2rem;
  margin: 10px 0 20px;
  font-weight: 400;
  opacity: 0.9;
  color: var(--text-primary);
}

.language-selector {
  margin-top: 15px;
}

#languageSelect {
  display: none;
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid rgba(78, 204, 163, 0.3);
  background-color: rgba(26, 26, 46, 0.7);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#languageSelect:hover {
  background-color: rgba(78, 204, 163, 0.1);
  border-color: var(--secondary-color);
  box-shadow: 0 0 15px rgba(78, 204, 163, 0.3);
}

#languageSelect:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 15px rgba(78, 204, 163, 0.3);
}

#languageSelect option {
  background-color: var(--dark-color);
  color: var(--text-primary);
  padding: 10px;
}

/* Main Container */
.main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* About Section */
.about-section {
  background-color: rgba(35, 41, 49, 0.7);
  border-radius: var(--border-radius);
  padding: 5px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  position: relative;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(78, 204, 163, 0.1);
  transform: translateZ(0);
}

.sci-fi-border {
  position: relative;
  padding: 25px;
  border: 1px solid rgba(78, 204, 163, 0.3);
  border-radius: calc(var(--border-radius) - 5px);
  background-color: rgba(26, 26, 46, 0.4);
  overflow: hidden;
}

.sci-fi-border::before,
.sci-fi-border::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--secondary-color);
  transition: var(--transition);
}

.sci-fi-border::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  box-shadow: -5px -5px 10px rgba(78, 204, 163, 0.1);
}

.sci-fi-border::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  box-shadow: 5px 5px 10px rgba(78, 204, 163, 0.1);
}

.about-section:hover .sci-fi-border::before,
.about-section:hover .sci-fi-border::after {
  width: 40px;
  height: 40px;
  border-color: var(--reptilian-color);
  box-shadow: 0 0 15px rgba(78, 204, 163, 0.3);
}

.about-text {
  text-align: center;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Notice */
.notice {
  background-color: rgba(50, 130, 184, 0.1);
  border: 1px solid rgba(50, 130, 184, 0.3);
  padding: 15px;
  margin: 20px 0;
  font-size: 0.9rem;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.notice-icon {
  font-size: 1.2rem;
  color: var(--human-color);
  margin-top: -2px;
}

.notice-text {
  flex: 1;
}

.disclaimer {
  background-color: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.3);
  padding: 18px;
  margin: 25px 0;
  font-size: 0.9rem;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Detector Container */
.detector-container {
  background-color: rgba(35, 41, 49, 0.8);
  border-radius: var(--border-radius);
  padding: 35px;
  margin: 35px 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(78, 204, 163, 0.2);
  backdrop-filter: blur(5px);
  transform: translateZ(0);
}

.detector-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(78, 204, 163, 0.5), 
    transparent
  );
  box-shadow: 0 0 15px rgba(78, 204, 163, 0.5);
}

.detector-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(78, 204, 163, 0.3), 
    transparent
  );
}

.url {
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Area Styles */
.area {
  width: 100%;
  max-width: 500px;
  min-height: 220px;
  margin: 20px auto;
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  background-color: var(--dark-color);
  position: relative;
}

/* Corner decorations */
.corner-decoration {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--secondary-color);
  opacity: 0.7;
  transition: all 0.5s ease;
}

.top-left {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
}

.top-right {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
}

.bottom-left {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
}

.bottom-right {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--secondary-color);
  background-color: rgba(78, 204, 163, 0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.upload-area:hover {
  background-color: rgba(78, 204, 163, 0.1);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 0 20px rgba(78, 204, 163, 0.3);
}

.upload-area:hover .corner-decoration {
  width: 20px;
  height: 20px;
  opacity: 1;
}

.upload-icon-container {
  background-color: rgba(78, 204, 163, 0.1);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(78, 204, 163, 0.2);
  transition: all 0.3s ease;
  animation: pulse 3s infinite alternate;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 15px rgba(78, 204, 163, 0.2);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 25px rgba(78, 204, 163, 0.4);
    transform: scale(1.05);
  }
}

.upload-area:hover .upload-icon-container {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(78, 204, 163, 0.4);
}

.upload-icon {
  width: 40px;
  height: 40px;
  filter: invert(1);
  transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
  transform: scale(1.1);
}

.upload-text {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin: 15px 0 0;
  transition: all 0.3s ease;
}

.upload-area:hover .upload-text {
  color: var(--text-primary);
  text-shadow: 0 0 5px rgba(78, 204, 163, 0.5);
}

/* Loading Area */
.loading-area {
  border: 2px solid var(--human-color);
  background-color: rgba(50, 130, 184, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.loading-spinner {
  border: 4px solid rgba(50, 130, 184, 0.1);
  border-top: 4px solid var(--human-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1.2s linear infinite;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(50, 130, 184, 0.2);
}

.loading-hex-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}

.hex-cell {
  position: absolute;
  width: 30px;
  height: 40px;
  background-color: var(--human-color);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: hex-pulse 3s infinite alternate;
}

.hex-cell:nth-child(1) {
  top: 15%;
  left: 20%;
  animation-delay: 0.5s;
}

.hex-cell:nth-child(2) {
  top: 50%;
  left: 15%;
  animation-delay: 1s;
}

.hex-cell:nth-child(3) {
  top: 75%;
  left: 30%;
  animation-delay: 1.5s;
}

.hex-cell:nth-child(4) {
  top: 15%;
  right: 20%;
  animation-delay: 0.7s;
}

.hex-cell:nth-child(5) {
  top: 50%;
  right: 15%;
  animation-delay: 1.2s;
}

.hex-cell:nth-child(6) {
  top: 75%;
  right: 30%;
  animation-delay: 1.7s;
}

@keyframes hex-pulse {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

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

.loading-text {
  font-size: 1.2rem;
  color: var(--human-color);
  margin: 15px 0 0;
  position: relative;
  z-index: 2;
}

/* Result Area */
.result-area {
  border: none;
  background-color: var(--light-color);
  box-shadow: var(--shadow);
  padding: 25px;
  position: relative;
}

.result-area::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--secondary-color), 
    transparent
  );
}

.result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-scanner {
  position: relative;
  width: 70%;
  max-width: 300px;
  margin-bottom: 25px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(78, 204, 163, 0.2);
}

.uploaded-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
  animation: scan-image 2s linear infinite;
  opacity: 0.7;
  z-index: 2;
  box-shadow: 0 0 10px rgba(78, 204, 163, 0.5);
}

.scan-data {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: 'Orbitron', monospace;
  color: var(--secondary-color);
  font-size: 8px;
  opacity: 0.7;
  text-shadow: 0 0 5px var(--secondary-color);
  animation: data-flicker 0.5s infinite alternate;
  pointer-events: none;
}

.scan-data::before {
  content: "ANALYZING...";
  animation: text-change 3s infinite;
}

@keyframes text-change {
  0%, 20% { content: "ANALYZING..."; }
  25%, 45% { content: "DATA_PROC:78%"; }
  50%, 70% { content: "SCANNING:COMP"; }
  75%, 95% { content: "ID_MATCH:FOUND"; }
  96%, 100% { content: "VERIFYING..."; }
}

@keyframes data-flicker {
  0% { opacity: 0.5; }
  100% { opacity: 0.9; }
}

@keyframes scan-image {
  0% {
    top: 0%;
  }
  100% {
    top: 100%;
  }
}

.result-message-container {
  width: 100%;
  text-align: center;
}

.prediction-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-primary);
  text-shadow: 0 0 5px rgba(78, 204, 163, 0.3);
}

/* Result Messages */
.message {
  display: none;
  background-color: rgba(15, 15, 15, 0.7);
  border-radius: 12px;
  padding: 25px;
  margin: 15px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.8s ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  transform: translateZ(0);
}

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

.message-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.reptilian-icon {
  color: var(--reptilian-color);
  text-shadow: 0 0 15px rgba(78, 204, 163, 0.6);
  animation: icon-pulse 2s infinite alternate;
}

.human-icon {
  color: var(--human-color);
  text-shadow: 0 0 15px rgba(50, 130, 184, 0.6);
  animation: icon-pulse 2s infinite alternate;
}

.error-icon {
  color: var(--error-color);
  text-shadow: 0 0 15px rgba(233, 69, 96, 0.6);
  animation: icon-pulse 2s infinite alternate;
}

@keyframes icon-pulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 10px rgba(78, 204, 163, 0.5);
  }
  100% {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(78, 204, 163, 0.7), 0 0 30px rgba(78, 204, 163, 0.4);
  }
}

.message-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.reptilian-message {
  border: 2px solid var(--reptilian-color);
  background-color: rgba(78, 204, 163, 0.05);
  display: none;
  box-shadow: 0 0 20px rgba(78, 204, 163, 0.15);
}

.human-message {
  border: 2px solid var(--human-color);
  background-color: rgba(50, 130, 184, 0.05);
  display: none;
  box-shadow: 0 0 20px rgba(50, 130, 184, 0.15);
}

.error-message {
  border: 2px solid var(--error-color);
  background-color: rgba(233, 69, 96, 0.05);
  display: none;
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.15);
}

/* Apple Info Button and Popup */
.apple-info-button {
  position: relative;
  margin-top: 25px;
  background-color: rgba(35, 41, 49, 0.8);
  border: 1px solid #333;
  color: var(--text-secondary);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  backdrop-filter: blur(4px);
  transform: translateZ(0);
}

.apple-info-button:hover {
  background-color: rgba(26, 26, 46, 0.9);
  color: var(--text-primary);
  border-color: var(--error-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(233, 69, 96, 0.2);
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.popup-content {
  position: relative;
  background-color: var(--light-color);
  width: 90%;
  max-width: 550px;
  padding: 35px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(233, 69, 96, 0.3);
  animation: popup-appear 0.4s ease-out;
}

@keyframes popup-appear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover {
  color: var(--error-color);
  background-color: rgba(233, 69, 96, 0.1);
  transform: rotate(90deg);
}

.popup-title {
  color: var(--error-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

.popup-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Retry Area */
#retry-area {
  min-height: auto; /* remove the inherited min-height */
  height: auto;
  padding: 15px 20px; /* reduce padding if you want */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.retry-area:hover {
  background-color: rgba(78, 204, 163, 0.1);
  color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(78, 204, 163, 0.3);
}

#another-img {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  display: inline-block;
  position: relative;
}

#another-img::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.retry-area:hover #another-img::after {
  width: 100%;
}

/* Ad Containers */
.ad-container {
  max-width: 800px;
  margin: 30px auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.ad-item {
  min-height: 250px;
  min-width: 300px;
  background-color: rgba(35, 41, 49, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Prediction Styles */
.prediction-item {
  margin: 12px 0;
}
  
.prediction-bar-container {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
  
.prediction-label {
  width: 80px;
  font-weight: 500;
  text-align: right;
  padding-right: 12px;
  color: var(--text-primary);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
}
  
.prediction-bar-wrapper {
  flex-grow: 1;
  height: 12px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
  
.prediction-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  background-image: linear-gradient(90deg, rgba(78, 204, 163, 0.7), rgba(78, 204, 163, 1));
  box-shadow: 0 0 5px rgba(78, 204, 163, 0.5);
}
  
.prediction-percentage {
  width: 55px;
  text-align: right;
  padding-left: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
}

.upload-area.dragover {
  background-color: rgba(78, 204, 163, 0.15);
  border-color: var(--secondary-color);
  box-shadow: 0 0 25px rgba(78, 204, 163, 0.4);
  transform: translateY(-5px) scale(1.02);
}

/* Comment Button */
.comment-section {
  margin: 35px auto;
  text-align: center;
}

.comment-button {
  position: relative;
  background-color: var(--dark-color);
  color: var(--text-primary);
  border: 2px solid var(--secondary-color);
  padding: 14px 30px;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
}

.comment-button:hover {
  background-color: rgba(78, 204, 163, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 8px var(--secondary-color);
}

.btn-glow {
  position: absolute;
  width: 40px;
  height: 100%;
  top: 0;
  left: -40px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(78, 204, 163, 0.5),
    transparent
  );
  animation: btn-glow 2.5s linear infinite;
  z-index: 0;
}

@keyframes btn-glow {
  0% {
    left: -40px;
  }
  100% {
    left: 100%;
  }
}

/* Disqus Thread */
#disqus_thread {
  max-width: 800px;
  margin: 35px auto;
  padding: 25px;
  background-color: rgba(35, 41, 49, 0.7);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
  text-align: center;
  padding: 25px;
  margin-top: 50px;
  background-color: var(--dark-color);
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(78, 204, 163, 0.3), 
    transparent
  );
}

.rights {
  font-size: 0.9rem;
  opacity: 0.7;
  position: relative;
  z-index: 2;
}

/* Fade In Animation for Sections */
.fade-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Scanning Overlay Animation */
.scanning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 30, 0.85);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.scanning-overlay.active {
  opacity: 1;
  visibility: visible;
}

.scanning-container {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.scanning-frame {
  position: absolute;
  width: 90%;
  height: 90%;
  border: 2px solid var(--secondary-color);
  box-shadow: 0 0 15px rgba(78, 204, 163, 0.5);
  border-radius: 10px;
}

.scanning-image-container {
  width: 80%;
  height: 80%;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.scanning-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanning-line-horizontal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
  animation: scan-horizontal 2s linear infinite;
  box-shadow: 0 0 10px var(--secondary-color);
  opacity: 0.8;
}

.scanning-line-vertical {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--secondary-color), transparent);
  animation: scan-vertical 2.5s linear infinite;
  box-shadow: 0 0 10px var(--secondary-color);
  opacity: 0.8;
}

@keyframes scan-horizontal {
  0% { top: 0; }
  100% { top: calc(100% - 3px); }
}

@keyframes scan-vertical {
  0% { left: 0; }
  100% { left: calc(100% - 3px); }
}

.scanning-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(transparent 95%, rgba(78, 204, 163, 0.3) 100%),
    linear-gradient(90deg, transparent 95%, rgba(78, 204, 163, 0.3) 100%);
  background-size: 20px 20px;
  opacity: 0.4;
  pointer-events: none;
}

.scanning-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--secondary-color);
}

.scanning-corner.top-left {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  animation: pulse-corner 2s ease-in-out infinite;
}

.scanning-corner.top-right {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  animation: pulse-corner 2s ease-in-out infinite 0.5s;
}

.scanning-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  animation: pulse-corner 2s ease-in-out infinite 1s;
}

.scanning-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  animation: pulse-corner 2s ease-in-out infinite 1.5s;
}

@keyframes pulse-corner {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; box-shadow: 0 0 10px var(--secondary-color); }
}

.scanning-text {
  color: var(--secondary-color);
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  margin-top: 20px;
  font-size: 1.2rem;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(78, 204, 163, 0.5);
  animation: text-flicker 3s linear infinite;
}

@keyframes text-flicker {
  0%, 80%, 100% { opacity: 1; }
  85%, 95% { opacity: 0.7; }
}

.scanning-data {
  position: absolute;
  color: var(--secondary-color);
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  animation: data-flicker 1s infinite alternate;
  opacity: 0.7;
  text-shadow: 0 0 5px var(--secondary-color);
}

.data-top-left {
  top: 10px;
  left: 10px;
}

.data-top-right {
  top: 10px;
  right: 10px;
}

.data-bottom-left {
  bottom: 10px;
  left: 10px;
}

.data-bottom-right {
  bottom: 10px;
  right: 10px;
}

.scanning-progress {
  position: relative;
  width: 200px;
  height: 6px;
  background-color: rgba(78, 204, 163, 0.2);
  border-radius: 3px;
  margin-top: 20px;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--secondary-color);
  box-shadow: 0 0 10px var(--secondary-color);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.scanning-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scanning-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  opacity: 0.7;
  animation: float-scan 4s infinite ease-in-out;
  box-shadow: 0 0 5px var(--secondary-color);
}

@keyframes float-scan {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px) translateX(10px);
    opacity: 0.3;
  }
}

.scanning-status {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  width: 200px;
}

.status-label {
  opacity: 0.7;
}

.status-value {
  color: var(--secondary-color);
  animation: value-change 0.5s infinite alternate;
}

@keyframes value-change {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.hexagon-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

.hexagon {
  position: absolute;
  width: 30px;
  height: 34px;
  background-color: rgba(78, 204, 163, 0.1);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: hex-pulse 3s infinite alternate;
}

/* Media Queries */
@media (max-width: 768px) {
  #main-title {
    font-size: 2rem;
  }
  
  #subtitle {
    font-size: 1rem;
  }
  
  .area {
    padding: 20px;
  }
  
  .upload-icon-container {
    width: 70px;
    height: 70px;
  }
  
  .upload-icon {
    width: 30px;
    height: 30px;
  }
  
  .image-scanner {
    width: 80%;
  }
  
  .detector-container {
    padding: 25px;
  }
  
  .apple-info-button {
    font-size: 0.9rem;
    padding: 10px 15px;
  }

  .scanning-container {
    width: 220px;
    height: 220px;
  }

  .scanning-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 20px 15px;
  }
  
  .main-container {
    padding: 15px;
  }
  
  .detector-container {
    padding: 20px;
  }
  
  .area {
    min-height: 180px;
    padding: 15px;
  }
  
  .message {
    padding: 20px;
  }
  
  .message-icon {
    font-size: 2.5rem;
  }
  
  .message-text {
    font-size: 1.1rem;
  }
  
  .prediction-label {
    width: 70px;
    font-size: 0.8rem;
  }
  
  .prediction-percentage {
    width: 45px;
    font-size: 0.8rem;
  }
  
  .corner-decoration {
    width: 10px;
    height: 10px;
  }

  .scanning-container {
    width: 180px;
    height: 180px;
  }

  .scanning-text {
    font-size: 0.9rem;
  }

  .scanning-progress {
    width: 150px;
  }

  .scanning-status {
    width: 150px;
    font-size: 0.7rem;
  }
}

/* PWA-related styles */

/* PWA Install Prompt */
.pwa-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--dark-color);
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 20px;
  width: 90%;
  max-width: 400px;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(78, 204, 163, 0.2);
  animation: slide-up 0.5s ease-out;
  display: none;
}

@keyframes slide-up {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.pwa-prompt-content {
  position: relative;
}

.pwa-prompt-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.pwa-prompt-icon {
  font-size: 1.5rem;
  margin-right: 10px;
  color: var(--secondary-color);
  animation: icon-pulse 2s infinite alternate;
}

.pwa-prompt-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
  flex-grow: 1;
}

.pwa-prompt-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.pwa-prompt-close:hover {
  color: var(--accent-color);
  background-color: rgba(233, 69, 96, 0.1);
  transform: rotate(90deg);
}

.pwa-prompt p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pwa-install-button {
  position: relative;
  background-color: var(--dark-color);
  color: var(--text-primary);
  border: 2px solid var(--secondary-color);
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  width: 100%;
}

.pwa-install-button:hover {
  background-color: rgba(78, 204, 163, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  text-shadow: 0 0 8px var(--secondary-color);
}

/* Network Status Banner */
.network-status {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(233, 69, 96, 0.9);
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: slide-down 0.5s ease-out;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes slide-down {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.network-status-icon {
  font-size: 1.2rem;
  margin-right: 10px;
  animation: pulse 1s infinite alternate;
}

.network-status-text {
  font-size: 0.95rem;
  font-weight: 500;
}

.network-status-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 15px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.network-status-close:hover {
  opacity: 1;
}

/* Share Button */
.share-button-container {
  text-align: center;
  margin-top: 20px;
}

.share-button {
  background-color: var(--dark-color);
  color: var(--text-primary);
  border: 2px solid var(--secondary-color);
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-family: 'Orbitron', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-button:hover {
  background-color: rgba(78, 204, 163, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-icon {
  margin-right: 8px;
  font-size: 1.2rem;
}

/* Add these to the media queries section */
@media (display-mode: standalone) {
  /* Adjustments for when running as installed PWA */
  .header {
    padding-top: 15px;
  }
  
  body {
    overscroll-behavior-y: none; /* Prevents pull-to-refresh */
  }
  
  /* Hide elements that might not work well in standalone mode */
  .ad-container {
    display: none;
  }
}

/* Additional responsive improvements */
@media (max-width: 480px) {
  .pwa-prompt {
    width: 95%;
    bottom: 10px;
  }
  
  .network-status {
    padding: 8px 15px;
  }
  
  .network-status-text {
    font-size: 0.85rem;
  }
}