/* ============================================
   HOTSTAR-STYLE OTT PLATFORM CSS
   ============================================ */

:root {
    --hotstar-blue: #1f80e0;
    --hotstar-dark: #0f1014;
    --hotstar-darker: #06080f;
    --hotstar-card: #1a1d29;
    --hotstar-border: rgba(255, 255, 255, 0.08);
    --hotstar-text: #ffffff;
    --hotstar-text-muted: #8f92a1;
    --gold: #ffd700;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* ── Global ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--hotstar-darker);
    color: var(--hotstar-text);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-secondary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #d4b03a;
}

/* ── Buttons ── */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #c8902a);
    color: #000;
}

.btn-gold:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-red {
    background: linear-gradient(135deg, var(--red), #c0183a);
    color: #fff;
}

.btn-red:hover {
    opacity: 0.9;
}

.btn-outline-gold {
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: #000;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ── Cards ── */
.card-custom {
    background: var(--dark-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.card-admin {
    background: var(--dark-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Forms ── */
.form-control-admin,
.form-control-custom {
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-admin:focus,
.form-control-custom:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(232, 196, 74, 0.15);
}

.form-control-admin::placeholder {
    color: #555;
}

.form-label {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.form-check-input {
    background-color: var(--dark-tertiary);
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

/* ── Tables ── */
.table-admin {
    width: 100%;
    color: #fff;
    border-collapse: collapse;
}

.table-admin thead th {
    background: var(--dark-tertiary);
    color: var(--gold);
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-admin tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

.table-admin tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ── Badges ── */
.badge-gold {
    background: linear-gradient(135deg, var(--gold), #c8902a);
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Loading ── */
.spinner-custom {
    border: 3px solid var(--dark-tertiary);
    border-top-color: var(--gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Poster Gradients ── */
.pg-1 {
    background: linear-gradient(160deg, #1a0a2e 0%, #0d1535 100%);
}

.pg-2 {
    background: linear-gradient(160deg, #1e0a0a 0%, #2e1208 100%);
}

.pg-3 {
    background: linear-gradient(160deg, #0a1e0a 0%, #0a2e1a 100%);
}

.pg-4 {
    background: linear-gradient(160deg, #1e1e0a 0%, #2a1a00 100%);
}

.pg-5 {
    background: linear-gradient(160deg, #0a1e2e 0%, #001a2e 100%);
}

.pg-6 {
    background: linear-gradient(160deg, #1e0a1e 0%, #2e002e 100%);
}

/* ── Auth Pages ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, #0f0f1a 50%, var(--dark-secondary) 100%);
    padding: 20px;
}

.auth-card {
    background: var(--dark-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--gold), var(--red));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--dark-tertiary);
    padding: 4px;
    border-radius: 10px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
}

.auth-tab.active {
    background: var(--gold);
    color: #000;
}

.auth-input {
    width: 100%;
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--gold);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), #c8902a);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 8px;
}

.auth-btn:hover {
    opacity: 0.9;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #555;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-btn {
    width: 100%;
    padding: 12px;
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ── Subscription Plans ── */
.plans-page {
    padding: 80px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.plans-header {
    text-align: center;
    margin-bottom: 48px;
}

.plans-header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 52px;
    letter-spacing: 2px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.plans-header p {
    color: #888;
    font-size: 17px;
    max-width: 480px;
    margin: 0 auto;
}

.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 48px;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: rgba(255,255,255,.15);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: var(--gold);
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(24px);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

.plan-card {
    background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.plan-card:hover {
    transform: translateY(-8px);
    border-color: rgba(232, 196, 74, 0.35);
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.plan-card.featured {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(232,196,74,.08) 0%, rgba(232,196,74,.02) 100%);
    box-shadow: 0 0 40px rgba(232,196,74,.12);
}

.plan-badge {
    position: absolute;
    top: -1px;
    right: 24px;
    background: linear-gradient(135deg, var(--gold), #c8902a);
    color: #000;
    padding: 6px 16px;
    border-radius: 0 0 10px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.plan-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.plan-desc {
    color: #777;
    font-size: 14px;
    margin-bottom: 24px;
}

.plan-price {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1;
}

.plan-price span {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.plan-savings {
    color: #22c55e;
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 500;
}

.plan-features {
    list-style: none;
    margin-bottom: 28px;
    padding: 0;
}

.plan-features li {
    padding: 9px 0;
    font-size: 14px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✓';
    color: var(--gold);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: rgba(232,196,74,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    letter-spacing: .3px;
}

.plan-btn-primary {
    background: linear-gradient(135deg, #e8c44a, #c8902a);
    color: #000;
    box-shadow: 0 4px 20px rgba(232,196,74,.3);
}

.plan-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232,196,74,.45);
}

.plan-btn-primary:active {
    transform: translateY(0);
}

.plan-btn-secondary {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
}

.plan-btn-secondary:hover {
    background: rgba(255,255,255,.1);
}

/* ── Profile Page ── */
.profile-page {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), #8b1a2f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    border: 3px solid var(--gold);
}

.profile-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.profile-info p {
    color: #666;
    font-size: 14px;
}

.profile-section {
    background: var(--dark-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.profile-section h4 {
    color: var(--gold);
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .plans-page {
        padding: 20px;
    }

    .plans-header h1 {
        font-size: 32px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .auth-card {
        padding: 28px 20px;
    }
}

/* ── Utility ── */
.text-gold {
    color: var(--gold) !important;
}

.text-red {
    color: var(--red) !important;
}

.bg-dark-custom {
    background: var(--dark) !important;
}

.border-gold {
    border-color: var(--gold) !important;
}

.shadow-gold {
    box-shadow: 0 5px 20px rgba(232, 196, 74, 0.2) !important;
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Pagination ── */
.pagination {
    gap: 6px;
}

.page-link {
    background: var(--dark-tertiary);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
}

.page-link:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.page-item.active .page-link {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* ── Alerts ── */
.alert-custom {
    background: var(--dark-secondary);
    border-left: 3px solid var(--gold);
    color: #fff;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
}