/* Mark My Merchant - Professional PDF Watermarking Solution */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  min-height: 100vh;
  padding: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  min-height: 100vh;
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.header {
  background: linear-gradient(135deg, #1e40af 0%, #3730a3 50%, #581c87 100%);
  color: white;
  padding: 40px 40px 30px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.logo-icon {
  font-size: 3rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-info h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.security-badges {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.badge:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Features Bar */
.features-bar {
  background: #f8fafc;
  padding: 25px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature span {
  font-weight: 600;
  color: #374151;
}

/* Upload Section */
.upload-section {
  padding: 50px 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 400;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.upload-group {
  position: relative;
}

.upload-label {
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.upload-label:hover {
  transform: translateY(-3px);
}

.upload-box {
  border: 3px dashed #d1d5db;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.upload-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.pdf-upload:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.logo-upload:hover {
  border-color: #8b5cf6;
  background: #f3f4f6;
}

.upload-box:hover::before {
  left: 100%;
}

.upload-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0.8;
}

.upload-text {
  margin-bottom: 15px;
}

.upload-text strong {
  display: block;
  font-size: 1.3rem;
  color: #1f2937;
  margin-bottom: 8px;
  font-weight: 600;
}

.upload-text span {
  display: block;
  color: #6b7280;
  font-size: 1rem;
  margin-bottom: 5px;
}

.upload-text small {
  color: #9ca3af;
  font-size: 0.85rem;
  font-style: italic;
}

.upload-specs {
  font-size: 0.8rem;
  color: #9ca3af;
  background: rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 10px;
}

/* Hidden file inputs */
input[type="file"] {
  display: none;
}

/* File Lists */
.file-list {
  margin-top: 20px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  border-left: 4px solid #3b82f6;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: #e5e7eb;
  transform: translateX(5px);
}

.file-item::before {
  content: "📄";
  margin-right: 12px;
  font-size: 1.2rem;
}

/* Logo Preview */
.logo-preview {
  margin-top: 20px;
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.logo-preview img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
}

/* Watermark Options */
.watermark-options {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 35px;
  border-radius: 20px;
  margin: 40px 0;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.options-header {
  text-align: center;
  margin-bottom: 30px;
}

.options-header h3 {
  color: #1e293b;
  margin-bottom: 8px;
  font-size: 1.5rem;
  font-weight: 600;
}

.options-header p {
  color: #64748b;
  font-size: 1rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.option-group {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.option-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.option-group label {
  display: block;
  margin-bottom: 15px;
}

.option-label {
  display: block;
  font-weight: 600;
  color: #374151;
  font-size: 1rem;
  margin-bottom: 4px;
}

.option-description {
  display: block;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 400;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.option-group input[type="range"] {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
}

.option-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}

.option-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

.slider-value {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
  min-width: 45px;
  text-align: center;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 6px;
}

.option-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  font-size: 1rem;
  color: #374151;
  transition: all 0.2s ease;
  cursor: pointer;
}

.option-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Process Button */
.process-btn {
  width: 100%;
  padding: 20px 40px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.process-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.process-btn:active {
  transform: translateY(-1px);
}

.process-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  font-size: 1.3rem;
}

.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Progress Section */
.progress-section {
  padding: 50px 40px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e2e8f0;
}

.progress-container {
  max-width: 600px;
  margin: 0 auto;
}

.progress-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: rotate 2s linear infinite;
}

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

.progress-container h3 {
  color: #1f2937;
  font-size: 1.8rem;
  margin-bottom: 30px;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #8b5cf6);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 6px;
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.progress-text {
  color: #6b7280;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.security-icon {
  font-size: 1.2rem;
}

/* Download Section */
.download-section {
  padding: 50px 40px;
  text-align: center;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border-top: 1px solid #bbf7d0;
}

.success-message {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 25px;
  animation: bounce 0.8s ease-out;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-8px);
  }
}

.success-message h3 {
  color: #166534;
  font-size: 2rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.success-message p {
  color: #15803d;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 35px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
  margin-bottom: 25px;
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(5, 150, 105, 0.4);
}

.download-icon {
  font-size: 1.3rem;
}

.download-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #059669;
  font-size: 0.9rem;
  font-weight: 500;
}

.info-icon {
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 50px 40px 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h4 {
  color: #f9fafb;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.footer-section p {
  line-height: 1.6;
  color: #9ca3af;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  padding: 5px 0;
  color: #9ca3af;
  position: relative;
  padding-left: 20px;
}

.footer-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 0;
    border-radius: 0;
  }

  .header {
    padding: 30px 20px;
  }

  .logo-section {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .brand-info h1 {
    font-size: 2.2rem;
  }

  .security-badges {
    justify-content: center;
  }

  .features-bar {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .upload-section {
    padding: 30px 20px;
  }

  .upload-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .watermark-options {
    padding: 25px 20px;
  }

  .download-info {
    flex-direction: column;
    gap: 15px;
  }

  .footer {
    padding: 30px 20px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 480px) {
  .brand-info h1 {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .upload-box {
    padding: 25px 20px;
    min-height: 160px;
  }

  .upload-icon {
    font-size: 2.8rem;
  }

  .process-btn {
    padding: 16px 25px;
    font-size: 1.1rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }
}

/* Email Collection Modal */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.close-modal {
  font-size: 2rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.close-modal:hover {
  color: #374151;
}

.modal-body {
  padding: 30px;
}

.modal-body p {
  color: #374151;
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.6;
}

.email-input-group {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.email-input-group input[type="email"] {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  color: #374151;
  transition: all 0.2s ease;
}

.email-input-group input[type="email"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.email-submit-btn {
  padding: 15px 25px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.email-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.privacy-note {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
}

.privacy-note small {
  color: #1e40af;
  font-weight: 500;
}

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-header {
    padding: 20px 25px 15px;
  }

  .modal-body {
    padding: 25px;
  }

  .email-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .email-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* === Top-right Upgrade pill === */
.header-cta {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2; /* above grid overlay */
}

.cta-pro {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #ffd166; /* warm yellow */
  color: #111827; /* dark text */
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15), inset 0 -2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(17, 24, 39, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.cta-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
  background: #ffca5c;
}

.cta-pro:active {
  transform: translateY(0);
}

.cta-pro:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.45);
  border-color: rgba(17, 24, 39, 0.25);
}

.cta-icon {
  font-size: 1rem;
}

/* keep it accessible on small screens */
@media (max-width: 480px) {
  .header-cta {
    top: 12px;
    right: 12px;
  }
  .cta-pro {
    padding: 10px 14px;
    font-size: 0.95rem;
  }
}

/* Form layout inside upgrade modal */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 0.95rem;
  color: #374151;
  font-weight: 600;
}
.form-field input {
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
