/* 
 * All-Convertor Design System - Glassmorphism Theme
 * -------------------------------------------------
 */

:root {
    /* Colors - Dark Mode Base */
    --bg-main: #020617;
    /* Very dark blue/slate */
    --bg-glass: rgba(15, 23, 42, 0.6);
    --bg-card: rgba(30, 41, 59, 0.4);

    /* Accents - Neon Sky */
    --primary: #0ea5e9;
    /* Sky 500 */
    --primary-glow: rgba(14, 165, 233, 0.5);
    --secondary: #8b5cf6;
    /* Violet 500 */
    --accent: #f43f5e;
    /* Rose 500 */

    /* Text */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --text-faint: #475569;
    /* Slate 600 */

    /* Borders */
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(14, 165, 233, 0.3);

    /* Effects */
    --blur-md: 12px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
}

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

body {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Background Orbs (Fixed) */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

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

a:hover {
    color: #38bdf8;
    /* Lighter sky */
}

/* Utils */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.gap-4 {
    gap: 1rem;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* Components: Glass Panel */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

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

/* Main App Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    padding-bottom: 8rem;
    /* Space for marquee */
    position: relative;
    z-index: 10;
}

/* Responsive Header */
.app-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 1rem;
    /* Float nicely */
    z-index: 50;
    transition: all 0.3s ease;
    /* Glass panel properties */
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.header-logo img {
    width: 40px;
    height: 40px;
}

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Mobile Adjustments for Header */
@media (max-width: 640px) {
    .app-header {
        padding: 0.8rem 1rem;
        top: 0.5rem;
    }

    .header-logo img {
        width: 32px;
        height: 32px;
    }

    .header-logo h1 {
        font-size: 1.2rem;
    }

    .header-subtitle {
        display: none;
        /* Hide subtitle to save space */
    }

    .pdf-tools-btn span {
        display: none;
        /* Icon only on mobile */
    }

    .pdf-tools-btn {
        padding: 0.5rem !important;
        /* Icon shape */
    }

    .nav-actions {
        gap: 0.5rem;
    }

    /* Hide 'Best Tools' link on mobile */
    .desktop-only {
        display: none;
    }
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
}

.hero h1 span {
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Tool Cards */
/* Grid Layout - Mobile Optimized */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    /* 1 Col on Mobile */
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        /* 2 Cols on Tablet */
    }
}

@media (min-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        /* 3 Cols on Desktop */
        gap: 2rem;
    }
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-glow);
}

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

.tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

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

/* Converter UI (Active Tool) */
.converter-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    min-height: 400px;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

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

/* Footer */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    margin-top: 4rem;
    background: rgba(2, 6, 23, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* SEO Content */
.seo-text {
    color: var(--text-faint);
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* Infinite Marquee (Bottom Sticky) */
.marquee-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #0f172a, #1e293b);
    border-top: 2px solid var(--primary);
    padding: 0.5rem 0;
    z-index: 9999;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    overflow: hidden;
    height: 60px;
    align-items: center;
}

.marquee-content {
    display: flex;
    animation: marquee 45s linear infinite;
    /* Slowed down from 20s */
    white-space: nowrap;
    will-change: transform;
}

.marquee-content span {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    margin-right: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.marquee-content span:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Ensure body doesn't clip */
body {
    padding-bottom: 80px !important;
}