:root {
    --bg-dark: #0B0F19;
    --bg-card: rgba(20, 25, 40, 0.6);
    --primary: #00F0FF;
    --secondary: #8A2BE2;
    --text-main: #FFFFFF;
    --text-muted: #A0ABC0;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --gradient-glow: linear-gradient(90deg, #00F0FF, #8A2BE2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography & Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
}

.gradient-text {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s ease;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: 1px;
}

.logo .accent {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-glow);
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
    transform: translateY(-2px);
}

.glow-btn {
    position: relative;
    z-index: 1;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--gradient-glow);
    z-index: -1;
    border-radius: 10px;
    filter: blur(10px);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.glow-btn:hover::before {
    opacity: 1;
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.full-width {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.main-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-graphic {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(0, 240, 255, 0.4);
    top: 50px;
    right: 50px;
    animation: float 6s ease-in-out infinite;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(138, 43, 226, 0.4);
    bottom: 50px;
    left: 50px;
    animation: float 8s ease-in-out infinite reverse;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    z-index: 2;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-val {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--primary);
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
    100% { transform: translateY(0px) scale(1); }
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
}

/* Features */
.features-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 16px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 36, 56, 0.8);
}

.feature.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

/* Auth State Hardening (Flicker Protection) */
.login-btn[data-auth="logged-in"] {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

.glass-featured {
    background: var(--glass-bg);
    border: 1px solid rgba(0, 240, 255, 0.3);
    position: relative;
}

.glass-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, #00F0FF, transparent);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
}

/* Pricing */
.pricing-section {
    padding: 100px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 50px 40px;
    border-radius: 24px;
    position: relative;
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.price {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 900;
    margin-bottom: 30px;
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin-bottom: 40px;
}

.plan-features li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    color: var(--text-muted);
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.pro-features li strong {
    color: var(--text-main);
}

.pro-card {
    background: linear-gradient(180deg, rgba(20,25,40,0.9) 0%, rgba(138,43,226,0.1) 100%);
    border: 2px solid var(--secondary);
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.popular-badge {
    position: absolute;
    top: -15px;
    right: 40px;
    background: var(--gradient-glow);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.plan-btn {
    width: 100%;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Ensure top is visible */
    padding: 40px 20px;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #121826;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #fff;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
}

.card-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-sub-inputs {
    display: flex;
    gap: 10px;
}

.pay-btn {
    margin-top: 10px;
    font-size: 1.1rem;
    padding: 15px;
}

.secure-badge {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding-top: 150px; }
    .hero-actions { justify-content: center; }
    .pricing-grid { grid-template-columns: 1fr; }
    .pro-card { transform: scale(1); }
    .footer-content { flex-direction: column; gap: 20px; }
    .main-title { font-size: 3rem; }
    .nav-links { display: none; }
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-family: var(--font-body);
}

.auth-tab.active {
    color: var(--text-main);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-glow);
}

.auth-tab:hover {
    color: var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

/* Profile Dashboard */
.profile-dashboard {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 20px;
}

.profile-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.user-email-display {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    margin-top: 10px;
}

.profile-plan-info {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.plan-label {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.basic-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.pro-badge {
    background: var(--gradient-glow);
    color: #fff;
}

.profile-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.upgrade-cta {
    flex: 2;
    text-align: center;
}

.profile-logout-btn {
    flex: 1;
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.profile-logout-btn:hover {
    background: rgba(255, 77, 77, 0.1);
}

@media (max-width: 600px) {
    .profile-actions {
        flex-direction: column;
    }
    .profile-actions > * {
        width: 100%;
    }
}
/* Admin Sidebar & Utilities */
.admin-sidebar-toggle {
    position: fixed;
    right: 8px; /* Move out from under scrollbar */
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right center;
    background: #5865F2;
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    transition: all 0.3s;
}

.admin-sidebar-toggle:hover {
    padding-bottom: 25px;
    background: #4752c4;
}

.admin-sidebar {
    position: fixed;
    right: -450px;
    top: 0;
    width: 400px;
    height: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.admin-sidebar.active {
    right: 0;
}

.sidebar-close {
    position: absolute;
    left: -40px;
    top: 30px;
    width: 40px;
    height: 40px;
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-close:hover {
    background: #ff4d4d;
    color: #fff;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
}

.sidebar-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Modal Table Overrides */
.admin-recent-activity {
    animation: fadeIn 0.5s ease-out;
}

#activityContent.hidden {
    display: none;
}

/* Custom Scrollbar for Admin Tables */
.glass-panel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.glass-panel::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.glass-panel::-webkit-scrollbar-thumb {
    background: rgba(88, 101, 242, 0.3);
    border-radius: 10px;
}
.glass-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 101, 242, 0.5);
}

.plan-badge {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(88, 101, 242, 0.2);
}

.admin-table {
    table-layout: fixed; /* Stability for widespread columns */
    width: 100%;
    border-collapse: collapse;
}

.glass-panel {
    overflow-x: auto;
    width: 100%;
    border-radius: 12px;
}

.admin-table th, .admin-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 12px 15px !important;
    vertical-align: middle;
}

/* Recent Activity Table (5 Columns) - Full Width Expansion */
.recent-activity-table th:nth-child(1), .recent-activity-table td:nth-child(1) { width: 350px; min-width: 350px; color: #10B981; }
.recent-activity-table th:nth-child(2), .recent-activity-table td:nth-child(2) { width: 350px; min-width: 350px; }
.recent-activity-table th:nth-child(3), .recent-activity-table td:nth-child(3) { width: 170px; min-width: 170px; }
.recent-activity-table th:nth-child(4), .recent-activity-table td:nth-child(4) { width: 250px; min-width: 250px; }
.recent-activity-table th:nth-child(5), .recent-activity-table td:nth-child(5) { width: 180px; min-width: 180px; text-align: right; }

.master-database-table th { 
    white-space: nowrap; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    padding-bottom: 12px !important;
}
/* Master Database Table (7 Columns) - Ultra-Tight Alignment */
.master-database-table th:nth-child(1), .master-database-table td:nth-child(1) { width: 200px; min-width: 200px; } /* Email */
.master-database-table th:nth-child(2), .master-database-table td:nth-child(2) { width: 80px; min-width: 80px; }    /* Plan */
.master-database-table th:nth-child(3), .master-database-table td:nth-child(3) { width: 220px; min-width: 220px; } /* Key */
.master-database-table th:nth-child(4), .master-database-table td:nth-child(4) { width: 100px; min-width: 100px; } /* Expires */
.master-database-table th:nth-child(5), .master-database-table td:nth-child(5) { width: 120px; min-width: 120px; } /* Last Trial */
.master-database-table th:nth-child(6), .master-database-table td:nth-child(6) { width: 100px; min-width: 100px; color: #10B981; } /* Status */
.master-database-table th:nth-child(7), .master-database-table td:nth-child(7) { width: 320px; min-width: 320px; text-align: right; overflow: visible; } /* Actions */

.action-plan {
    height: 32px;
    padding: 0 8px !important;
    font-size: 0.75rem !important;
    line-height: 32px;
    vertical-align: middle;
    box-sizing: border-box;
    display: inline-block;
}

.action-save, .action-delete {
    height: 32px;
    padding: 0 12px !important;
    font-size: 0.7rem !important;
    line-height: normal;
    vertical-align: middle;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.duration-inputs input {
    height: 32px;
    width: 45px !important;
    font-size: 0.7rem !important;
}
/* Tier Selection Grid Styles */
.tier-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.tier-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tier-option.active {
    background: rgba(88, 101, 242, 0.1);
    border-color: #5865F2;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.2);
}

.tier-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.tier-option.active .tier-time {
    color: #5865F2;
}

.tier-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}
