/* ═══════════════════════════════════════════════════
   NullKeep Cloud — Premium Design System
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #0a0a1a;
    --bg-surface: #111128;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(120, 100, 255, 0.5);
    --text-primary: #f0f0f8;
    --text-secondary: #8888aa;
    --text-muted: #5a5a7a;
    --accent: #7c5cff;
    --accent-glow: rgba(124, 92, 255, 0.3);
    --accent-hover: #9478ff;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(124, 92, 255, 0.15);
    --transition: all 0.2s ease;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-deep);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a1a 0%, #0f0f2e 40%, #1a0a2e 100%);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ── Container ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-links .btn-nav {
    background: var(--accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.nav-links .btn-nav:hover {
    background: var(--accent-hover);
}

/* ── Hero ── */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(124, 92, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(124, 92, 255, 0.05);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ── Features ── */
.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(124, 92, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ── Pricing ── */
.pricing {
    padding: 80px 0;
}

.pricing h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.pricing-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 720px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: var(--transition);
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    position: relative;
}

.pricing-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.pricing-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 16px 0;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin: 24px 0 32px;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ── Auth Forms ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
}

.auth-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.success-msg {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ── Dashboard ── */
.dashboard {
    padding: 100px 0 60px;
}

.dashboard h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.dash-card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    font-weight: 500;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-premium {
    background: rgba(124, 92, 255, 0.15);
    color: var(--accent);
}

.badge-free {
    background: rgba(136, 136, 170, 0.15);
    color: var(--text-secondary);
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.vault-upload-area {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.vault-upload-area:hover {
    border-color: var(--accent);
}

.vault-upload-area p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ── Legal Pages ── */
.legal-page {
    padding: 120px 0 60px;
}

.legal-page .container-narrow {
    max-width: 720px;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 40px;
}

.legal-page section {
    margin-bottom: 36px;
}

.legal-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.legal-page h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text-secondary);
}

.legal-page p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-page ul {
    list-style: none;
    padding: 0;
    margin-bottom: 12px;
}

.legal-page ul li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
}

.legal-page ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.legal-page code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent);
}

.cookie-table {
    overflow-x: auto;
    margin: 16px 0;
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.cookie-table th,
.cookie-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cookie-table th {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cookie-table td {
    color: var(--text-secondary);
}

/* ── Footer ── */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--text-secondary);
    margin: 0 4px;
}

/* ── Subscribe Page ── */
.subscribe-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow);
}

.subscribe-header {
    text-align: center;
    margin-bottom: 32px;
}

.subscribe-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subscribe-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.subscribe-plan {
    background: var(--bg-card);
    border: 1px solid rgba(124, 92, 255, 0.2);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    margin-bottom: 28px;
}

.plan-price {
    margin-bottom: 20px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    padding: 0;
    text-align: left;
}

.plan-features li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

.paypal-separator {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 20px 0;
    position: relative;
}

.paypal-separator::before,
.paypal-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}

.paypal-separator::before {
    left: 0;
}

.paypal-separator::after {
    right: 0;
}

.subscribe-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

/* ── Admin Dashboard ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-search {
    margin-bottom: 24px;
}

.admin-search form {
    display: flex;
    gap: 10px;
}

.admin-search input {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.admin-search input:focus {
    border-color: var(--border-focus);
}

.admin-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    color: var(--text-secondary);
}

.admin-table tr:hover td {
    background: var(--bg-card);
}

.action-cell {
    display: flex;
    gap: 6px;
}

.btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-sm:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.btn-sm-danger:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.stat-card-alert {
    border-color: var(--warning);
}

.stat-card-alert .stat-value {
    color: var(--warning);
}

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.page-link {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-links a:not(.btn-nav) {
        display: none;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Animations ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeUp 0.6s ease both;
}

.animate-in:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-in:nth-child(3) {
    animation-delay: 0.2s;
}