/* Enhanced QR Code Generator Styles */

/* Base Typography */
BODY, TH, TD, INPUT, SELECT, TEXTAREA {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* Headings with Modern Styling */
H1 { 
  font-size: 2.5rem; 
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

H2 { 
  font-size: 2rem; 
  font-weight: 600;
  color: #2c3e50;
}

H3 { 
  font-size: 1.5rem; 
  font-weight: 600;
  color: #34495e;
}

H4, H5, H6 { 
  font-weight: 500;
  color: #34495e;
}

/* Enhanced Body Styling */
BODY {
  color: #2c3e50;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Modern Layout Components */
.page-header {
  margin: 2rem 0;
  text-align: center;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #e74c3c);
  border-radius: 2px;
}

.page-footer {
  margin: 2rem 0;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
}

.section {
  margin: 2rem 0;
  position: relative;
  z-index: 10;
}

/* Enhanced Form Elements */
INPUT[type="text"],
INPUT[type="email"],
INPUT[type="url"],
SELECT,
TEXTAREA {
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  color: #2c3e50;
}

/* Specific styling for SELECT elements and their options */
SELECT {
  background-color: #ffffff;
  color: #2c3e50;
}

SELECT option {
  background-color: #ffffff;
  color: #2c3e50;
  padding: 8px 12px;
}

INPUT[type="text"]:focus,
INPUT[type="email"]:focus,
INPUT[type="url"]:focus,
SELECT:focus,
TEXTAREA:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  background: rgba(255, 255, 255, 0.98);
  color: #2c3e50;
  transform: translateY(-1px);
}

/* Enhanced Buttons */
INPUT[type="button"],
INPUT[type="submit"],
BUTTON {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: none;
  border-radius: 25px;
  color: white;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

INPUT[type="button"]:hover,
INPUT[type="submit"]:hover,
BUTTON:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1f4e79 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

INPUT[type="button"]:active,
INPUT[type="submit"]:active,
BUTTON:active {
  transform: translateY(0);
}

/* QR Code Display Enhancement */
#qr {
  display: inline-block;
  padding: 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#qr:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #3498db;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Form Validation */
.is-invalid {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus Management */
*:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  INPUT, SELECT, TEXTAREA {
    border-width: 3px;
  }
  
  INPUT[type="button"],
  INPUT[type="submit"],
  BUTTON {
    border: 3px solid #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Force correct colors for form elements */
SELECT,
SELECT option {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Ensure dropdown arrow is visible */
SELECT {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Override browser default styles */
SELECT::-ms-expand {
  display: none;
}

/* Cross-browser compatibility for select styling */
@supports (-webkit-appearance: none) or (-moz-appearance: none) or (appearance: none) {
  SELECT {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
  }
  
  SELECT option {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
  }
}

/* Print Styles */
@media print {
  BODY {
    background: white !important;
    color: black !important;
  }
  
  .navbar,
  .social,
  button,
  input[type="button"],
  input[type="submit"] {
    display: none !important;
  }
  
  #qr {
    box-shadow: none !important;
    border: 2px solid #000;
  }
}

