/* =============================================
   ISWPL QR Generator - Modern Styles
   Optimized | Clean | Modern | Responsive
   Updated: April 2026
   ============================================= */

/* ====================== GLOBAL RESET ====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, sans-serif;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

/* ====================== MAIN CONTAINER ====================== */
.container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 2.8rem 2rem;
  border-radius: 28px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.12),
    0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: 520px;
  width: 100%;
  text-align: center;
}

/* ====================== TYPOGRAPHY ====================== */
h1 {
  font-size: 2.35rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.4rem;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* ====================== FORM STYLES ====================== */
.form-group {
  margin-bottom: 2.2rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  color: #475569;
  font-weight: 600;
  font-size: 1.1rem;
}

input[type="text"] {
  width: 100%;
  padding: 18px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1.1rem;
  background: #f8fafc;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* ====================== BUTTONS - BASE STYLES ====================== */
.generate-btn,
.download-btn,
.new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  margin: 8px 0;
}

/* ====================== GENERATE BUTTON (Index Page) ====================== */
.generate-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.generate-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
}

/* ====================== MODERN DOWNLOAD BUTTON (Preview Page) ====================== */
.download-section {
  margin: 2.8rem 0 2.2rem;
  display: flex;
  justify-content: center;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 48px;
  background: linear-gradient(135deg, #22c55e 0%, #10b981 50%, #059669 100%);
  color: white;
  font-size: 1.18rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 300px;
  border: none;
  position: relative;
  overflow: hidden;
}

.download-btn:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 25px 50px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

.download-btn:active {
  transform: scale(0.98);
}

/* Shine effect on hover (Premium feel) */
.download-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.6s;
}

.download-btn:hover::before {
  left: 200%;
}

/* ====================== NEW QR BUTTON (Secondary) ====================== */
.actions {
  margin-top: 1.5rem;
  text-align: center;
}

.new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 38px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(71, 85, 105, 0.3);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 240px;
  border: none;
}

/* Hover effect for secondary button */
.new-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(71, 85, 105, 0.4);
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.new-btn:active {
  transform: scale(0.97);
}

/* ====================== QR PREVIEW AREA ====================== */
.qr-preview {
  margin: 2rem 0;
  padding: 2.2rem;
  background: #f8fafc;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f5f9;
}

.qr-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  background: white;
  padding: 12px;
}

/* ====================== PREVIEW PAGE SPECIFIC ====================== */
.preview-body {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.preview-body .container {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
}

/* ====================== FOOTER ====================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  padding: 1.1rem 0;
  text-align: center;
  z-index: 1000;
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
  font-size: 0.92rem;
  font-weight: 500;
}

.footer-content strong {
  color: #c4d0ff;
  font-weight: 600;
}

.footer-content a {
  color: #a5b4fc;
  text-decoration: none;
}

.footer-content a:hover {
  color: #e0e7ff;
}

/* ====================== RESPONSIVE DESIGN ====================== */
@media (max-width: 600px) {
  .container {
    padding: 2rem 1.5rem;
    border-radius: 24px;
  }

  h1 {
    font-size: 2.1rem;
  }

  .generate-btn,
  .download-btn,
  .new-btn {
    width: 100%;
    margin: 10px 0;
  }
}

@media (max-width: 768px) {
  .download-section {
    flex-direction: column;
    gap: 12px;
  }

  .qr-preview {
    padding: 1.8rem 1rem;
  }
}

/* Extra safety for very small landscape screens */
@media (max-height: 520px) and (orientation: landscape) {
  body {
    padding-bottom: 70px;
  }

  .footer {
    padding: 0.8rem 0;
    font-size: 0.85rem;
  }
}

/* ====================== UTILITY ====================== */
small {
  color: #888;
  font-size: 0.95rem;
  display: block;
  margin-top: 0.8rem;
  font-style: italic;
}
