/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #1e1b4b 0%, #3b0764 100%);
  color: #e2e8f0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Holographic Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: -2;
}

/* Particle Background */
#particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 15s infinite linear;
}

/* Container */
.container {
  background: rgba(15, 23, 42, 0.9);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
  max-width: 650px;
  width: 90%;
  margin: 40px auto;
  position: relative;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 36px;
  font-weight: 800;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-shadow: 0 0 10px rgba(165, 180, 252, 0.5);
}

.header p {
  font-size: 16px;
  color: #94a3b8;
  margin-top: 12px;
}

/* Form Styles */
.qr-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  position: relative;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #c7d2fe;
  margin-bottom: 10px;
}

.form-group input,
.form-group .custom-select {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2), inset -2px -2px 5px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  background: rgba(30, 41, 59, 1);
}

.form-group input::placeholder {
  color: #64748b;
}

/* Custom Select */
.custom-select {
  position: relative;
  user-select: none;
}

.select-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2), -2px -2px 5px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.select-selected:hover {
  background: rgba(51, 65, 85, 0.8);
}

.select-items {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-height: 350px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  transform: scaleY(0);
  transform-origin: top;
  transition: all 0.3s ease;
}

.select-items.show {
  display: flex;
  flex-direction: column;
  transform: scaleY(1);
}

.select-items div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.select-items div:hover {
  background: rgba(51, 65, 85, 0.8);
}

.select-items img,
.select-selected img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

/* Button Styles */
.btn {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(90deg, #7c3aed, #db2777);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.7);
}

.btn-primary:disabled {
  background: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.8);
  color: #c7d2fe;
}

.btn-secondary:hover {
  background: rgba(71, 85, 105, 0.8);
}

.btn-submit {
  background: linear-gradient(90deg, #7c3aed, #db2777);
  color: #ffffff;
  width: 100%;
  padding: 18px;
  font-size: 18px;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.7);
}

/* QR Code Container */
.qr-code-container {
  margin-top: 30px;
  padding: 20px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 12px;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
}

.qr-placeholder i {
  font-size: 56px;
}

.qr-code-container img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.5s ease;
}

/* Download Container */
.download-container {
  margin-top: 20px;
  text-align: center;
}

/* Loading Overlay */
.loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 24px;
  z-index: 10;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #7c3aed;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-overlay p {
  margin-top: 12px;
  color: #c7d2fe;
  font-weight: 600;
}

/* Popup Styles */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: rgba(15, 23, 42, 0.95);
  padding: 30px;
  border-radius: 20px;
  max-width: 550px;
  width: 90%;
  position: relative;
  animation: slideIn 0.5s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.popup-header h2 {
  font-size: 26px;
  color: #a5b4fc;
}

.popup-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #94a3b8;
}

.popup-body p {
  font-size: 16px;
  color: #e2e8f0;
  margin-bottom: 15px;
}

.popup-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: rgba(15, 23, 42, 0.95);
  padding: 30px;
  border-radius: 20px;
  max-width: 550px;
  width: 90%;
  text-align: center;
  animation: slideIn 0.5s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
  font-size: 26px;
  color: #f43f5e;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-content p,
.modal-content ul {
  font-size: 16px;
  color: #e2e8f0;
  margin-bottom: 20px;
}

.modal-content ul {
  text-align: left;
  list-style: disc;
  padding-left: 20px;
}

/* Error Message */
.error-message {
  font-size: 12px;
  color: #f43f5e;
  position: absolute;
  bottom: -20px;
  left: 0;
  display: none;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.9);
  position: relative;
  bottom: 0;
  width: 100%;
}

.social-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  color: #e2e8f0;
  font-size: 22px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: #7c3aed;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 600px) {
  .container {
    padding: 20px;
    margin: 20px auto;
  }

  .header h1 {
    font-size: 28px;
  }

  .form-group input,
  .form-group .custom-select {
    padding: 14px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 14px;
  }

  .popup-content,
  .modal-content {
    padding: 20px;
    width: 95%;
  }
}

@media (max-width: 400px) {
  .header h1 {
    font-size: 24px;
  }

  .form-group label {
    font-size: 12px;
  }
}