/* QR Zap - Modern Gen-Z Design */

:root {
  /* QR Zap Gen-Z Color Palette - Fun & Energetic */
  --primary-color: #00d4ff;        /* Electric cyan - main zap color */
  --primary-hover: #00b8e6;        /* Darker cyan for hovers */
  --secondary-color: #ff00ff;      /* Vibrant magenta accent */
  --accent-yellow: #ffff00;        /* Bright yellow */
  --accent-pink: #ff69b4;          /* Hot pink */
  --accent-purple: #8b5cf6;        /* Purple */
  --success-color: #00ff88;        /* Neon green for success */
  --error-color: #ff4466;          /* Red for errors */

  /* Dark Theme Colors with Gen-Z twist */
  --bg-color: #0a0f1e;             /* Deep space navy background */
  --card-bg: #14192e;              /* Card background */
  --card-bg-hover: #1a2038;        /* Card hover state */
  --text-color: #ffffff;           /* Pure white text */
  --text-muted: #8b9dc3;           /* Muted blue-gray */
  --border-color: #1e2a47;         /* Subtle borders */
  --input-bg: #0f1523;             /* Input backgrounds */

  /* Shadows & Effects - More vibrant */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5);
  --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.5);
  --glow-rainbow: 0 0 30px rgba(0, 212, 255, 0.4), 0 0 60px rgba(255, 0, 255, 0.3);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
               'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.logo {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.logo .subtitle {
  display: block;
  font-size: 2rem;
  letter-spacing: 0.5em;
  margin-top: 0.25rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--card-bg-hover);
  box-shadow: var(--shadow-lg);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon {
  width: 24px;
  height: 24px;
  stroke: var(--primary-color);
}

.icon-small {
  width: 16px;
  height: 16px;
}

/* Language Switcher - Compact Top Right */
.language-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
  background: rgba(20, 25, 45, 0.8);
  backdrop-filter: blur(10px);
  padding: 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--primary-color);
}

.lang-btn.active {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.flag-icon {
  font-size: 1rem;
  line-height: 1;
}

.lang-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .language-switcher {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem;
  }

  .lang-btn {
    padding: 0.3rem 0.5rem;
  }

  .lang-text {
    display: none;
  }

  .flag-icon {
    font-size: 1.2rem;
  }
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.form-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--glow-cyan);
}

.form-group input[type="color"] {
  height: 50px;
  cursor: pointer;
}

.form-group small {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

/* Buttons */
.btn {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(255, 0, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00b8e6, #cc00cc);
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6), 0 0 60px rgba(255, 0, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #7c3aed, #ff1493);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.btn-copy {
  background: var(--success-color);
  color: var(--bg-color);
  padding: 0.875rem 1.5rem;
}

.btn-copy:hover {
  background: #00e67a;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Results */
.result {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 0.3s ease;
}

.result.hidden {
  display: none;
}

.result h3 {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 600;
}

/* QR Display */
.qr-display {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: white;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.qr-display svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Short URL Container */
.short-url-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.short-url-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--primary-color);
  font-size: 1rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-weight: 600;
}

/* Actions */
.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  background: var(--input-bg);
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
}

/* Stats Display */
#stats-display {
  padding: 1.5rem;
  background: var(--input-bg);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}

#stats-display h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.1rem;
}

#stats-display p {
  margin: 0.5rem 0;
  color: var(--text-muted);
  line-height: 1.8;
}

#stats-display strong {
  color: var(--text-color);
}

#stats-display a {
  color: var(--primary-color);
  text-decoration: none;
  word-break: break-all;
}

#stats-display a:hover {
  text-decoration: underline;
}

.analytics-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 1rem;
}

.analytics-item {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: var(--card-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--success-color);
  color: var(--bg-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-weight: 600;
  animation: slideIn 0.3s ease-out;
  max-width: 400px;
}

.toast.hidden {
  display: none;
}

.toast.error {
  background: var(--error-color);
  color: white;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Loading Overlay */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 30, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.loading.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Info Sections - Compact & Centered */
.info-section {
  margin: 3rem auto;
  max-width: 900px;
  padding: 1.5rem;
  background: rgba(20, 25, 45, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.section-icon {
  width: 20px;
  height: 20px;
  stroke: var(--primary-color);
}

.info-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

/* Privacy Section */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-card {
  background: rgba(0, 212, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.05);
}

.info-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.info-card h3 {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.info-card p {
  color: var(--text-secondary);
  line-height: 1.4;
  font-size: 0.8rem;
  margin: 0;
}

.info-card strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Use Cases Section */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.use-case-card {
  background: rgba(0, 212, 255, 0.02);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: default;
}

.use-case-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.25);
  background: rgba(0, 212, 255, 0.04);
}

.use-case-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.use-case-card h3 {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.3rem 0;
}

.use-case-card p {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.3;
  margin: 0;
}

.use-case-card strong {
  color: var(--primary-color);
  font-weight: 500;
}

.use-case-tip {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(255, 208, 0, 0.08);
  border: 1px solid rgba(255, 208, 0, 0.2);
  border-radius: 8px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

.use-case-tip strong {
  color: #ffd000;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
  font-size: 0.9rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0.75rem;
  }

  .header {
    margin-bottom: 2rem;
    padding: 1rem 0;
  }

  .logo {
    font-size: 2.5rem;
  }

  .logo .subtitle {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card-header h2 {
    font-size: 1.25rem;
  }

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

  .short-url-container {
    flex-direction: column;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

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

@media (max-width: 480px) {
  .logo {
    font-size: 2rem;
  }

  .logo .subtitle {
    font-size: 1.25rem;
  }

  .card {
    padding: 1.25rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Removed duplicates - using compact version defined earlier (lines 132-203) */

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .btn,
  .toast,
  .loading,
  .language-switcher {
    display: none;
  }
}

/* Removed duplicates - responsive styles defined earlier (lines 185-203) */

/* Header - QR Zap Gen-Z Style */
.logo-main {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-family: 'Impact', 'Arial Black', sans-serif;
  text-transform: uppercase;
  animation: pulseGlow 3s ease-in-out infinite;
}

.logo-emphasis {
  color: var(--primary-color);
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.8), 0 0 50px rgba(255, 0, 255, 0.4);
  animation: zapGlow 2s ease-in-out infinite alternate;
}

@keyframes zapGlow {
  0% {
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.8), 0 0 50px rgba(255, 0, 255, 0.4);
  }
  100% {
    text-shadow: 0 0 40px rgba(0, 212, 255, 1), 0 0 70px rgba(255, 0, 255, 0.6), 0 0 90px rgba(255, 255, 0, 0.3);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.logo-sub {
  font-size: 1.1rem;
  color: var(--primary-color);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Marketing Badges - Gen-Z Fun */
.marketing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.badge {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
  animation: badgeFloat 3s ease-in-out infinite;
}

.badge:nth-child(1) {
  animation-delay: 0s;
  background: linear-gradient(135deg, #00d4ff, #00ff88);
}

.badge:nth-child(2) {
  animation-delay: 0.5s;
  background: linear-gradient(135deg, #ff00ff, #ff69b4);
}

.badge:nth-child(3) {
  animation-delay: 1s;
  background: linear-gradient(135deg, #8b5cf6, #00d4ff);
}

.badge:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.3);
}

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

/* Update header box styling */
.header {
  background: linear-gradient(135deg, var(--card-bg) 0%, #1a1f3a 100%);
  border-radius: 20px;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 212, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.05), transparent);
  animation: headerShine 8s linear infinite;
}

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