/* ==========================================================================
   PRESENTLY PRIVACY POLICY - STYLESHEET
   Developers: Tarun Talan & Siddhi Goel
   ========================================================================== */

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

:root {
    /* Dark Mode (Default) Colors */
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --card-bg: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.2);
    
    --warning: #f59e0b;
    
    --sidebar-width: 340px;
    --transition-speed: 0.3s;
    --border-radius: 16px;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
    /* Light Mode Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.1);
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
    
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.08);
    --success-border: rgba(5, 150, 105, 0.15);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

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

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

ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

/* Sidebar Layout */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: calc((100vw - 1440px) / 2);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
    transition: left var(--transition-speed), background-color var(--transition-speed), border-color var(--transition-speed), width var(--transition-speed);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Adjust sidebar fixed left when window exceeds max-width */
@media (max-width: 1440px) {
    .sidebar {
        left: 0;
    }
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px var(--accent-glow);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.brand-logo svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.brand-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* TOC Navigation */
.toc-nav {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.toc-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.25rem;
}

.toc-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.toc-link:hover {
    color: var(--text-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.toc-item.active .toc-link {
    color: var(--text-primary);
    background-color: var(--accent-glow);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* Sidebar Footer & Toggle */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.developer-attribution {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.developer-attribution strong {
    color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--accent);
    background-color: var(--accent-glow);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 4rem 5rem;
    max-width: calc(100% - var(--sidebar-width));
    transition: padding var(--transition-speed), margin-left var(--transition-speed);
}

/* Hero Section */
.hero-section {
    position: relative;
    margin-bottom: 4rem;
}

.hero-glow {
    position: absolute;
    top: -100px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: var(--accent-gradient);
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
    border-radius: 50%;
}

.meta-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 720px;
    line-height: 1.7;
}

/* Content Sections */
.policy-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 2rem;
}

.policy-section p {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

/* Feature/Data Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.glass-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px -10px var(--accent-glow);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.glass-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.glass-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Permissions & Details Lists */
.details-list {
    list-style: none;
    padding: 0;
}

.details-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
}

.details-indicator {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    background-color: var(--accent-glow);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    height: fit-content;
    white-space: nowrap;
}

.details-body h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.details-body p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-secondary);
}

/* Highlight Box */
.highlight-box {
    background-color: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--accent);
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.highlight-box p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Form Styles */
.form-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 2rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    accent-color: var(--accent);
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    user-select: none;
    cursor: pointer;
}

.submit-btn {
    font-family: var(--font-sans);
    background: var(--accent-gradient);
    border: none;
    color: #ffffff;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.submit-btn:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.submit-btn:disabled {
    background: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Success Animation States */
.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 10;
}

.success-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success-bg);
    border: 2px solid var(--success-border);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transform: scale(0.6);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-overlay.active .success-icon {
    transform: scale(1);
}

.success-icon svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
}

.success-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success-text {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 460px;
    margin-bottom: 1.5rem;
}

.reset-form-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.reset-form-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Mobile Header Top Bar & Navigation Drawer */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 110;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-header .brand-section {
    margin-bottom: 0;
    gap: 0.6rem;
}

.mobile-header .brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.mobile-header .brand-logo-img {
    border-radius: 6px;
}

.mobile-header .brand-info h3 {
    font-size: 1.1rem;
}

.mobile-header .brand-info p {
    font-size: 0.65rem;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mobile-theme-btn,
.menu-toggle {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-theme-btn:hover,
.menu-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.mobile-theme-btn svg,
.menu-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Responsiveness Rules */
@media (max-width: 1280px) {
    .main-content {
        padding: 3.5rem 3rem;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 60%;
        padding: 5rem 1.25rem 2rem 1.25rem;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        left: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar .brand-section {
        display: none;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 5.5rem 2rem 3rem 2rem;
    }
    
    .mobile-header {
        display: flex;
    }

    .policy-section {
        scroll-margin-top: 5.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin-bottom: 2.5rem;
    }
    
    .hero-section h1 {
        font-size: clamp(2rem, 6vw, 2.75rem);
    }

    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .sidebar {
        width: 60%;
        padding: 4.75rem 0.85rem 1.5rem 0.85rem;
    }
    .toc-link {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }
    h1 {
        font-size: 1.85rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    .main-content {
        padding: 5rem 1.25rem 2rem 1.25rem;
    }
    .glass-card {
        padding: 1.25rem;
    }
    .form-container {
        padding: 1.25rem;
    }
    .details-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    .details-indicator {
        word-break: break-all;
        white-space: normal;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .submit-btn {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .mobile-header .brand-info p {
        display: none;
    }
    .main-content {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}
