:root {
    --bg-dark: #080b11;
    --card-bg: rgba(16, 23, 38, 0.75);
    --border-glass: rgba(0, 240, 255, 0.15);
    --accent-cyan: #00f0ff;
    --accent-green: #00ff88;
    --accent-purple: #9d4edf;
    --text-main: #f0f4f8;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body.dark-matrix-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(157, 78, 223, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    z-index: -2;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(8, 11, 17, 0.8);
    border-bottom: 1px solid var(--border-glass);
    z-index: 100;
}

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

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.matrix-symbol {
    width: 14px;
    height: 14px;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    border-radius: 2px;
    transform: rotate(45deg);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: rotate(45deg) scale(1); opacity: 1; }
    50% { transform: rotate(45deg) scale(1.2); opacity: 0.7; }
}

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

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

.status-badge {
    font-size: 0.65rem;
    font-family: var(--font-code);
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    background: rgba(16, 23, 38, 0.6);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(157, 78, 223, 0.25));
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.15);
}

.user-status-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(16, 23, 38, 0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4d;
}

.status-indicator.unlocked {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.user-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.btn-auth-action {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth-action:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

/* Layout & Panels */
.content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.portal-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.portal-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero */
.hero-container {
    text-align: center;
    max-width: 800px;
    margin: 2rem auto 4rem auto;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
    color: #040914;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transition: all 0.3s ease;
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
}

.btn-secondary-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5deg);
    border-color: rgba(0, 240, 255, 0.4);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.card-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.card-link:hover {
    text-decoration: underline;
}

/* Auth Gatekeeper */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.route-slug {
    font-family: var(--font-code);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-card-container {
    max-width: 480px;
    margin: 0 auto;
}

.shield-header {
    text-align: center;
    margin-bottom: 2rem;
}

.shield-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(8, 11, 17, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.btn-full {
    width: 100%;
}

.form-footer-info {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-success-box {
    text-align: center;
    padding: 1.5rem 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem auto;
}

.token-text {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin: 1rem 0 1.5rem 0;
}

.hidden {
    display: none !important;
}

/* Notion Dashboard */
.locked-panel {
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
    padding: 3rem;
}

.lock-large {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.db-title-group h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.db-badge {
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.handshake-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 1rem;
}

.btn-small-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.notion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.notion-card {
    border-left: 4px solid var(--accent-cyan);
}

.card-tag {
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.notion-card h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.notion-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-footer {
    font-size: 0.75rem;
    color: var(--accent-green);
    font-weight: 600;
}

.notion-embed-container {
    padding: 0;
    overflow: hidden;
}

.embed-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.embed-url {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.embed-body {
    padding: 1.5rem;
    background: rgba(4, 7, 12, 0.95);
    min-height: 200px;
}

.matrix-code-stream {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--accent-green);
    line-height: 1.8;
}

/* Cloudflare Domains */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.domain-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.domain-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.domain-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.detail-row .label {
    color: var(--text-muted);
}

.detail-row .highlight {
    color: var(--accent-green);
    font-weight: 600;
}

.live-link {
    color: var(--accent-cyan);
    text-decoration: none;
}

.btn-small-glow {
    width: 100%;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small-glow:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}
