:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-elevated: #1a1a26;
    --border: #2a2a3a;
    --text: #e8e8f0;
    --text-muted: #8888a0;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --success: #22c55e;
    --error: #ef4444;
    --info: #3b82f6;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
    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;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Main */
.main {
    flex: 1;
    padding: 40px 0 60px;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

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

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.btn-google:hover {
    background: #f5f5f5;
}

.btn-disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    width: 100%;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9375rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    white-space: pre-line;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Auth prompt */
.auth-prompt {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.auth-prompt h2 {
    margin-bottom: 8px;
}

.auth-prompt p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Plans */
.plans h2,
.subscriptions h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.plan-card.plan-disabled {
    opacity: 0.6;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.plan-header h3 {
    font-size: 1.125rem;
}

.plan-price {
    font-weight: 700;
    font-size: 1.25rem;
}

.plan-price.free {
    color: var(--success);
}

.plan-price.soon {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.plan-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 20px;
    flex: 1;
}

/* Subscriptions */
.subs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.sub-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sub-plan {
    font-weight: 600;
}

.sub-config,
.sub-dates {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.sub-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Login */
.login-page {
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 8px;
}

.login-form input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.login-form input:focus {
    border-color: var(--primary);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Success */
.success-page {
    display: flex;
    justify-content: center;
}

.success-card {
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.pending-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.pending-hint {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-card h1 {
    margin-bottom: 8px;
}

.success-card > p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.download-box {
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.download-box h3 {
    margin-bottom: 8px;
}

.download-box p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-separate {
    display: flex;
    gap: 8px;
}

.instructions {
    text-align: left;
    margin-bottom: 24px;
}

.instructions h3 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.instructions ol {
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.instructions li {
    margin-bottom: 6px;
}

code {
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--primary-hover);
}

.footer-support {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-sep {
    color: var(--text-muted);
    opacity: 0.7;
}

.footer-copy {
    margin: 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .sub-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .download-separate {
        flex-direction: column;
    }
}
