*, *::before, *::after {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Times New Roman", Georgia, serif;
  background: #c0c0c0;
  color: #000033;
}

/* Top navy banner */
.top-banner {
  background: linear-gradient(to right, #1b1464, #0077b6, #00b4d8);
  padding: 6px 0;
  overflow: hidden;
}
.ticker {
  white-space: nowrap;
}
.ticker span {
  display: inline-block;
  color: #ffff00;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  animation: scroll-left 20s linear infinite;
}
@keyframes scroll-left {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* Navigation bar */
.nav-bar {
  background: #1b1464;
  border-top: 3px ridge #c0c0c0;
  border-bottom: 3px ridge #c0c0c0;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 0;
}
nav {
  text-align: center;
}
nav a {
  color: #00b4d8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  padding: 4px 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
nav a:hover {
  color: #ffff00;
  text-decoration: underline;
}
nav .sep {
  color: #555;
  font-family: Arial, sans-serif;
}

/* Auth controls in nav */
.nav-bar .auth-group {
  white-space: nowrap;
  margin-left: 8px;
}
.nav-bar .auth-user {
  color: #ffff00;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: bold;
  margin-right: 6px;
  letter-spacing: 1px;
}
.nav-bar .auth-btn {
  background: #c0c0c0;
  color: #1b1464;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 3px 14px;
  border: 2px outset #ffffff;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-bar .auth-btn:active {
  border-style: inset;
}
.nav-bar .auth-btn:hover {
  background: #e0e0e0;
}
.nav-bar .auth-btn .auth-btn-short {
  display: none;
}
@media (max-width: 768px) {
  .nav-bar .auth-btn .auth-btn-full {
    display: none;
  }
  .nav-bar .auth-btn .auth-btn-short {
    display: inline;
  }
}

/* Header / logo area */
header {
  background: linear-gradient(180deg, #ffffff 0%, #d0d0d0 100%);
  text-align: center;
  padding: 24px 20px 16px;
  border-bottom: 3px ridge #808080;
}
header img {
  max-width: 520px;
  width: 100%;
  height: auto;
}

/* Horizontal rule style */
.fancy-hr {
  border: none;
  height: 3px;
  background: linear-gradient(to right, #1b1464, #0077b6, #00b4d8, #0077b6, #1b1464);
  margin: 0;
}

/* Main content area */
.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px;
}

/* Welcome section */
.welcome {
  background: #ffffff;
  border: 2px ridge #808080;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: center;
}
.welcome h1 {
  font-family: Arial Black, Impact, sans-serif;
  color: #1b1464;
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing: 2px;
}
.welcome p {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}

/* Feature table */
.features-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.features-table td {
  background: #ffffff;
  border: 2px ridge #808080;
  padding: 16px 20px;
  vertical-align: top;
  width: 33.33%;
  text-align: center;
}
.features-table td h3 {
  font-family: Arial, Helvetica, sans-serif;
  color: #1b1464;
  font-size: 15px;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.features-table td p {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}
.features-table td .icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

/* Product spotlight */
.product-section {
  background: #ffffff;
  border: 2px ridge #808080;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.product-section h2 {
  font-family: Arial Black, Impact, sans-serif;
  color: #1b1464;
  font-size: 18px;
  text-align: center;
  margin: 0 0 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.product-list {
  list-style: square;
  padding-left: 28px;
}
.product-list li {
  font-size: 14px;
  line-height: 2;
  font-family: Arial, Helvetica, sans-serif;
}
.product-list a {
  color: #0000cc;
  text-decoration: underline;
}
.product-list a:hover {
  color: #cc0000;
}
.product-list .new-badge {
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  margin-left: 6px;
  font-family: Arial, sans-serif;
  letter-spacing: 1px;
}
.product-list .coming-soon {
  color: #888;
  font-style: italic;
  font-size: 12px;
  margin-left: 4px;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #1b1464, #0077b6);
  border: 2px ridge #808080;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.cta-banner h2 {
  color: #ffff00;
  font-family: Arial Black, Impact, sans-serif;
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: 2px;
}
.cta-banner p {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
.cta-banner a {
  display: inline-block;
  background: #c0c0c0;
  color: #1b1464;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding: 8px 28px;
  text-decoration: none;
  border: 2px outset #ffffff;
  letter-spacing: 1px;
}
.cta-banner a:active {
  border-style: inset;
}
.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.newsletter-form input[type="email"] {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  padding: 6px 10px;
  border: 2px inset #ffffff;
  width: 240px;
}
.newsletter-form button {
  background: #c0c0c0;
  color: #1b1464;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 20px;
  border: 2px outset #ffffff;
  cursor: pointer;
  letter-spacing: 1px;
}
.newsletter-form button:active {
  border-style: inset;
}
.newsletter-message {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  margin: 8px 0 0;
  padding: 0;
}
.newsletter-message.success {
  color: #00ff00;
}
.newsletter-message.error {
  color: #ff6666;
}

/* Quick links row */
.quick-links {
  text-align: center;
  margin-bottom: 20px;
}
.quick-links a {
  display: inline-block;
  background: #c0c0c0;
  color: #1b1464;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 22px;
  text-decoration: none;
  border: 2px outset #ffffff;
  margin: 4px 6px;
  letter-spacing: 1px;
}
.quick-links a:active {
  border-style: inset;
}

/* Counter / stats */
.stats-bar {
  background: #ffffff;
  border: 2px ridge #808080;
  padding: 12px 20px;
  margin-bottom: 20px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #333;
}
.stats-bar span {
  color: #cc0000;
  font-weight: bold;
}

/* Footer */
footer {
  background: #1b1464;
  border-top: 3px ridge #808080;
  padding: 16px 20px;
  text-align: center;
  color: #aaa;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.8;
}
footer a {
  color: #00b4d8;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
footer .email {
  color: #ffff00;
}

/* Pricing tier cards */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.tier-card {
  background: #ffffff;
  border: 2px ridge #808080;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}
.tier-card-name {
  width: 100%;
  margin: 0;
  padding: 10px 8px;
  background: #1b1464;
  color: #00b4d8;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tier-card-price {
  padding: 12px 8px;
  font-size: 18px;
  font-weight: bold;
  color: #1b1464;
}
.tier-card-features {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  width: 100%;
  flex: 1;
}
.tier-card-features li {
  padding: 6px 0;
  border-top: 1px solid #e0e0e0;
  text-align: left;
  color: #333;
}
.tier-card-action {
  padding: 8px 12px 14px;
}
.tier-card-sm .tier-card-features li:first-child {
  border-top: none;
}
.tier-card-includes {
  font-style: italic;
  color: #666;
}
.price-loading {
  position: relative;
  overflow: hidden;
  min-height: 20px;
  min-width: 60px;
}
.price-loading::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 3px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.table-note {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin: -12px 0 20px 4px;
}
.table-note.table-intro {
  margin-top: 0;
  margin-bottom: 12px;
  font-style: normal;
}
.coming-soon {
  color: #999;
  font-style: italic;
}
.subscribe-btn {
  background: linear-gradient(180deg, #ffdd00 0%, #ff8800 100%);
  color: #1b1464;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 20px;
  border: 2px outset #ffcc00;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.subscribe-btn:active {
  border-style: inset;
}
.subscribe-btn:hover {
  background: linear-gradient(180deg, #ffee44 0%, #ffaa22 100%);
}
.subscribe-btn-active,
.subscribe-badge-active {
  background: linear-gradient(180deg, #33ff33 0%, #22aa22 100%);
  border: 2px solid #33ff33;
  color: #0a2a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
}
.subscribe-badge-scheduled {
  background: linear-gradient(180deg, #ffaa00 0%, #cc7700 100%);
  border: 2px solid #ffaa00;
  color: #1b1464;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
}
.subscribe-scheduled-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.subscribe-cancel-link {
  background: none;
  border: none;
  color: #aaa;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.subscribe-cancel-link:hover {
  color: #fff;
}
.subscribe-btn-disabled {
  background: #444;
  border-color: #666;
  color: #999;
  cursor: default;
}
.subscribe-btn-upgrade {
  background: linear-gradient(180deg, #ffdd00 0%, #ff8800 100%);
  border-color: #ffcc00;
  color: #1b1464;
  cursor: pointer;
  animation: pulse 2s ease-in-out infinite;
}
.subscribe-btn-upgrade:hover {
  background: linear-gradient(180deg, #ffee44 0%, #ffaa22 100%);
}
.subscribe-btn-downgrade {
  background: #444;
  border-color: #666;
  color: #ccc;
  cursor: pointer;
}
.subscribe-btn-downgrade:hover {
  background: #555;
  border-color: #888;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(255, 221, 0, 0.3); }
  50% { box-shadow: 0 0 12px rgba(255, 221, 0, 0.6); }
}
.subscribe-btn-loading {
  min-width: 100px;
  min-height: 30px;
  background: #333;
  border-color: #555;
  cursor: wait;
}
.subscribe-btn-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #888;
  border-top-color: #ffdd00;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-success {
  background: linear-gradient(135deg, #0a2a0a 0%, #1a4a1a 100%);
  border: 1px solid #33ff33;
  padding: 20px 24px;
  margin: 24px auto;
  max-width: 720px;
  text-align: center;
}
.checkout-success h2 {
  color: #33ff33;
  font-size: 20px;
  margin: 0 0 8px;
}
.checkout-success p {
  color: #ccffcc;
  margin: 0;
}

/* Tier change modal */
.tier-change-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.tier-change-modal {
  background: linear-gradient(180deg, #1b1464 0%, #0a0a2e 100%);
  border: 2px solid #ffdd00;
  padding: 28px 36px;
  max-width: 440px;
  width: 90%;
  text-align: center;
}
.tier-change-modal h2 {
  color: #ffdd00;
  font-size: 20px;
  margin: 0 0 16px;
}
.tier-change-modal p {
  color: #ddd;
  margin: 0 0 12px;
  line-height: 1.5;
}
.tier-change-modal strong {
  color: #ffdd00;
}
.tier-change-proration {
  color: #aaa;
  font-size: 13px;
}
.tier-change-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.tier-change-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding: 8px 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px outset;
}
.tier-change-btn:active {
  border-style: inset;
}
.tier-change-btn-cancel {
  background: #444;
  border-color: #666;
  color: #ccc;
}
.tier-change-btn-cancel:hover {
  background: #555;
}
.tier-change-btn-confirm {
  background: linear-gradient(180deg, #ffdd00 0%, #ff8800 100%);
  border-color: #ffcc00;
  color: #1b1464;
}
.tier-change-btn-confirm:hover {
  background: linear-gradient(180deg, #ffee44 0%, #ffaa22 100%);
}
.tier-change-btn-loading {
  cursor: wait;
  opacity: 0.7;
}

/* Manage button on pricing page */
.subscribe-btn-manage {
  background: linear-gradient(180deg, #4444aa 0%, #2a2a66 100%);
  border-color: #6666cc;
  color: #ddd;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.subscribe-btn-manage:hover {
  background: linear-gradient(180deg, #5555bb 0%, #3a3a88 100%);
  color: #fff;
}

/* Account page */
.account-section {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}
.account-section h1 {
  color: #1b1464;
  font-size: 28px;
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.account-loading {
  color: #666;
}
.account-card {
  border: 2px ridge #808080;
  padding: 20px 24px;
  margin-bottom: 20px;
  background: #ffffff;
}
.account-card h2 {
  color: #1b1464;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 16px;
}
.account-plan-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.account-tier-name {
  color: #1b1464;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.account-tier-price {
  color: #666;
  font-size: 16px;
}
.account-status-banner {
  padding: 12px 16px;
  margin-bottom: 8px;
}
.account-status-banner p {
  margin: 0 0 8px;
  color: #333;
  line-height: 1.5;
}
.account-status-banner strong {
  color: #000;
}
.account-status-cancelling {
  background: #fff0f0;
  border: 1px solid #cc3333;
}
.account-status-scheduled {
  background: #fff8ee;
  border: 1px solid #cc8800;
}
.account-action-link {
  background: none;
  border: none;
  color: #0077b6;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.account-action-link:hover {
  color: #1b1464;
}
.account-renewal {
  color: #666;
  font-size: 14px;
  margin: 0;
}
.account-renewal strong {
  color: #333;
}
.account-tier-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.account-tier-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px ridge #808080;
  background: #f8f8f8;
}
.account-tier-current {
  border: 2px solid #1b1464;
  background: #f0f0ff;
}
.account-tier-option strong {
  color: #1b1464;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.account-tier-option-price {
  color: #666;
  font-size: 13px;
  margin-left: 8px;
}
.account-tier-badge {
  color: #228822;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.account-tier-badge-scheduled {
  color: #cc8800;
}
.account-tier-change-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 12px;
  padding: 6px 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px outset;
  background: linear-gradient(180deg, #ffdd00 0%, #ff8800 100%);
  border-color: #ffcc00;
  color: #1b1464;
}
.account-tier-change-btn:hover {
  background: linear-gradient(180deg, #ffee44 0%, #ffaa22 100%);
}
.account-tier-change-btn:active {
  border-style: inset;
}
.account-tier-change-btn:disabled {
  background: #ccc;
  border-color: #999;
  color: #666;
  cursor: default;
}
.account-card-danger {
  border-color: #cc3333;
}
.account-card-danger h2 {
  color: #cc3333;
}
.account-danger-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px outset;
  background: linear-gradient(180deg, #cc3333 0%, #881111 100%);
  border-color: #cc3333;
  color: #fff;
}
.account-danger-btn:hover {
  background: linear-gradient(180deg, #dd4444 0%, #aa2222 100%);
}
.account-danger-btn:active {
  border-style: inset;
}
.account-user-email {
  color: #666;
  font-size: 14px;
  margin: 0 0 12px;
  word-break: break-all;
}
.account-sign-out-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px outset;
  background: #e0e0e0;
  border-color: #999;
  color: #333;
}
.account-sign-out-btn:hover {
  background: #d0d0d0;
  color: #000;
}
.account-sign-out-btn:active {
  border-style: inset;
}
.account-newsletter-description {
  color: #666;
  font-size: 14px;
  margin: 0 0 12px;
}
.account-newsletter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}
.account-newsletter-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1b1464;
  cursor: pointer;
}
.account-newsletter-toggle input:disabled {
  cursor: default;
  opacity: 0.5;
}
.account-newsletter-toggle span {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: bold;
  color: #666;
}

/* Mobile responsive */
@media (max-width: 600px) {
  html, body {
    overflow-x: hidden;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 0;
  }
  nav a {
    padding: 4px 10px;
    font-size: 12px;
  }
  .nav-bar .auth-btn {
    font-size: 11px;
    padding: 2px 8px;
  }
  .nav-bar .auth-user {
    font-size: 11px;
  }

  .content {
    padding: 12px;
  }

  .features-table,
  .features-table tbody,
  .features-table tr,
  .features-table td {
    display: block;
    width: 100%;
  }
  .features-table td {
    margin-bottom: 12px;
  }

  .tier-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .account-section {
    padding: 16px 12px;
  }
  .account-card {
    padding: 16px;
  }
  .account-plan-info {
    flex-direction: column;
    gap: 4px;
  }
  .account-tier-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .tier-cards {
    grid-template-columns: 1fr;
  }
}
