/* ===== Common Base Styles for JsonIcon ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #2d3748;
    --text-light: #718096;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --neon-glow: 0 0 20px rgba(127, 86, 217, 0.25);
}

body {
    font-family: 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== Header & Navigation ===== */
header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-content {
    max-width: 1008px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

nav a {
    padding: 0.6rem 1.2rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

nav a:hover {
    background: rgba(127, 86, 217, 0.08);
    color: #7F56D9;
    transform: translateY(-2px);
}

nav a.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--neon-glow);
}

/* ===== Hero (shared across most pages) ===== */
.hero {
    text-align: center;
    padding: 3rem 2rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-hover);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== Footer ===== */
footer {
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1008px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* ===== Fonts Page Shared Layout ===== */
.fonts-page .hero,
.fonts-page main {
    max-width: 780px;
}

.fonts-page main {
    margin: 0 auto;
    padding: 1.5rem 2rem 5rem;
}

.fonts-page .hero {
    padding: 4rem 2rem 2.5rem;
    position: relative;
}

.fonts-page .hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark-contrast, #1a1a1a);
    letter-spacing: 0;
}

.fonts-page .hero p {
    font-size: 1.25rem;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

.fonts-page footer {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3.5rem 2rem;
    margin-top: 5rem;
    border-top: 1px solid #EAECF0;
}

.fonts-page .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.fonts-page .footer-links {
    gap: 2.5rem;
    margin-bottom: 0;
}

.fonts-page .footer-links a {
    font-weight: 600;
}

.fonts-page .footer-copyright {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== Responsive (mobile) ===== */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0.6rem;
    }

    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.4rem;
    }

    .logo {
        font-size: 1.15rem;
        gap: 0.3rem;
        flex-shrink: 0;
    }

    nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.15rem;
        padding: 0.15rem 0;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
        transform: translateZ(0);
        scroll-behavior: smooth;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        padding: 0.32rem 0.55rem;
        font-size: 0.76rem;
        flex-shrink: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .fonts-page .hero {
        padding: 1.5rem 1rem 1rem;
    }

    .fonts-page .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 0.4rem;
    }

    .fonts-page .hero p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .fonts-page main {
        padding: 0.75rem 0.75rem 2.5rem;
    }

    .fonts-page .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .fonts-page .footer-links {
        justify-content: center;
        gap: 1.5rem;
    }
}
