/* ==========================================================================
   POLICYCRAFT PLAY - ENTERPRISE DESIGN SYSTEM & UI STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    /* Color Palette - Modern Dark Theme */
    --bg-surface: #0b0f19;
    --bg-surface-elevated: #111827;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(31, 41, 55, 0.85);
    --bg-input: rgba(15, 23, 42, 0.8);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-focus: #6366f1;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-highlight: #ffffff;
    
    /* Brand Gradients & Accents */
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px -15px rgba(0,0,0,0.5);
    --shadow-primary-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    --glass-blur: blur(20px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-surface: #f8fafc;
    --bg-surface-elevated: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: #ffffff;
    --bg-input: #f1f5f9;
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-highlight: #000000;
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(217, 70, 239, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    letter-spacing: -0.025em;
    color: var(--text-highlight);
}

/* Glassmorphism Surface Container */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: var(--border-strong);
}

/* Global Top Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 36px;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: var(--shadow-primary-glow);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-strong);
}

.btn-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-verified {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-500);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* ==========================================================================
   STANDALONE DOCUMENT VIEW LAYOUT (privacy-prodex.html & terms-prodex.html)
   ========================================================================== */
.document-layout {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
}

@media (max-width: 992px) {
    .document-layout {
        grid-template-columns: 1fr;
    }
    .doc-sidebar {
        display: none;
    }
}

/* Document Sidebar / Table of Contents */
.doc-sidebar {
    position: sticky;
    top: 104px;
    height: fit-content;
}

.toc-card {
    padding: 24px;
}

.toc-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.toc-link:hover, .toc-link.active {
    color: var(--text-highlight);
    background: rgba(99, 102, 241, 0.12);
    border-left: 3px solid var(--primary-500);
}

/* Main Policy Document Paper */
.doc-main {
    padding: 48px 56px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .doc-main {
        padding: 28px 20px;
    }
}

.doc-hero {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 28px;
    margin-bottom: 36px;
}

.doc-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.doc-hero-meta span strong {
    color: var(--text-primary);
}

.doc-search-box {
    margin-top: 24px;
    position: relative;
}

.doc-search-input {
    width: 100%;
    padding: 12px 18px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.doc-search-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.doc-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Policy Content Sections */
.policy-section {
    margin-bottom: 40px;
    scroll-margin-top: 120px;
}

.policy-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-500);
    display: flex;
    align-items: center;
    gap: 10px;
}

.policy-section p {
    color: var(--text-secondary);
    font-size: 0.975rem;
    margin-bottom: 14px;
    line-height: 1.75;
}

.policy-section ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.policy-section li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.policy-section li strong {
    color: var(--text-primary);
}

/* Data Safety Summary Table */
.data-safety-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.data-safety-table th {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-primary);
    text-align: left;
    padding: 14px 18px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-subtle);
}

.data-safety-table td {
    padding: 12px 18px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(17, 24, 39, 0.4);
}

.data-safety-table tr:last-child td {
    border-bottom: none;
}

/* Generator App Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    padding: 24px 36px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 84px);
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Stylesheet */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .navbar, .doc-sidebar, .doc-search-box, .nav-actions, .btn {
        display: none !important;
    }
    .document-layout {
        display: block !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .doc-main {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .policy-section h2 {
        color: #000000 !important;
    }
    p, li, td {
        color: #333333 !important;
    }
}
