/* CSS Variables - Matching Shopify Vision Theme */
:root {
  --bg-color: #131313;
  --bg-dark: #0b0b0b;
  --card-bg: #1a1a1a;
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0a5;
  --text-muted: #707075;
  
  --accent-pink: #ff78fc;
  --accent-pink-hover: #ff54fb;
  --accent-purple: #a020f0;
  --accent-purple-hover: #8b1cd4;
  --accent-red: #c62a32;
  --accent-red-hover: #a51d24;
  
  --border-color: rgba(255, 120, 252, 0.25);
  --form-border-color: #ff78fc;
  
  --button-radius: 25px;
  --input-radius: 6px;
  --block-radius: 16px;
  
  --primary-gradient: linear-gradient(135deg, #7180f3 0%, #ee53f0 100%);
  
  --font-heading: 'Oswald', -apple-system, sans-serif;
  --font-body: 'Jost', -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* Background Ambient Glows (Subtle and integrated) */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.08;
  pointer-events: none;
}

.bg-glow-1 {
  background: var(--accent-pink);
  top: -15%;
  left: -15%;
  animation: floatGlow1 25s infinite alternate ease-in-out;
}

.bg-glow-2 {
  background: var(--accent-purple);
  bottom: -15%;
  right: -15%;
  animation: floatGlow2 25s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 40px) scale(1.1); }
}

@keyframes floatGlow2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-60px, -40px) scale(0.9); }
}

/* Container */
.container {
  width: 100%;
  max-width: 520px;
  padding: 24px;
  margin: 120px auto 0;
  position: relative;
  z-index: 1;
}

/* Top Navigation Bar - Matches nanotracker.co.uk header */
.top-bar {
  width: 100%;
  background-color: #3d4461;
  border-bottom: 2px solid var(--accent-pink);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-image {
  max-height: 50px;
  max-width: 240px;
  object-fit: contain;
}

.logo-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-left: 10px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Main Card - Clean solid design to match Shopify blocks */
.main-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--block-radius);
  padding: 40px 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  flex-grow: 0;
  margin-bottom: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* State Panels */
.state-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.state-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  text-align: center;
  color: var(--text-primary);
}

.text-danger {
  color: var(--accent-pink);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus {
  outline: none;
  border-color: var(--form-border-color);
  box-shadow: 0 0 8px rgba(255, 120, 252, 0.25);
}

/* Buttons - Custom pill shapes from Shopify Vision Theme */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--button-radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  position: relative;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(113, 128, 243, 0.25);
}

.btn-primary:hover {
  background: var(--primary-gradient);
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(113, 128, 243, 0.45);
}

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

.btn-danger {
  background-color: var(--accent-red);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: var(--accent-red-hover);
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-pink);
  border: 1px solid var(--accent-pink);
  margin-top: 12px;
}

.btn-secondary:hover {
  background: rgba(255, 120, 252, 0.08);
}

.btn-link {
  text-decoration: none;
  margin-top: 24px;
}

.btn-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-text {
  transition: opacity 0.2s ease;
}

.btn.loading .btn-text {
  opacity: 0;
  pointer-events: none;
}

/* Spinner */
.spinner {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

.btn-danger .spinner {
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

.btn.loading .spinner {
  display: block;
}

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

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
  margin-right: 16px;
}

.divider:not(:empty)::after {
  margin-left: 16px;
}

/* Social Buttons */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--button-radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.btn-google {
  background: #ffffff;
  color: #1f1f1f;
  border-color: #e2e2e5;
}

.btn-google:hover {
  background: #f5f5f7;
  transform: translateY(-1px);
}

.btn-apple {
  background: #000000;
  color: #ffffff;
  border-color: #222222;
}

.btn-apple:hover {
  background: #111111;
  transform: translateY(-1px);
}

.social-icon {
  width: 18px;
  height: 18px;
}

/* Warning Box */
.warning-box {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: rgba(198, 42, 50, 0.08);
  border: 1px solid rgba(198, 42, 50, 0.25);
  border-radius: 8px;
  margin-bottom: 24px;
}

.warning-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.warning-text h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #ff6b6b;
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
}

.warning-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: left;
}

/* Deletion List */
.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.deletion-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.deletion-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.deletion-list .icon {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}

.deletion-list li strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.deletion-list li p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Subscription Note */
.subscription-note {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-dark);
  border-radius: 6px;
  padding: 12px;
  border-left: 2px solid var(--accent-pink);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Success Panel */
#state-success {
  text-align: center;
}

.success-icon-wrapper {
  margin: 0 auto 24px;
  width: 64px;
  height: 64px;
}

.success-icon {
  width: 100%;
  height: 100%;
}

.success-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-red);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% - 48px);
  max-width: 440px;
  z-index: 1000;
  transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  bottom: 24px;
}

.btn-close-toast {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.8;
}

.btn-close-toast:hover {
  opacity: 1;
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-pink);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .main-card {
    padding: 30px 20px;
  }
  h1 {
    font-size: 22px;
  }
}
