/* ===================================
   ENTFiX QR Generator Pro - Styles
   =================================== */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  color: #333;
}

/* Header */
.header {
  background: linear-gradient(135deg, #1D3F8B, #25D366);
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px;
}

.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 10px;
}

/* Custom Scrollbar */
.controls-panel::-webkit-scrollbar {
  width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb {
  background: #1D3F8B;
  border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
  background: #25D366;
}

/* Control Groups */
.control-group {
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  color: #333;
}

.control-group:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.control-group h3 {
  color: #1D3F8B;
  margin-bottom: 15px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Content Type Selection */
.content-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.content-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 10px;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
}

.content-type-btn:hover {
  border-color: #1D3F8B;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(29, 63, 139, 0.2);
  color: #1D3F8B;
}

.content-type-btn.active {
  border-color: #25D366;
  background: linear-gradient(135deg, #25D366, #1D3F8B);
  color: white;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.content-type-btn i {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

/* Content Forms */
#content-forms {
  margin-bottom: 20px;
}

.content-form {
  display: none;
}

.content-form.active {
  display: block;
}

/* Form Styles */
.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.form-row:last-child {
  margin-bottom: 0;
}

label {
  min-width: 120px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

input, select, textarea {
  flex: 1;
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: #ffffff;
  color: #495057;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #1D3F8B;
  box-shadow: 0 0 0 3px rgba(29, 63, 139, 0.1);
  background: #ffffff;
}

input::placeholder, textarea::placeholder {
  color: #6c757d;
  opacity: 0.8;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Special Input Types */
input[type="color"] {
  width: 60px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #e9ecef;
}

input[type="color"]:hover {
  border-color: #1D3F8B;
}

input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: #e9ecef;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1D3F8B;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #25D366;
}

/* Range output styling */
.range-output {
  min-width: 50px;
  text-align: center;
  font-weight: bold;
  color: #1D3F8B;
  background: #e3f2fd;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid #90caf9;
  font-size: 12px;
}

/* Color Grid */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.color-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-item label {
  min-width: auto;
  font-size: 12px;
}

/* Checkbox Container */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1D3F8B;
}

/* Character Counter */
.char-counter {
  text-align: right;
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
  padding: 5px 10px;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #dee2e6;
}

/* Password Toggle */
.toggle-password {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: #1D3F8B;
}

/* Theme Buttons */
.theme-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.theme-btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
}

.theme-btn.default {
  background: linear-gradient(135deg, #25D366, #1D3F8B);
  color: white;
}

.theme-btn.whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
}

.theme-btn.gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}

.theme-btn.minimal {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
}

.theme-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Social Logos */
.social-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  background: #f8f9fa;
}

.social-logos img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 3px;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-logos img:hover {
  border-color: #1D3F8B;
  transform: scale(1.15);
  background: rgba(29, 63, 139, 0.1);
  box-shadow: 0 4px 8px rgba(29, 63, 139, 0.2);
}

.social-logos img.selected {
  border-color: #25D366;
  transform: scale(1.15);
  background: rgba(37, 211, 102, 0.1);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Custom scrollbar for social logos */
.social-logos::-webkit-scrollbar {
  width: 6px;
}

.social-logos::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.social-logos::-webkit-scrollbar-thumb {
  background: #1D3F8B;
  border-radius: 3px;
}

.social-logos::-webkit-scrollbar-thumb:hover {
  background: #25D366;
}

/* Preview Panel */
.preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 20px;
}

.qr-container {
  background: #ffffff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 2px solid #e9ecef;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#qr-code {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-caption {
  font-weight: bold;
  color: #1D3F8B;
  margin-top: 15px;
  font-size: 1.1rem;
}

/* Content Preview */
.content-preview {
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  border: 2px solid #dee2e6;
  width: 100%;
  max-width: 400px;
}

.content-preview h4 {
  color: #1D3F8B;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.preview-content {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  max-height: 200px;
  overflow-y: auto;
  word-break: break-word;
  color: #495057;
  line-height: 1.5;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #1D3F8B, #25D366);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active {
  transform: translateY(0);
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: #dc3545;
}

.toast.warning {
  background: #ffc107;
  color: #000;
}

.toast.info {
  background: #17a2b8;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .preview-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .container {
    border-radius: 15px;
  }
  
  .header {
    padding: 20px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .main-content {
    padding: 20px;
  }
  
  .content-type-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  
  .content-type-btn {
    padding: 10px 5px;
    font-size: 10px;
  }
  
  .content-type-btn i {
    font-size: 1.2rem;
  }
  
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  label {
    min-width: auto;
    margin-bottom: 5px;
  }
  
  .color-grid {
    grid-template-columns: 1fr;
  }
  
  .theme-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5rem;
  }
  
  .header p {
    font-size: 1rem;
  }
  
  .control-group {
    padding: 15px;
  }
  
  .content-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .social-logos {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .social-logos img {
    width: 35px;
    height: 35px;
  }
}

/* Dark Mode Support - Remove conflicting rules */
@media (prefers-color-scheme: dark) {
  /* Keep the light theme for better visibility */
  .container {
    background: rgba(255, 255, 255, 0.98);
    color: #333;
  }
  
  .control-group {
    background: #ffffff;
    border-color: #dee2e6;
    color: #333;
  }
  
  input, select, textarea {
    background: #ffffff;
    border-color: #dee2e6;
    color: #495057;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .container {
    box-shadow: none;
    background: white;
  }
  
  .controls-panel {
    display: none;
  }
  
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    display: none;
  }
}