/* Subscribe-New Page Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Theme Variables */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-gradient: linear-gradient(135deg, #0066CC 0%, #002266 100%);
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --card-shadow: 0 10px 30px rgba(0,0,0,0.1);
  --accent-color: #0066CC;
  --accent-hover: #004499;
  --card-bg: #ffffff;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --card-shadow: 0 10px 30px rgba(0,0,0,0.5);
  --accent-color: #3d8eff;
  --accent-hover: #2d7ee6;
  --card-bg: #1a1a1a;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

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

/* Autofill detection animations */
@keyframes onAutoFillStart { from { background: transparent; } to { background: transparent; } }
@keyframes onAutoFillCancel { from { background: transparent; } to { background: transparent; } }

input:-webkit-autofill {
  animation-name: onAutoFillStart;
  animation-duration: 0.001s;
}

input:not(:-webkit-autofill) {
  animation-name: onAutoFillCancel;
  animation-duration: 0.001s;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Header */
.header {
  background: var(--bg-primary);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8em;
  font-weight: bold;
  color: var(--accent-color);
}

.logo-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,102,204,0.3);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 0.95em;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  padding: 10px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  font-size: 0.9em;
  color: var(--text-primary);
}

.theme-toggle:hover {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

/* News Ticker for Travel/Visa Updates */
.news-ticker {
  background: linear-gradient(135deg, var(--accent-color) 0%, #004999 100%);
  color: #ffffff;
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-ticker-content {
  display: flex;
  animation: scroll-left 45s linear infinite;
  white-space: nowrap;
  color: #ffffff;
}

.news-item {
  display: inline-flex;
  align-items: center;
  padding: 0 40px;
  font-weight: 500;
  font-size: 0.95em;
  color: #ffffff;
}

.news-icon {
  margin-right: 10px;
  font-size: 1.2em;
  color: #ffffff;
}

.news-link {
  color: #ffffff;
  text-decoration: none;
}

.news-link:hover {
  text-decoration: underline;
}

.news-item:not(:last-child)::after {
  content: '•';
  margin-left: 40px;
  opacity: 0.6;
  color: #ffffff;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.news-ticker:hover .news-ticker-content {
  animation-play-state: paused;
}

/* News Archive Cards */
.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.news-card:hover {
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
  border-color: var(--accent-color);
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 8px;
}

.news-card-headline {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  font-size: 1.05em;
}

.news-card-date {
  font-size: 0.85em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.news-card-source {
  margin-top: 8px;
}

.news-card-source a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.news-card-source a:hover {
  text-decoration: underline;
}

.news-card-source a::before {
  content: '🔗';
  font-size: 0.85em;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  color: white;
}

.hero h1 {
  font-size: clamp(2.5em, 5vw, 3.8em);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero .tagline {
  font-size: clamp(1.2em, 3vw, 1.6em);
  opacity: 0.95;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.trust-badge {
  text-align: center;
}

.trust-badge .number {
  font-size: 2.8em;
  font-weight: bold;
  display: block;
}

.trust-badge .label {
  font-size: 0.95em;
  opacity: 0.85;
}

/* Why Choose Section */
.why-section {
  margin: 60px 0;
}

.why-section h2 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 50px;
  color: white;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.comparison-card {
  background: var(--bg-primary);
  padding: 35px;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.comparison-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.comparison-card.highlight {
  border: 3px solid #FF6B00;
}

.comparison-card .badge {
  position: absolute;
  top: -12px;
  right: 25px;
  background: linear-gradient(135deg, #FF6B00, #FF8C00);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(255,107,0,0.4);
}

.comparison-card h3 {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.comparison-card .price-tag {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--accent-color);
  margin: 20px 0;
}

.comparison-card ul {
  list-style: none;
  margin-top: 25px;
}

.comparison-card li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.comparison-card li:last-child {
  border-bottom: none;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 40px;
  margin: 30px 0;
  box-shadow: var(--card-shadow);
  animation: slideIn 0.5s ease-out;
  transition: background 0.3s ease;
}

/* Offer Banner */
.offer-banner {
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
  color: white;
  text-align: center;
  padding: 40px;
  border-radius: 16px;
  margin: 40px 0;
  box-shadow: 0 10px 30px rgba(255,107,0,0.3);
  animation: pulse 3s infinite;
}

.offer-banner h2 {
  font-size: 2.5em;
  margin-bottom: 15px;
}

.offer-banner .price {
  font-size: 4.5em;
  font-weight: bold;
  margin: 15px 0;
}

.offer-banner .duration {
  font-size: 1.6em;
  opacity: 0.95;
}

.offer-banner .features {
  margin-top: 25px;
  font-size: 1.15em;
  line-height: 1.8;
}

/* Forms */
.subscribe-form {
  background: var(--bg-secondary);
  padding: 35px;
  border-radius: 12px;
  margin: 30px 0;
}

.input-group {
  margin: 18px 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

input, select, textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.subscribe-btn, .generate-btn {
  width: 100%;
  padding: 18px 40px;
  border: none;
  border-radius: 10px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.subscribe-btn {
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(255,107,0,0.4);
}

.subscribe-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(255,107,0,0.5);
}

.generate-btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: white;
}

.generate-btn:hover {
  transform: scale(1.02);
}

.subscribe-btn:disabled, .generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Status Messages */
.subscription-active {
  background: linear-gradient(135deg, #00C851 0%, #00A345 100%);
  color: white;
  padding: 35px;
  border-radius: 12px;
  text-align: center;
  display: none;
  margin-bottom: 30px;
}

.subscription-active h2 {
  font-size: 2em;
  margin-bottom: 15px;
}

.subscription-active .days-remaining {
  font-size: 3em;
  font-weight: bold;
  margin: 15px 0;
}

.error {
  background: #ffebee;
  color: #c62828;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  display: none;
}

.success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  display: none;
}

[data-theme="dark"] .error {
  background: #5d1f1f;
  color: #ff6b6b;
}

[data-theme="dark"] .success {
  background: #1f5d2f;
  color: #69f0ae;
}

.loading {
  display: none;
  text-align: center;
  padding: 30px;
}

.spinner {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.result {
  background: var(--bg-secondary);
  padding: 25px;
  border-radius: 10px;
  margin-top: 25px;
  border: 2px solid var(--accent-color);
  display: none;
  color: var(--text-primary);
  line-height: 1.6;
}

.result h1 {
  font-size: 2em;
  color: var(--accent-color);
  margin: 20px 0 15px 0;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
}

.result h2 {
  font-size: 1.5em;
  color: var(--accent-color);
  margin: 18px 0 12px 0;
}

.result h3 {
  font-size: 1.2em;
  color: var(--text-primary);
  margin: 15px 0 10px 0;
  font-weight: 600;
}

.result p {
  margin: 12px 0;
  line-height: 1.7;
}

.result ul {
  margin: 15px 0;
  padding-left: 0;
  list-style: none;
}

.result li {
  margin: 8px 0;
  padding-left: 25px;
  position: relative;
}

.result li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.result strong {
  color: var(--accent-color);
  font-weight: 600;
}

.result em {
  font-style: italic;
  color: var(--text-secondary);
}

/* Table styles for markdown tables */
.result table, .result .markdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.result table thead {
  background: linear-gradient(135deg, var(--accent-color) 0%, #004999 100%);
  color: white;
}

.result table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.result table tbody tr:hover {
  background: rgba(0, 102, 204, 0.05);
  transition: background 0.2s ease;
}

.result table tbody tr:last-child td {
  border-bottom: none;
}

/* Links in content */
.result a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.result a:hover {
  border-bottom: 1px solid var(--accent-color);
  color: #004999;
}

.result a::after {
  content: ' 🔗';
  font-size: 0.8em;
  opacity: 0.6;
}

/* Screenshot protection for premium content */
.result.protected {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto;
  position: relative;
}

.result.protected::before {
  content: 'REXVIS - Download to Save';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 3em;
  opacity: 0.05;
  pointer-events: none;
  white-space: nowrap;
  font-weight: bold;
  z-index: 1;
}

.result.protected::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 100px,
    rgba(0, 102, 204, 0.02) 100px,
    rgba(0, 102, 204, 0.02) 200px
  );
  pointer-events: none;
  z-index: 0;
}

.result.protected > * {
  position: relative;
  z-index: 2;
}

.download-notice {
  background: linear-gradient(135deg, #ff6b00 0%, #ff8800 100%);
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
  display: none;
}

.generator {
  display: none;
  margin-top: 30px;
}

.generator h2 {
  color: var(--text-primary);
  margin-bottom: 25px;
}

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: 60px 20px 30px;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-section h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.3em;
}

.footer-section p, .footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  margin: 10px 0;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9em;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  overflow-y: auto;
}

.modal-content {
  background: var(--bg-primary);
  max-width: 800px;
  margin: 50px auto;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2em;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--accent-color);
}

.modal h2 {
  color: var(--text-primary);
  margin-bottom: 25px;
  font-size: 2em;
}

.modal p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 15px 0;
}

.modal h3 {
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.5em;
}

.modal ul {
  color: var(--text-secondary);
  margin-left: 25px;
  line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    text-align: center;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 15px;
  }
  
  .hero h1 {
    font-size: 2.2em;
  }
  
  .offer-banner .price {
    font-size: 3.5em;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .trust-badges {
    gap: 30px;
  }
}

/* Additional utility classes */
.section-top-margin {
  margin-top: 80px;
}

.centered-text {
  text-align: center;
  color: white;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 1.1em;
  opacity: 0.9;
}

.unstyled-list {
  list-style: none;
  padding: 0;
}

.list-item-spaced {
  margin: 15px 0;
  padding-left: 0;
}

.link-accent {
  color: var(--accent-color);
  font-size: 0.9em;
}

.footer-note {
  margin-top: 20px;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.cta-text {
  margin-top: 20px;
  opacity: 0.9;
}

.section-title-centered {
  text-align: center;
  margin-bottom: 30px;
}

.readonly-input {
  background: var(--bg-secondary);
}

.disclaimer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.modal-link {
  color: var(--accent-color);
}

.credits-text {
  margin-top: 10px;
  font-size: 0.9em;
  opacity: 0.8;
}

.credits-link {
  color: inherit;
  text-decoration: underline;
}

.emphasized-text {
  margin-top: 20px;
}

.modal-wide {
  max-width: 900px;
}

.news-archive-content {
  margin-top: 20px;
}

.loading-text {
  text-align: center;
  color: var(--text-secondary);
}
