/* ===== Premiumguide — Ren, ljus design ===== */

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #1a2332;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --premium: #f59e0b;
  --premium-bg: #fef3c7;
  --success: #10b981;
  --success-bg: #d1fae5;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10);
  --max-width: 720px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ===== Screens ===== */
.screen { min-height: 100vh; }

/* ===== Auth Screen ===== */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-logo { font-size: 48px; margin-bottom: 12px; }
.auth-card h1 { font-size: 28px; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 15px; }

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ===== Buttons ===== */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-premium {
  background: var(--premium);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
  margin-top: 8px;
}

.btn-premium:hover { background: #d97706; }
.btn-premium:active { transform: scale(0.98); }

.btn-ghost {
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Error Messages ===== */
.error-msg {
  background: #fef2f2;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 16px;
}

/* ===== Loading ===== */
#loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

/* ===== Main App ===== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { font-size: 24px; }
.app-header h2 { font-size: 20px; font-weight: 600; }

.header-right { display: flex; gap: 8px; }

.app-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px;
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

.card h3 { font-size: 20px; margin-bottom: 12px; }

.card-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-badge.free { background: #e0e7ff; color: var(--primary); }
.card-badge.premium { background: var(--premium-bg); color: #92400e; }

/* ===== Guide Text ===== */
.guide-text {
  color: var(--text);
  margin-bottom: 14px;
  font-size: 15px;
}

/* ===== Locked Card ===== */
.locked-card {
  text-align: center;
  border: 2px dashed var(--border);
}

.lock-icon { font-size: 48px; margin-bottom: 12px; }
.locked-text { color: var(--text-muted); margin-bottom: 20px; }

.locked-features {
  list-style: none;
  text-align: left;
  max-width: 320px;
  margin: 0 auto 20px;
}

.locked-features li {
  padding: 6px 0;
  font-size: 15px;
  color: var(--text);
}

/* ===== Status View ===== */
.status-card h3 { margin-bottom: 20px; }

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.status-row:last-child { border-bottom: none; }

.status-label { color: var(--text-muted); font-size: 14px; }

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.paid { background: var(--success-bg); color: var(--success); }
.status-badge.unpaid { background: #fef2f2; color: var(--danger); }

.muted { color: var(--text-muted); font-size: 14px; }

/* ===== Purchase History ===== */
.purchase-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.purchase-item:last-child { border-bottom: none; }

.purchase-item .purchase-date { color: var(--text-muted); font-size: 13px; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .app-header { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .app-header h2 { font-size: 18px; }
  .header-right { gap: 6px; }
  .btn-ghost { padding: 6px 12px; font-size: 13px; }
  .card { padding: 20px; }
  .app-content { padding: 20px 14px; }
}
