/* Orbit Theme - QR Generator */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700;800&display=swap');

:root {
  --primary: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --bg-gradient-start: #1e293b;
  /* Slate 800 (lighter for iframe) */
  --bg-gradient-end: #0f172a;
  /* Slate 900 */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 1rem;
  background: transparent;
  /* Let main app background show through or blend */
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  /* Prevent X scroll */
}

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

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.container {
  width: 100%;
  max-width: 700px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  animation: fadeIn 0.5s ease-out;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.emoji-icon {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: initial;
}

/* Inputs & Form Elements */
label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
  margin-bottom: 0;
  /* Handled by grid gap */
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Custom Mode Selector */
.glass-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  cursor: pointer;
}

.glass-select:hover {
  background-color: rgba(30, 41, 59, 0.8) !important;
  border-color: var(--primary) !important;
}

.glass-select option {
  background-color: #0f172a;
  color: white;
  padding: 10px;
}

/* File Input Customization */
input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  margin-right: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.options label {
  display: flex;
  flex-direction: column;
}

/* Checkboxes */
input[type="checkbox"] {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Button */
button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.5rem;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
}

button:active {
  transform: translateY(0);
}

button.btn-download:hover {
  background: #16a34a !important;
  /* Darker green on hover */
  box-shadow: 0 20px 25px -5px rgba(34, 197, 94, 0.5) !important;
}

/* QR Container */
#qr-container {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: white;
  /* QR needs proper contrast if transparent */
  border-radius: 16px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  /* Ensure it doesn't overflow parent */
  overflow: hidden;
  /* Safety clipping */
}

#qr-container canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* If transparent BG is selected, maybe we show a checkerboard behind it? For now white is safe for preview */

/* Footer */
footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #a5b4fc;
}

/* Utilities */
.hidden {
  display: none !important;
}

.flex-row {
  display: flex;
  align-items: center;
}

/* Override legacy dark mode styles since we are always dark */
body.dark-mode {
  background: transparent;
  color: var(--text-main);
}