/* ============================================
   MyWork Server — Styles
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.1);
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1e1e34;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-heading: #f8fafc;
  --border: rgba(255, 255, 255, 0.08);
  --success: #22c55e;
  --error: #ef4444;
  --vk-color: #0077ff;
  --yandex-color: #fc3f1d;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Logo & Hero
   ============================================ */

.hero {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.logo-icon {
  font-size: 36px;
}

.logo h1, .logo span {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-heading);
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 400px;
  margin: 0 auto;
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.navbar .logo {
  margin-bottom: 0;
}

.navbar .logo span {
  font-size: 20px;
}

/* ============================================
   Cards
   ============================================ */

.pricing-card,
.user-card,
.subscription-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #a78bfa, var(--primary));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.pricing-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 28px;
}

.price {
  font-size: 56px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1;
}

.currency {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-heading);
}

.period {
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ============================================
   Features list
   ============================================ */

.features {
  list-style: none;
  margin-bottom: 32px;
}

.features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text);
}

.features li:last-child {
  border-bottom: none;
}

/* ============================================
   Auth section
   ============================================ */

.auth-section {
  margin-top: 8px;
}

.auth-title {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 12px;
  font-family: inherit;
}

.btn:last-child {
  margin-bottom: 0;
}

.btn-icon {
  width: 22px;
  height: 22px;
}

.btn-vk {
  background: var(--vk-color);
  color: white;
}

.btn-vk:hover {
  background: #0066dd;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 119, 255, 0.3);
}

.btn-yandex {
  background: var(--yandex-color);
  color: white;
}

.btn-yandex:hover {
  background: #e0350f;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(252, 63, 29, 0.3);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}

.btn-large {
  padding: 16px 28px;
  font-size: 17px;
}

/* ============================================
   User card
   ============================================ */

.user-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-info h2 {
  font-size: 20px;
  color: var(--text-heading);
  font-weight: 600;
}

/* ============================================
   Subscription status
   ============================================ */

.subscription-card h3 {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.sub-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.sub-badge.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.sub-badge.inactive {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.sub-active p,
.sub-inactive p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.sub-inactive .btn {
  margin-top: 16px;
}

.sub-loading {
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   Success page
   ============================================ */

.success-page {
  text-align: center;
  padding: 60px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: bounce 0.6s ease-out;
}

@keyframes bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.success-page h1 {
  font-size: 28px;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.success-page > p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
  max-width: 360px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.success-actions .btn {
  margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */

footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 13px;
  opacity: 0.6;
}

/* ============================================
   Utility
   ============================================ */

.text-muted {
  color: var(--text-muted);
  font-size: 14px;
}

.text-error {
  color: var(--error);
  font-size: 14px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 480px) {
  .container {
    padding: 24px 16px;
  }

  .pricing-card,
  .user-card,
  .subscription-card {
    padding: 24px;
  }

  .price {
    font-size: 44px;
  }

  .logo h1, .logo span {
    font-size: 22px;
  }
}
