/* ═══════════════════════════════════════════════════════════
   FilmPlus Web - Auth Pages Stylesheet
   Matches main app design system (Inter font, dark theme)
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-input: #1e1e30;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    --accent: #e50914;
    --accent-hover: #ff1a25;
    --accent-glow: rgba(229, 9, 20, 0.3);
    --green: #46d369;
    --gold: #f5c518;
    --border: #2a2a40;
    --shadow: rgba(0, 0, 0, 0.5);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ─── Animated Background ─── */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(229, 9, 20, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 30, 80, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(229, 9, 20, 0.05) 0%, transparent 40%),
        var(--bg-primary);
}

.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232a2a40' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

/* ─── Auth Container ─── */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(229, 9, 20, 0.05);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Logo ─── */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

/* ─── Form ─── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { position: relative; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ─── Input Wrapper (ensures icons center vertically to input) ─── */
.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: var(--transition);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--accent);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: var(--transition);
}

.input-wrapper .toggle-password:hover {
    color: var(--text-primary);
}

/* ─── Password Strength ─── */
.password-strength {
    margin-top: 6px;
    height: 3px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-text {
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-muted);
}

/* ─── Button ─── */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.auth-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.auth-btn.loading .btn-text { display: none; }
.auth-btn.loading .spinner { display: block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Error/Success Messages ─── */
.auth-message {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.auth-message.show { display: flex; }

.auth-message.error {
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.3);
    color: #ff6b6b;
}

.auth-message.success {
    background: rgba(70, 211, 105, 0.1);
    border: 1px solid rgba(70, 211, 105, 0.3);
    color: var(--green);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Links ─── */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ─── Verify Email Page ─── */
.verify-icon {
    text-align: center;
    margin-bottom: 24px;
}

.verify-icon i {
    font-size: 64px;
    color: var(--gold);
    filter: drop-shadow(0 0 20px rgba(245, 197, 24, 0.3));
}

.verify-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.verify-text strong {
    color: var(--text-primary);
}

.resend-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.resend-btn:hover:not(:disabled) {
    background: rgba(229, 9, 20, 0.1);
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Premium Page ─── */
.premium-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s ease;
    max-width: 500px;
    width: 100%;
}

.premium-badge {
    text-align: center;
    margin-bottom: 24px;
}

.premium-badge i {
    font-size: 56px;
    color: var(--gold);
    filter: drop-shadow(0 0 25px rgba(245, 197, 24, 0.4));
}

.premium-badge h1 {
    font-size: 26px;
    font-weight: 700;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--gold), #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-badge p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

.premium-features {
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.premium-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(42, 42, 64, 0.5);
}

.premium-features li:last-child { border-bottom: none; }

.premium-features li i {
    color: var(--green);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.premium-status {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.premium-status.active {
    background: rgba(70, 211, 105, 0.1);
    border: 1px solid rgba(70, 211, 105, 0.3);
    color: var(--green);
}

.premium-status.inactive {
    background: rgba(136, 136, 160, 0.1);
    border: 1px solid rgba(136, 136, 160, 0.2);
    color: var(--text-secondary);
}
.premium-status.trial {
    background: rgba(255, 159, 67, 0.08);
    border: 1px solid rgba(255, 159, 67, 0.25);
    color: var(--text-primary);
    padding: 20px;
    text-align: left;
}
.premium-status.expired {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.25);
    color: var(--text-primary);
    padding: 20px;
    text-align: left;
}
.trial-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}
.premium-status.trial .trial-header { color: #ff9f43; }
.premium-status.expired .trial-header { color: #e74c3c; }
.trial-time {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.trial-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.trial-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.trial-dates {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.trial-note {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 4px;
}

#paypal-button-container {
    margin-top: 20px;
    min-height: 50px;
}

.premium-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.premium-back:hover {
    color: var(--text-primary);
}

/* ─── User info in premium page ─── */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-info .details {
    flex: 1;
}

.user-info .details .name {
    font-weight: 600;
    font-size: 14px;
}

.user-info .details .email {
    font-size: 12px;
    color: var(--text-secondary);
}

.logout-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(229, 9, 20, 0.1);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .auth-card, .premium-card {
        padding: 28px 24px;
    }
    .auth-logo i { font-size: 36px; }
    .auth-logo h1 { font-size: 24px; }
}
