@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&display=swap');

:root {
  --bg-color: #000000;
  --glass-bg: #0F0F0F;
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #EAEAEA;
  --text-muted: #8C8C8C;
  --primary: #FF6E40;
  --primary-hover: #E56339;
  --secondary: #FFAA00;
  --danger: #F92424;
  --success: #20C040;

  --btn-radius: 10px;
  --card-radius: 15px;
  --panel-radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  padding: 40px 0;
}

/* Background Animations */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: float 10s infinite ease-in-out alternate;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: rgba(255, 110, 64, 0.25);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(255, 170, 0, 0.25);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

.glow-3 {
  width: 250px;
  height: 250px;
  background: rgba(255, 110, 64, 0.15);
  top: 40%;
  left: 40%;
  animation-delay: -2s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(30px, 30px) scale(1.1);
  }
}

/* Layout */
.container {
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

#paywall-view .container {
  max-width: 800px;
}

/* Glassmorphism / Panels */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.view {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.4s ease forwards;
}

.view.active {
  display: flex;
}

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

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

.logo-img {
  width: 140px;
  height: auto;
}

h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

form {
  width: 100%;
  text-align: left;
}

.input-group {
  margin-bottom: 20px;
}

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

input {
  width: 100%;
  background: #222222;
  border: 1px solid var(--glass-border);
  border-radius: var(--btn-radius);
  padding: 14px 16px;
  color: var(--text-main);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 110, 64, 0.2);
}

.btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--btn-radius);
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.primary-btn {
  background: var(--primary);
  color: #000000;
  box-shadow: 0 4px 14px rgba(255, 110, 64, 0.4);
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 110, 64, 0.5);
}

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

.secondary-btn {
  background: #222222;
  color: var(--text-main);
}

.secondary-btn:hover {
  background: #2A2A2A;
}

.footer-text {
  margin-top: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.footer-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-text a:hover {
  text-decoration: underline;
}

.error-message {
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  min-height: 20px;
}

.mt-4 {
  margin-top: 1rem;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 16px;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: #000000;
  animation: spin 1s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

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

/* Success Icon */
.icon-success {
  width: 64px;
  height: 64px;
  background: rgba(32, 192, 64, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  margin-bottom: 24px;
}

.icon-success svg {
  width: 32px;
  height: 32px;
}

/* Products Grid */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-bottom: 24px;
}

.product-card {
  background: rgba(39, 39, 39, 0.85);
  border: 2px solid #272727;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.product-card.selected {
  background: rgba(15, 15, 15, 0.8);
  border: 2px solid #FFAA00;
}

.product-info-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-size: 20px;
  font-weight: 600;
  color: #f3f3f3;
}

.product-price {
  font-size: 16px;
  font-weight: 400;
  color: #f3f3f3;
}

.product-price-monthly {
  font-size: 18px;
  font-weight: 400;
  color: #f3f3f3;
}

.product-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: #1a1a1a;
  border: 1px solid #fa0;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-text {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background-image: linear-gradient(to bottom, #fa0, #ff6e40);
  -webkit-background-clip: text;
  color: transparent;
  line-height: 14px;
}

.paywall-header {
  text-align: left;
  width: 100%;
  margin-bottom: 24px;
}

.paywall-header .logo-img {
  width: 100px;
  height: auto;
}

.paywall-header h1 {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 32px;
  margin-bottom: 8px;
}

.paywall-header .subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #9f9f9f;
  margin-bottom: 0;
}

.paywall-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.btn-gradient {
  background: linear-gradient(to bottom, #fa0, #ff6e40);
  color: #0f0f0f;
  font-weight: 700;
  font-size: 16px;
  border-radius: 16px;
  height: 56px;
  box-shadow: 0px 0px 7.5px #ff6e40;
}

.btn-gradient:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-text-only {
  background: transparent;
  color: #8C8C8C;
  font-size: 14px;
  font-weight: 500;
  border: none;
  padding: 8px;
  text-decoration: underline;
}

.btn-text-only:hover {
  color: #EAEAEA;
}

/* Mobile Optimization */
@media (max-width: 600px) {
  .glass-panel {
    padding: 24px 16px;
    border-radius: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .paywall-header h1 {
    font-size: 20px;
    line-height: 26px;
  }

  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-card {
    padding: 16px;
  }

  .product-name {
    font-size: 16px;
  }

  .product-price {
    font-size: 14px;
  }

  .product-price-monthly {
    font-size: 16px;
  }

  .btn {
    padding: 12px;
  }
}