/* ===== PDFBoss Global Styles ===== */

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

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;
    --bg-elevated: rgba(255, 255, 255, 0.03);

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --navbar-height: 85px;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.05);

    /* Brand Colors */
    --pdf-red: #ef4444;
    --pdf-red-dark: #dc2626;
    --pdf-red-glow: rgba(239, 68, 68, 0.3);
    --pdf-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar-placeholder {
    min-height: var(--navbar-height);
    display: block;
    width: 100%;
}

/* Light Mode Variables */
body.light-mode {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f4f4f5;
    --bg-elevated: rgba(0, 0, 0, 0.02);

    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #71717a;

    --border-color: rgba(0, 0, 0, 0.1);
    --border-subtle: rgba(0, 0, 0, 0.05);
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(239, 68, 68, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ===== Splash Screen ===== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    /* Matches theme */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes splashFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.splash-content {
    text-align: center;
    animation: splashFadeIn 1s ease-out;
}

.splash-logo {
    font-size: 4.5rem;
    color: var(--pdf-red);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 30px var(--pdf-red-glow));
}

.splash-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.splash-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ===== Hero Section ===== */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    min-height: 70vh;
    padding: var(--space-3xl) 0;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.03em;
}

.hero-accent {
    display: block;
    background: var(--pdf-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
}

.btn i {
    font-size: 1rem;
    transition: transform var(--transition-base);
}

.btn:hover i {
    transform: scale(1.15);
}

.btn-primary {
    background: var(--pdf-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--pdf-red-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--pdf-red-glow);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

body.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Hero Visual - Orbit System */
.hero-visual {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-container {
    position: relative;
    width: 400px;
    height: 400px;
    animation: containerFadeIn 0.8s ease-out both;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Center PDF Icon */
.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--pdf-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 40px var(--pdf-red-glow),
        0 0 60px var(--pdf-red-glow);
    z-index: 10;
    animation: centerPulse 3s ease-in-out infinite;
}

.orbit-center i {
    font-size: 2.5rem;
    color: white;
}

@keyframes centerPulse {

    0%,
    100% {
        box-shadow:
            0 10px 40px var(--pdf-red-glow),
            0 0 60px var(--pdf-red-glow);
    }

    50% {
        box-shadow:
            0 15px 50px var(--pdf-red-glow),
            0 0 80px var(--pdf-red-glow);
    }
}

/* Floating Cards */
.floating-card {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -45px;
    margin-top: -35px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    cursor: grab;
    text-decoration: none;
    z-index: 5;
    opacity: 0;
    width: 90px;
    will-change: transform;
    /* Optimize for drag/animation */
}

.floating-card:active {
    cursor: grabbing;
}

.floating-card.dragging {
    animation: none !important;
    /* JS takes full control */
    z-index: 100 !important;
}

.floating-card:hover {
    border-color: var(--pdf-red);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.35),
        0 0 20px var(--pdf-red-glow);
    z-index: 15;
}

.floating-card i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.floating-card:hover i {
    transform: scale(1.15);
}

.floating-card span {
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Staggered Entrance Animation */
@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Card Positions & Orbit Animation */
.card-1 {
    animation-delay: 0.1s;
}

.card-2 {
    animation-delay: 0.2s;
}

.card-3 {
    animation-delay: 0.3s;
}

.card-4 {
    animation-delay: 0.4s;
}

.card-5 {
    animation-delay: 0.5s;
}

/* Orbit positions & animations */
.card-1:not(.dragging) {
    animation: cardEntrance 0.5s 0.1s forwards, orbit1 25s linear 0.6s infinite;
}

.card-2:not(.dragging) {
    animation: cardEntrance 0.5s 0.2s forwards, orbit2 25s linear 0.7s infinite;
}

.card-3:not(.dragging) {
    animation: cardEntrance 0.5s 0.3s forwards, orbit3 25s linear 0.8s infinite;
}

.card-4:not(.dragging) {
    animation: cardEntrance 0.5s 0.4s forwards, orbit4 25s linear 0.9s infinite;
}

.card-5:not(.dragging) {
    animation: cardEntrance 0.5s 0.5s forwards, orbit5 25s linear 1.0s infinite;
}

/* Individual orbit keyframes for 5 cards (72° apart) */
@keyframes orbit1 {
    from {
        transform: rotate(0deg) translateX(140px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(140px) rotate(-360deg);
    }
}

@keyframes orbit2 {
    from {
        transform: rotate(72deg) translateX(140px) rotate(-72deg);
    }

    to {
        transform: rotate(432deg) translateX(140px) rotate(-432deg);
    }
}

@keyframes orbit3 {
    from {
        transform: rotate(144deg) translateX(140px) rotate(-144deg);
    }

    to {
        transform: rotate(504deg) translateX(140px) rotate(-504deg);
    }
}

@keyframes orbit4 {
    from {
        transform: rotate(216deg) translateX(140px) rotate(-216deg);
    }

    to {
        transform: rotate(576deg) translateX(140px) rotate(-576deg);
    }
}

@keyframes orbit5 {
    from {
        transform: rotate(288deg) translateX(140px) rotate(-288deg);
    }

    to {
        transform: rotate(648deg) translateX(140px) rotate(-648deg);
    }
}

/* Card Icon Colors */
.card-1 i {
    color: var(--pdf-red);
}

.card-2 i {
    color: var(--accent-blue);
}

.card-3 i {
    color: var(--accent-green);
}

.card-4 i {
    color: var(--accent-purple);
}

.card-5 i {
    color: var(--accent-orange);
}

/* Pause orbit on container hover */
.orbit-container:hover .floating-card:not(.dragging) {
    animation-play-state: paused;
}


/* ===== Features Section ===== */
.features-section {
    padding: var(--space-3xl) 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-2xl);
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pdf-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    background: var(--pdf-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--pdf-red-glow);
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--pdf-red);
    transition: color var(--transition-base);
}

.feature-card:hover .feature-icon i {
    color: white;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Different accent colors for each feature */
.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.feature-card:nth-child(2) .feature-icon i {
    color: var(--accent-blue);
}

.feature-card:nth-child(2):hover .feature-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.feature-card:nth-child(2):hover .feature-icon i {
    color: white;
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.feature-card:nth-child(3) .feature-icon i {
    color: var(--accent-green);
}

.feature-card:nth-child(3):hover .feature-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.feature-card:nth-child(3):hover .feature-icon i {
    color: white;
}

.feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

.feature-card:nth-child(4) .feature-icon i {
    color: var(--accent-purple);
}

.feature-card:nth-child(4):hover .feature-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.feature-card:nth-child(4):hover .feature-icon i {
    color: white;
}

.feature-card:nth-child(5) .feature-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
    border-color: rgba(249, 115, 22, 0.2);
}

.feature-card:nth-child(5) .feature-icon i {
    color: var(--accent-orange);
}

.feature-card:nth-child(5):hover .feature-icon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.feature-card:nth-child(5):hover .feature-icon i {
    color: white;
}

@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-2xl);
    }

    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        height: 350px;
    }

    .orbit-container {
        width: 350px;
        height: 350px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 var(--space-md);
    }

    .hero-section {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-visual {
        display: none;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature Card as Link */
a.feature-card {
    text-decoration: none;
    cursor: pointer;
    display: block;
}

/* ===== Why PDFboss Section ===== */
.why-pdfboss-section {
    padding: var(--space-2xl) 0 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.why-pdfboss-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.why-pdfboss-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pdf-red), transparent);
    opacity: 0.5;
}

.why-pdfboss-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===== Tool Interface Styles ===== */
.tool-header {
    text-align: center;
    padding: var(--space-2xl) 0;
    max-width: 800px;
    margin: 0 auto;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.uploader-container {
    max-width: 900px;
    margin: 0 auto var(--space-3xl);
    padding: 0 var(--space-lg);
}

.drop-zone {
    background: var(--bg-elevated);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    transition: all var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: var(--pdf-red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.drop-zone.drag-over {
    border-color: var(--pdf-red);
    background: rgba(239, 68, 68, 0.05);
    transform: scale(1.01);
}

.drop-zone-icon {
    font-size: 3.5rem;
    color: var(--pdf-red);
    margin-bottom: var(--space-lg);
    transition: transform var(--transition-base);
}

.drop-zone:hover .drop-zone-icon {
    transform: scale(1.1) rotate(-5deg);
}

.drop-zone-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.file-input {
    display: none;
}

/* Tool Features / How To Section */
.tool-info-section {
    max-width: 1200px;
    margin: var(--space-3xl) auto;
    padding: var(--space-xl);

    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);

    /* Optional: Add the top gradient line effect like homepage */
    position: relative;
    overflow: hidden;
}

.tool-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pdf-red), transparent);
    opacity: 0.5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    /* Remove margins/padding as parent handles it now */
    width: 100%;
}


.info-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: transform var(--transition-base), border-color var(--transition-base);
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 68, 68, 0.3);
}

.info-card h3 {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.info-card h3 i {
    margin-right: 0.75rem;
    color: var(--pdf-red);
    font-size: 1.1em;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Ad Placements ===== */
.ad-wrapper {
    display: flex;
    justify-content: center;
    margin: var(--space-xl) auto;
    width: 100%;
    max-width: 970px;
    /* Standard large leaderboard width */
    padding: 0 var(--space-md);
}

.ad-placeholder {
    width: 100%;
    height: 90px;
    /* Standard leaderboard height */
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .ad-placeholder {
        height: 250px;
        /* Rectangular ad for mobile */
        max-width: 300px;
    }
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: var(--space-2xl) 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-item[open] {
    border-color: var(--pdf-red);
    background: linear-gradient(to bottom, var(--bg-elevated), rgba(239, 68, 68, 0.05));
}

.faq-summary {
    padding: var(--space-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform var(--transition-base);
    line-height: 1;
}

.faq-item[open] .faq-summary::after {
    transform: rotate(45deg);
    color: var(--pdf-red);
}

.faq-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-out;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
    background: var(--pdf-red);
    color: white;
}

/* ===== Global Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.35s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    padding: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.btn-primary.modal-ok {
    padding: 0.5rem 1.5rem;
}

/* Modal Types */
.modal-error .modal-header h3 {
    color: var(--pdf-red);
}

.modal-success .modal-header h3 {
    color: var(--accent-green);
}

/* Modal Layout Utilities */
.modal-centered .modal-header,
.modal-centered .modal-footer {
    justify-content: center;
    position: relative;
}

.modal-centered .modal-body {
    text-align: center;
}

.modal-centered .modal-header .modal-close {
    position: absolute;
    right: var(--space-lg);
}