/* ============================================
   M365 Tips Platform - Glassmorphism Styles
   Based on Instructions/Style-Guide.md
   ============================================ */

/* ============================================
   1. Global Resets & Base Styles
   ============================================ */

/* Typography: Bricolage Grotesque (display) + DM Sans (body) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(180deg, #f8fafc 0%, #e0e7ff 50%, #f8fafc 100%);
    min-height: 100vh;
    font-size: 1.05rem;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}



/* Background Shapes for Glassmorphism Effect */
.bg-shape {
    position: fixed;
    z-index: 0;
    pointer-events: none;
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    top: -150px;
    right: -200px;
    border-radius: 150px;
    background: linear-gradient(135deg, rgba(219,220,249,0.6), rgba(224,231,255,0.4));
    transform: rotate(15deg);
    animation: floatShape1 30s ease-in-out infinite;
}

.bg-shape-2 {
    width: 500px;
    height: 500px;
    top: 40%;
    left: -180px;
    border-radius: 120px;
    background: linear-gradient(135deg, rgba(219,234,254,0.5), rgba(224,231,255,0.35));
    transform: rotate(-20deg);
    animation: floatShape2 25s ease-in-out infinite;
}

.bg-shape-3 {
    width: 450px;
    height: 450px;
    bottom: -100px;
    right: 10%;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(167,243,208,0.45), rgba(224,231,255,0.3));
    transform: rotate(25deg);
    animation: floatShape3 35s ease-in-out infinite;
}

@keyframes floatShape1 {
    0%, 100% { transform: rotate(15deg) translate(0, 0); }
    33% { transform: rotate(18deg) translate(20px, -30px); }
    66% { transform: rotate(12deg) translate(-20px, 20px); }
}

@keyframes floatShape2 {
    0%, 100% { transform: rotate(-20deg) translate(0, 0); }
    50% { transform: rotate(-15deg) translate(30px, 30px); }
}

@keyframes floatShape3 {
    0%, 100% { transform: rotate(25deg) translate(0, 0); }
    50% { transform: rotate(30deg) translate(-25px, -25px); }
}

/* ============================================
   2. CSS Custom Properties (Color System)
   ============================================ */

:root {
    /* Primary Colors */
    --color-indigo: #2563eb;
    --color-blue-deep: #1e40af;
    --color-blue: #3b82f6;
    --color-dark: #111827;
    --color-medium-gray: #475569;
    --color-text-gray: #1f2937;
    /* Accent Colors */
    --color-green: #16a34a;
    --color-orange: #ea580c;
    --color-red: #dc2626;

    /* Gradients */
    --gradient-hero-title: linear-gradient(120deg, #3b82f6 0%, #2563eb 46%, #3b82f6 100%);
    --gradient-nav-underline: linear-gradient(90deg, #3b82f6, #2563eb);

    /* Shadows */
    --shadow-card: 0 25px 60px -20px rgba(0,0,0,0.18);
    --shadow-card-hover: 0 35px 80px -25px rgba(0,0,0,0.2);
    --shadow-hero: 0 25px 60px -20px rgba(0,0,0,0.15);
    --shadow-header: 0 8px 32px -8px rgba(0,0,0,0.08);
    --shadow-button: 0 4px 12px -2px rgba(37,99,235,0.15);
    --shadow-button-hover: 0 8px 20px -4px rgba(37,99,235,0.25);
    --shadow-image: 0 4px 12px rgba(0,0,0,0.1);

    /* Border Radius */
    --radius-hero: 32px;
    --radius-card: 24px;
    --radius-section: 12px;
    --radius-button: 12px;
    --radius-badge: 10px;
    --radius-tag: 8px;

    /* Spacing */
    --spacing-card: 2rem;
    --spacing-section: 1rem 1.25rem;
    --spacing-badge: 0.5rem 1rem;
    --spacing-tag: 0.4rem 0.9rem;

    /* Font Families */
    --font-display: 'Bricolage Grotesque', -apple-system, sans-serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Animation Timing */
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 0.15s;
}

/* ============================================
   3. Typography System
   ============================================ */

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #2563eb 75%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    color: var(--color-text-gray);
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-text-gray);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-indigo), transparent);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

.section-title-small {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--color-text-gray);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-gray);
}

.subtitle {
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--color-medium-gray);
    margin-bottom: 2rem;
}

.body-text {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-gray);
}

.body-text-large {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--color-text-gray);
}

/* ============================================
   4. Glassmorphism Components
   ============================================ */

/* Header (Sticky Navigation) */
.glass-header {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.3rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-header), inset 0 1px 0 0 rgba(255,255,255,0.4);
}

/* Hero Section */
.glass-hero {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-hero);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-hero),
                0 0 0 1px rgba(255,255,255,0.35),
                inset 0 1px 2px 0 rgba(255,255,255,0.6);
    position: relative;
    overflow: hidden;
}

.glass-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.08) 40%, transparent 70%);
    pointer-events: none;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    padding: var(--spacing-card);
    border-radius: var(--radius-card);
    border: 2.5px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-card),
                0 0 0 1px rgba(255,255,255,0.4),
                inset 0 1px 1px 0 rgba(255,255,255,0.7);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.4s var(--ease-out-expo),
        box-shadow 0.4s ease,
        border-color 0.3s ease,
        background 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.08) 40%, transparent 70%);
    pointer-events: none;
}


.glass-card:hover {
    background: rgba(255, 255, 255, 0.6);
}

.glass-card:hover::after {
    opacity: 1;
}

/* Clickable Card Link - for cards that are actually interactive */
a.glass-card,
.glass-card-link {
    cursor: pointer;
}

a.glass-card:hover,
.glass-card-link:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 40px 80px -30px rgba(37, 99, 235, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 1px 0 rgba(255,255,255,0.8);
    transform: translateY(-8px) scale(1.01);
}

/* Footer */
.glass-footer {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.4);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.footer-logo {
    height: 45px;
    width: auto;
    border-radius: 0;
    box-shadow: none;
}

/* Legal pages (Impressum, Datenschutz) */
.legal-card {
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.legal-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(15, 23, 42, 0.08) 50%, transparent 100%);
    margin: 2.5rem 0;
}

.legal-card .section-title-small {
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .legal-card {
        padding: 2rem 1.5rem;
    }

    .legal-divider {
        margin: 2rem 0;
    }
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.footer-links a {
    color: var(--color-medium-gray);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* ============================================
   5. Buttons & Interactive Elements
   ============================================ */

/* Primary Button (Solid) */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-indigo);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-button);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-button);
    position: relative;
    overflow: hidden;
}

/* Ripple effect on click */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--color-blue-deep);
    box-shadow: var(--shadow-button-hover);
}

/* Icon animation on hover */
.btn-primary svg,
.btn-secondary svg {
    transition: transform 0.3s var(--ease-out-expo);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary:hover svg {
    transform: scale(1.1);
}

/* Secondary Button (Ghost) */
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: rgba(37,99,235,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-indigo);
    text-decoration: none;
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: var(--radius-button);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--shadow-button);
}

.btn-secondary:hover {
    background: rgba(37,99,235,0.15);
    border-color: rgba(37,99,235,0.3);
    box-shadow: var(--shadow-button-hover);
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Larger buttons in hero section (+30%) */
.glass-hero .btn-primary,
.glass-hero .btn-secondary {
    padding: 1rem 2.6rem;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.glass-hero .btn-primary svg,
.glass-hero .btn-secondary svg {
    flex-shrink: 0;
}

/* Hero subtitle sizing */
.hero-subtitle {
    font-size: 1.65rem;
}

/* Smaller hero buttons and subtitle on mobile */
@media (max-width: 768px) {
    .glass-hero .btn-primary,
    .glass-hero .btn-secondary {
        padding: 0.85rem 1.75rem;
        font-size: 1.1rem;
    }

    .hero-subtitle {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .glass-hero .btn-primary,
    .glass-hero .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* Badges */
.badge {
    padding: var(--spacing-badge);
    border-radius: var(--radius-badge);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid;
    display: inline-block;
}

.badge-green,
.tag.badge-green {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.3);
    color: var(--color-green);
}

.badge-orange,
.tag.badge-orange {
    background: rgba(249,115,22,0.1);
    border-color: rgba(249,115,22,0.3);
    color: var(--color-orange);
}

.badge-indigo {
    background: rgba(37,99,235,0.1);
    border-color: rgba(37,99,235,0.2);
    color: var(--color-indigo);
}

/* Tags */
.tag {
    background: rgba(37,99,235,0.1);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: var(--radius-tag);
    padding: var(--spacing-tag);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-indigo);
    display: inline-block;
}

/* ============================================
   6. Layout Utilities
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
}

main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    flex-grow: 1;
    width: 100%;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Two Column Grid (max 2 columns) */
.grid-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Spacing */
section {
    margin: 6rem 0;
}

/* ============================================
   7. Navigation
   ============================================ */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
}

.logo a {
    color: var(--color-text-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 55px;
    width: auto;
    border-radius: 0;
    box-shadow: none;
    margin: -10px 0;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-gray);
    text-decoration: none;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    transition: color 0.3s ease;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--color-blue-deep);
    background: rgba(59, 130, 246, 0.06);
}

/* Nav Underline Effect */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-nav-underline);
    transition: width 0.3s var(--ease-out-expo);
    border-radius: 1px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 60%;
}

.nav-links a.active {
    color: var(--color-blue-deep);
}

/* Back Link */
.back-link {
    position: absolute;
    top: 0;
    left: 2rem;
    color: var(--color-indigo);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.back-link:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .back-link {
        left: 1rem;
    }
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
    margin-left: 0.5rem;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(37, 99, 235, 0.1);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-indigo);
    transition: all 0.2s ease;
}

.user-menu-toggle:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1001;
}

.user-menu-dropdown.open {
    display: block;
}

.user-menu-info {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-gray);
}

.user-menu-email {
    font-size: 0.8rem;
    color: var(--color-medium-gray);
}

.user-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 5px;
    color: var(--color-text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.user-menu-dropdown a svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.user-menu-dropdown a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-indigo);
}

.user-menu-dropdown a:hover svg {
    opacity: 1;
}

/* ============================================
   7b. Mobile Menu
   ============================================ */

/* Hamburger button - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(37, 99, 235, 0.1);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-indigo);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger to X animation */
.mobile-menu-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay - only visible on mobile when open */
@media (max-width: 768px) {
    /* Fixed header on mobile */
    .glass-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 1rem 1rem;
    }

    /* Body padding to offset fixed header */
    body {
        padding-top: 70px;
    }

    /* Prevent scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Library page - main needs margin since body already has padding */
    .library-page main {
        margin-top: 1rem;
    }

    /* Library page menu-open handling */
    .library-page.menu-open {
        overflow: hidden;
        height: 100vh;
    }

    /* Show hamburger button */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Nav stays horizontal on mobile */
    nav {
        flex-direction: row;
        gap: 0;
    }

    /* Hide nav links on mobile - only show when open */
    .nav-links {
        display: none !important;
    }

    /* Full-screen overlay when menu is open */
    .nav-links.open {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        z-index: 1001;
        padding: 2rem;
    }

    /* Mobile nav link styles - exclude dropdown links */
    .nav-links > a {
        font-size: 1.25rem;
        padding: 1rem 2rem;
        margin: 0;
        width: 100%;
        max-width: 280px;
        text-align: center;
        border-radius: 12px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .nav-links > a:hover {
        background: rgba(37, 99, 235, 0.1);
    }

    /* User menu in mobile nav */
    .user-menu {
        margin-left: 0;
        margin-top: 1rem;
    }

    .user-menu-toggle {
        width: 44px;
        height: 44px;
    }

    /* User dropdown on mobile - position above toggle */
    .user-menu-dropdown {
        position: absolute;
        bottom: calc(100% + 8px);
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        z-index: 1002;
    }

    /* Remove underline effect on mobile */
    .nav-links > a::after {
        display: none;
    }

    /* Reset dropdown link styles for mobile */
    .user-menu-dropdown a {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        width: auto;
        max-width: none;
        text-align: left;
        border-radius: 0;
        opacity: 1;
        transform: none;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* Make images in image-grid clickable */
.image-grid img {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ============================================
   8. Content Boxes (Problem & Instructions)
   ============================================ */

.content-box-problem {
    background: rgba(239,68,68,0.08);
    border-left: 3px solid var(--color-red);
    border-radius: var(--radius-section);
    padding: var(--spacing-section);
    margin-bottom: 1.5rem;
}

.content-box-problem h4 {
    color: var(--color-red);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.3px;
    margin-bottom: 0.5rem;
}

.content-box-instructions {
    background: rgba(59,130,246,0.08);
    border-left: 3px solid var(--color-blue);
    border-radius: var(--radius-section);
    padding: var(--spacing-section);
    margin-bottom: 1.5rem;
}

.content-box-instructions h4 {
    color: var(--color-indigo);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.3px;
    margin-bottom: 0.5rem;
}

/* ============================================
   9. Images
   ============================================ */

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-section);
    box-shadow: var(--shadow-image);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.image-grid img {
    transition: transform 0.3s ease;
    max-width: min(350px, 100%);
}

.image-grid img:hover {
    transform: scale(1.02);
}

/* ============================================
   10. Forms & Inputs
   ============================================ */

.form-container {
    max-width: 500px;
    margin: 2rem auto;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-gray);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-section);
    font-family: inherit;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-indigo);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.error-message {
    color: var(--color-red);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.success-message {
    color: var(--color-green);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================
   11. Lists
   ============================================ */

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ============================================
   12. Utility Classes
   ============================================ */

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

.text-indigo {
    color: var(--color-indigo);
}

.font-semibold {
    font-weight: 600;
}

.mb-1 {
    margin-bottom: 1rem;
}

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

.mt-2 {
    margin-top: 2rem;
}

.relative {
    position: relative;
}

/* ============================================
   13. Responsive Design
   ============================================ */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .bg-shape {
        opacity: 0.6;
    }

    .grid-two-col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .feature-grid {
        gap: 2rem;
    }

    .glass-hero {
        padding: 3rem 1.5rem;
    }

    main {
        padding: 0 1.5rem;
    }
}

/* Tablet (≤768px) */
@media (max-width: 768px) {
    section {
        margin: 3rem 0;
    }

    .page-title {
        font-size: 2.8rem;
    }

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

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .glass-hero {
        padding: 2.5rem 1.5rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }

    .glass-hero .btn-group {
        flex-direction: row;
        align-items: center;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    section {
        margin: 2rem 0;
    }

    #hero {
        margin-top: 1rem;
    }

    .bg-shape {
        opacity: 0.3;
    }

    .page-title {
        font-size: 2.2rem;
    }

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

    .subtitle:not(.hero-subtitle) {
        font-size: 1.1rem;
    }

    .library-page .card-title {
        font-size: 1.2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .glass-hero {
        padding: 2rem 1rem;
    }

    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .glass-header {
        padding: 1rem 1rem;
    }

    .logo-img {
        height: 42px;
        margin: -6px 0;
    }

    .footer-logo {
        height: 36px;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================
   14. Special Effects
   ============================================ */

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(15,23,42,0.08) 50%, transparent 100%);
    margin: 7rem 0 5rem 0;
}


/* ============================================
   15. Tipp-Bibliothek Split View Layout
   ============================================ */

/* Full-width override for library page */
.library-page {
    overflow: hidden;
    height: 100vh;
}

.library-page main {
    max-width: 100%;
    padding: 1rem 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px);
    overflow: hidden;
    gap: 1rem;
}

.library-page .glass-footer {
    display: none;
}

/* Header with filters */
.library-header {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    overflow: visible;
}

.library-header::before {
    display: none;
}

.library-header-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 250px;
}

.library-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.library-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-gray);
    margin: 0;
    white-space: nowrap;
}

.library-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-indigo);
    text-decoration: none;
    border: 1.5px solid rgba(37, 99, 235, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.library-btn:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.library-filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

/* Tagline */
.library-tagline {
    font-size: 0.875rem;
    color: var(--color-medium-gray);
    margin: 0;
}

/* Search row */
.filter-search-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.filter-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
}

.filter-search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--color-medium-gray);
    pointer-events: none;
    opacity: 0.6;
}

#search-filter {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    border: 1.5px solid rgba(37, 99, 235, 0.15);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.85);
    height: 40px;
    color: var(--color-text-gray);
    transition: all 0.2s ease;
}

#search-filter::placeholder {
    color: var(--color-medium-gray);
    opacity: 0.7;
}

#search-filter:focus {
    outline: none;
    border-color: var(--color-indigo);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Sort dropdown */
.sort-dropdown {
    position: relative;
    flex-shrink: 0;
}

.sort-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,0.85);
    border: 1.5px solid rgba(37,99,235,0.15);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--color-medium-gray);
    padding: 0 0.85rem;
    height: 40px;
    white-space: nowrap;
    transition: border-color 0.2s ease;
}

.sort-dropdown-btn:hover {
    border-color: rgba(37,99,235,0.3);
}

.sort-dropdown-btn:focus {
    outline: none;
}

.sort-btn-prefix {
    font-size: 0.85rem;
}

.sort-btn-value {
    color: var(--color-text-gray);
    font-weight: 700;
    font-size: 0.875rem;
}

.sort-chevron {
    color: var(--color-medium-gray);
    transition: transform 0.15s ease;
}

.sort-dropdown-panel.open ~ * .sort-chevron,
.sort-dropdown:has(.sort-dropdown-panel.open) .sort-chevron {
    transform: rotate(180deg);
}

.sort-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    padding: 0.3rem;
    z-index: 200;
}

.sort-dropdown-panel.open {
    display: block;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.48rem 0.75rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--color-text-gray);
    cursor: pointer;
    border-radius: 8px;
    text-align: left;
    white-space: nowrap;
    transition: background 0.12s ease;
}

.sort-option:hover {
    background: rgba(37, 99, 235, 0.06);
}

.sort-option--active {
    color: var(--color-indigo);
    font-weight: 700;
}

.sort-option-spacer {
    width: 13px;
    flex-shrink: 0;
}

.library-btn-reset {
    font-size: 0.85rem;
    color: var(--color-medium-gray);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.library-btn-reset:hover {
    color: var(--color-indigo);
}

/* Tool chips row */
.filter-chips-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-chips-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: var(--color-medium-gray);
    text-transform: uppercase;
    margin-right: 0.2rem;
    flex-shrink: 0;
}

.tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem 0.28rem 0.35rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(37, 99, 235, 0.12);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--color-text-gray);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tool-chip:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.06);
}

.tool-chip--active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--color-indigo);
    font-weight: 600;
}

.tool-chip-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tool-chip-count {
    font-size: 0.73rem;
    color: var(--color-medium-gray);
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 0.05rem 0.3rem;
}

.tool-chip--active .tool-chip-count {
    background: rgba(37, 99, 235, 0.12);
    color: var(--color-indigo);
}

/* Bottom row */
.filter-bottom-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-bottom-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Level chips */
.level-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(37, 99, 235, 0.12);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--color-text-gray);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.level-chip:hover {
    border-color: rgba(37, 99, 235, 0.3);
}

.level-chip--active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--color-indigo);
    font-weight: 600;
}

.level-dots {
    display: flex;
    gap: 3px;
    align-items: center;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.18);
}

.dot--on {
    background: var(--color-indigo);
}

/* Status checkboxes */
.filter-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--color-text-gray);
    cursor: pointer;
    white-space: nowrap;
}

.filter-status-chip input[type="checkbox"] {
    accent-color: var(--color-indigo);
    cursor: pointer;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Library list header bar */
.library-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.4);
}

.list-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-header-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-medium-gray);
}

.list-header-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-indigo);
    background: rgba(37, 99, 235, 0.1);
    border-radius: 5px;
    padding: 0.1rem 0.4rem;
}

.list-header-sort {
    font-size: 0.78rem;
    color: var(--color-medium-gray);
}

/* Split view layout (desktop) */
.library-split-view {
    display: none;
}

/* List panel */
.library-list {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(32px);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.library-list-inner {
    height: 100%;
    overflow-y: auto;
}

/* Custom scrollbar for library panels */
.library-list-inner::-webkit-scrollbar,
.library-detail-inner::-webkit-scrollbar {
    width: 8px;
}

.library-list-inner::-webkit-scrollbar-track,
.library-detail-inner::-webkit-scrollbar-track {
    background: transparent;
}

.library-list-inner::-webkit-scrollbar-thumb,
.library-detail-inner::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
    border-radius: 4px;
}

.library-list-inner::-webkit-scrollbar-thumb:hover,
.library-detail-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.4);
}

.library-list-item {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.library-list-item:last-child {
    border-bottom: none;
}

.library-list-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.library-list-item.selected {
    background: rgba(37, 99, 235, 0.1);
    border-left: 3px solid var(--color-indigo);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    color: var(--color-text-gray);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.list-item-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-item-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.list-item-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 10px;
    box-shadow: none;
}

.starter-ribbon {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 22px;
    height: 22px;
    background: #0d9488;
    border-radius: 6px 0 6px 0;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.3);
}

.starter-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.3);
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* New tip highlight */
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.6; }
}

.library-list-item--new {
    border-left: 3px solid #f97316;
}

.library-list-item--new.selected {
    border-left: 3px solid #f97316;
}

.new-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #f97316;
    border-radius: 50%;
    margin-right: 7px;
    margin-bottom: 4px;
    vertical-align: middle;
    flex-shrink: 0;
    animation: pulse-dot 1.8s ease-in-out infinite;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.glass-card--new {
    border: 1.5px solid rgba(249, 115, 22, 0.4);
}

.badge-new-label {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ea580c;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Detail panel */
.library-detail {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(32px);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.library-detail-inner {
    height: 100%;
    overflow-y: auto;
    padding: 2rem;
}

.library-detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.library-detail-content {
    display: none;
}

/* Tighten card shadow so it doesn't bleed into the 1.5rem gap between cards */
.library-mobile-grid .glass-card {
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(255, 255, 255, 0.4),
                inset 0 1px 1px 0 rgba(255, 255, 255, 0.7);
}

/* Library page and tip detail page: tighter 6px card radius */
.library-page .library-header,
.library-page .library-list,
.library-page .library-detail,
.library-page .library-mobile-grid .glass-card,
.tip-detail-page .glass-card {
    border-radius: 6px;
}

.tip-detail-page .section-title {
    margin-bottom: 0;
}

/* Mobile card grid */
.library-mobile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Stack title above form on narrow screens */
@media (max-width: 1100px) {
    .library-header {
        flex-wrap: wrap;
    }
    .library-header-right {
        order: -1;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
    }
    .library-header-actions .btn-label {
        display: none;
    }
    .library-header-actions .library-btn {
        padding: 0 0.65rem;
    }
}

/* Desktop breakpoint: show split view, hide mobile grid */
@media (min-width: 1025px) {
    .library-page main {
        padding: 1rem 2rem;
    }

    .library-split-view {
        display: grid;
        grid-template-columns: 45% 1fr;
        gap: 1.5rem;
        flex: 1;
        min-height: 0;
    }

    .library-mobile-grid {
        display: none;
    }
}

/* Tablet/Mobile: hide split view, show mobile grid */
@media (max-width: 1024px) {
    .library-page {
        overflow: auto;
        height: auto;
    }

    .library-page main {
        height: auto;
        overflow: visible;
    }

    .library-page .glass-footer {
        display: block;
    }

    .library-split-view {
        display: none;
    }

    .library-mobile-grid {
        display: grid;
    }

    .library-header {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .library-header-right {
        width: 100%;
        order: -1;
        padding-top: 0;
    }

    .library-title {
        font-size: 1.25rem;
    }

    .library-filter-form {
        width: 100%;
    }

    .sort-btn-prefix {
        display: none;
    }

    .tool-chip-name {
        display: none;
    }

    .filter-bottom-row {
        gap: 0.65rem;
    }

    .library-btn {
        font-size: 0.82rem;
        padding: 0 0.75rem;
    }
}

/* ============================================
   16. Tool Settings Modal
   ============================================ */

.library-btn-settings,
.library-btn-schedule {
    gap: 0.4rem;
    padding: 0 0.85rem;
}

.tool-settings-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.tool-settings-modal.open {
    display: flex;
}

.tool-settings-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.tool-settings-modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    z-index: 1;
}

.tool-settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.tool-settings-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-gray);
    margin: 0;
    padding-right: 1rem;
}

.tool-settings-modal-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--color-medium-gray);
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tool-settings-modal-close:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-indigo);
}

.tool-settings-info {
    font-size: 0.9rem;
    color: var(--color-medium-gray);
    margin-bottom: 1.5rem;
}

.tool-settings-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tool-settings-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.tool-settings-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.tool-settings-item input[type="checkbox"] {
    display: none;
}

.tool-settings-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tool-settings-item input[type="checkbox"]:checked + .tool-settings-checkbox {
    background: var(--color-indigo);
    border-color: var(--color-indigo);
}

.tool-settings-item input[type="checkbox"]:checked + .tool-settings-checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.tool-settings-label {
    font-size: 0.95rem;
    color: var(--color-text-gray);
}

.tool-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

@media (max-width: 480px) {
    .tool-settings-list {
        grid-template-columns: 1fr;
    }

    .tool-settings-actions {
        flex-direction: column;
    }

    .tool-settings-actions button {
        width: 100%;
    }
}

/* ============================================
   17. Shared Status Feature
   ============================================ */

/* Shared Badge (in tip list) */
.shared-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-green);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Tip Actions — sticky bar just below the title */
.tip-actions-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 -2rem 1.5rem -2rem;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

/* In the library detail panel, stick flush with the top border (offset cancels padding-top: 2rem) */
.library-detail-content .tip-actions-sticky {
    top: -2rem;
}

.tip-published-date {
    text-align: right;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* Tip Actions in Detail Panel */
.tip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.shared-action {
    display: flex;
    align-items: center;
}

.shared-status-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shared-status-text {
    font-size: 0.9rem;
    color: var(--color-green);
    font-weight: 500;
}

/* Share Button */
/* ============================================
   Copy Split Button (Teams / SharePoint)
   ============================================ */

.copy-split-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-button);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.copy-split-btn:hover {
    box-shadow: var(--shadow-button-hover);
    transform: translateY(-2px);
}

.copy-split-main {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.64rem 1.4rem;
    background: var(--color-indigo);
    color: white;
    border: none;
    border-radius: var(--radius-button) 0 0 var(--radius-button);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.copy-split-main:hover {
    background: var(--color-blue-deep);
}

.copy-split-separator {
    width: 1px;
    background: rgba(255, 255, 255, 0.22);
    align-self: stretch;
    flex-shrink: 0;
}

.copy-split-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    background: var(--color-indigo);
    border: none;
    border-radius: 0 var(--radius-button) var(--radius-button) 0;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 100%;
}

.copy-split-chevron:hover {
    background: var(--color-blue-deep);
}

.copy-split-chevron svg {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.copy-split-btn.dropdown-open .copy-split-chevron svg {
    transform: rotate(180deg);
}

/* Small platform icon badge inside button */
.platform-badge {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.copy-split-main:hover .platform-badge {
    background: rgba(255, 255, 255, 0.26);
}

/* Dropdown panel */
.copy-split-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.13),
        0 6px 20px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top left;
}

.copy-split-btn.dropdown-open .copy-split-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-header {
    padding: 0.6rem 1.1rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    background: #fafbfc;
    border-bottom: 1px solid #f0f4f8;
}

.copy-option {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: white;
    border: none;
    border-bottom: 1px solid #f0f4f8;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
    font-family: 'DM Sans', sans-serif;
}

.copy-option:last-child {
    border-bottom: none;
}

.copy-option:hover {
    background: #f5f8ff;
}

.copy-option.active {
    background: #eef4ff;
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon {
    background: #f1f5f9;
}

.option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.option-desc {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.3;
}

.option-check {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1.5px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-button);
    color: var(--color-green);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Unshare Button */
.btn-unshare {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    color: var(--color-medium-gray);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-unshare:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    color: var(--color-red);
}

/* ============================================
   18. Toast Notifications
   ============================================ */

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-gray);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
    z-index: 3000;
    overflow: hidden;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Progress bar on toast */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-indigo);
    animation: toastProgress 2.5s linear forwards;
    animation-play-state: paused;
}

.toast.show::after {
    animation-play-state: running;
}

@keyframes toastProgress {
    from { transform: scaleX(1); transform-origin: left; }
    to { transform: scaleX(0); transform-origin: left; }
}

.toast-success {
    border-color: rgba(34, 197, 94, 0.3);
    border-left: 4px solid var(--color-green);
    color: var(--color-green);
}

.toast-success::after {
    background: var(--color-green);
}

.toast-error {
    border-color: rgba(220, 38, 38, 0.3);
    border-left: 4px solid var(--color-red);
    color: var(--color-red);
}

.toast-error::after {
    background: var(--color-red);
}

/* Mobile responsiveness for shared feature */
@media (max-width: 768px) {
    .tip-actions-sticky {
        margin: 0 -1rem 1.25rem -1rem;
        padding: 0.75rem 1rem;
    }

    .tip-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .shared-status-display {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ============================================
   19. Services Page
   ============================================ */

/* Service Detail Page Header */
.service-detail-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.service-detail-header .page-title {
    margin-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

.service-detail-header .page-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    border-radius: 2px;
}

.service-detail-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 2px solid;
}

.service-detail-icon svg {
    width: 32px;
    height: 32px;
}

/* Service Detail Color Variants */
.service-detail-header--teal .service-detail-icon {
    color: #0d9488;
    background: rgba(13, 148, 136, 0.08);
    border-color: rgba(13, 148, 136, 0.2);
}
.service-detail-header--teal .page-title::after {
    background: linear-gradient(90deg, #0d9488, #14b8a6);
}

.service-detail-header--blue .service-detail-icon {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}
.service-detail-header--blue .page-title::after {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

@media (max-width: 480px) {
    .service-detail-icon {
        width: 48px;
        height: 48px;
    }

    .service-detail-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ============================================
   21. Demo Tip Library
   ============================================ */

/* Demo Notice Banner */
.demo-notice {
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
}

.demo-notice::before {
    display: none;
}

.demo-notice-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.demo-notice-icon {
    display: inline;
    vertical-align: -3px;
    margin-right: 0.5rem;
    color: var(--color-indigo);
}

.demo-notice-text {
    flex: 1;
    min-width: 200px;
    color: var(--color-text-gray);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.demo-notice-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Disabled Share Button for Demo */
.btn-share-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-share-disabled:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Demo CTA in detail view */
.demo-cta-small {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(37, 99, 235, 0.06);
    border-radius: 12px;
    text-align: center;
}

.demo-cta-small p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-medium-gray);
}

.demo-cta-small a {
    color: var(--color-indigo);
    font-weight: 600;
    text-decoration: none;
}

.demo-cta-small a:hover {
    text-decoration: underline;
}

/* Demo responsive */
@media (max-width: 768px) {
    .demo-notice-content {
        flex-direction: column;
        text-align: center;
    }

    .demo-notice-text {
        min-width: auto;
        display: block;
        text-align: center;
    }

    .demo-notice-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   23. Accessibility Enhancements
   ============================================ */


/* Focus-visible styles */
:focus-visible {
    outline: 3px solid var(--color-indigo);
    outline-offset: 3px;
    border-radius: 4px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid var(--color-indigo);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
}

a.glass-card:focus-visible {
    outline: none;
    border-color: var(--color-indigo);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.3),
        var(--shadow-card-hover);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    border-color: var(--color-indigo);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ============================================
   24. Reduced Motion Support
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-shape {
        animation: none !important;
    }

    .fade-up {
        opacity: 1;
        transform: none;
    }

    .hero-title {
        animation: none !important;
    }
}

/* Mobile card header: badges left, icon top-right */
.mobile-card-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mobile-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-content: center; /* centers single row vertically within min-height */
    min-height: 45px;      /* matches icon — when badges wrap past this, align-content has no effect */
    flex: 1;
    min-width: 0;
}

.mobile-card-icon {
    flex-shrink: 0;
    align-self: flex-start; /* always pins to top */
}

.mobile-card-icon img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: block;
}

/* ============================================================
   Feedback / Reaction Bar
   ============================================================ */

.feedback-bar {
    margin-top: 2.5rem;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
}

.feedback-bar::before {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #0d9488);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.feedback-question {
    margin: 0 0 1.1rem 0;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.feedback-buttons {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1.05rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    background: white;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s, opacity 0.18s, transform 0.18s;
    transform: scale(1);
}

.feedback-icon {
    display: inline-flex;
    align-items: center;
    font-style: normal;
    line-height: 1;
}

.feedback-btn:hover {
    border-color: #94a3b8;
    color: #1e293b;
    transform: scale(1.03);
}

.feedback-btn[data-type="helpful"].active {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
    transform: scale(1.06);
}

.feedback-btn[data-type="not_working"].active {
    border-color: #dc2626;
    background: #dc2626;
    color: white;
    transform: scale(1.06);
}

.feedback-btn[data-type="already_known"].active {
    border-color: #0d9488;
    background: #0d9488;
    color: white;
    transform: scale(1.06);
}

.feedback-btn.dimmed {
    opacity: 0.32;
    transform: scale(0.97);
}

.feedback-thanks {
    margin-top: 0.9rem;
    font-size: 0.8rem;
    color: #64748b;
    animation: feedbackFadeIn 0.3s ease forwards;
}

.feedback-thanks.fade-out {
    animation: feedbackFadeOut 0.4s ease forwards;
}

@keyframes feedbackFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes feedbackFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-3px); }
}

/* ============================================
   Settings Page
   ============================================ */

.settings-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.settings-card {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
}

.settings-section-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-gray);
}

.settings-company-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-gray);
    margin-bottom: 1rem;
}

.settings-info-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
    align-items: baseline;
}

.settings-label {
    font-size: 0.9rem;
    color: var(--color-medium-gray);
    font-weight: 500;
}

.settings-value {
    font-size: 0.95rem;
    color: var(--color-text-gray);
}

.settings-empty {
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    font-style: italic;
}

.settings-status-badge {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.settings-status-badge.active {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.settings-status-badge.inactive {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.settings-password-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

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

.settings-form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-medium-gray);
}

.settings-password-wrapper {
    position: relative;
}

.settings-password-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
}

.settings-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-medium-gray);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-password-toggle:hover {
    color: var(--color-text-gray);
}

.settings-form-group input {
    padding: 0.6rem 0.75rem;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.6);
    transition: border-color 0.2s ease;
}

.settings-form-group input:focus {
    outline: none;
    border-color: var(--color-indigo);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.settings-submit {
    align-self: flex-start;
    padding: 0.6rem 1.5rem;
    background: var(--color-indigo);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-submit:hover {
    background: var(--color-blue-deep);
}

.settings-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.settings-message.success {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.settings-message.error {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.settings-message.error p {
    margin: 0.15rem 0;
}

@media (max-width: 600px) {
    .settings-info-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .settings-label {
        font-weight: 600;
        margin-top: 0.5rem;
    }

    .settings-label:first-child {
        margin-top: 0;
    }

    .settings-container {
        padding: 1.5rem 1rem 3rem;
    }
}

/* ============================================
   Contact Form
   ============================================ */

.cf-section {
    margin-bottom: 1.5rem;
}

.cf-group-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-gray);
    margin-bottom: 0.625rem;
}

.cf-pill-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .cf-pill-row { grid-template-columns: 1fr; }
}

.cf-pill {
    appearance: none;
    border: 1.5px solid rgba(37, 99, 235, 0.15);
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-text-gray);
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: border-color 0.15s, background 0.15s;
}

.cf-pill:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(255, 255, 255, 0.8);
}

.cf-pill[aria-pressed="true"] {
    border-color: var(--color-indigo);
    background: rgba(37, 99, 235, 0.06);
    color: var(--color-indigo);
}

.cf-pill-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition: border-color 0.15s;
}

.cf-pill[aria-pressed="true"] .cf-pill-dot {
    border-color: var(--color-indigo);
}

.cf-pill[aria-pressed="true"] .cf-pill-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-indigo);
}

.cf-pill-label {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    display: block;
}

.cf-pill-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-medium-gray);
    margin-top: 2px;
}

.cf-pill[aria-pressed="true"] .cf-pill-sub {
    color: rgba(37, 99, 235, 0.7);
}

.cf-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 560px) {
    .cf-fields { grid-template-columns: 1fr; }
}

.cf-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cf-field--full {
    grid-column: 1 / -1;
}

.cf-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-gray);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.cf-opt,
.cf-charcount {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-medium-gray);
    font-family: monospace;
    letter-spacing: 0.02em;
}

.cf-field input[type="text"],
.cf-field input[type="email"],
.cf-field textarea {
    appearance: none;
    border: 1.5px solid rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-text-gray);
    border-radius: 10px;
    padding: 0.7rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.cf-field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.cf-field input:hover,
.cf-field textarea:hover {
    border-color: rgba(37, 99, 235, 0.35);
}

.cf-field input:focus,
.cf-field textarea:focus {
    outline: none;
    border-color: var(--color-indigo);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cf-field--error input,
.cf-field--error textarea {
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.cf-err {
    font-size: 0.8125rem;
    color: var(--color-red);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.cf-err svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.cf-foot {
    border-top: 1px solid rgba(37, 99, 235, 0.1);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.cf-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: var(--color-medium-gray);
    line-height: 1.5;
    cursor: pointer;
}

.cf-consent input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--color-indigo);
    flex-shrink: 0;
}

.cf-consent a {
    color: var(--color-text-gray);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cf-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cf-submit-meta {
    font-size: 0.75rem;
    color: var(--color-medium-gray);
    letter-spacing: 0.03em;
    font-family: monospace;
    text-transform: uppercase;
}

.cf-submit {
    appearance: none;
    border: none;
    cursor: pointer;
    background: var(--color-indigo);
    color: white;
    padding: 0.75rem 1.375rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-button);
}

.cf-submit:hover {
    background: var(--color-blue-deep);
    box-shadow: var(--shadow-button-hover);
}

.cf-submit:active {
    transform: translateY(1px);
}

.cf-arrow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.cf-submit:hover .cf-arrow {
    transform: translateX(2px);
}

.cf-arrow svg {
    width: 11px;
    height: 11px;
}

.cf-spinner {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    animation: cf-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes cf-spin { to { transform: rotate(360deg); } }

.cf-success {
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
}

.cf-success-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.1);
    color: var(--color-green);
    display: grid;
    place-items: center;
    margin-bottom: 0.25rem;
    animation: cf-pop 0.35s ease-out;
}

@keyframes cf-pop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.cf-success-mark svg {
    width: 26px;
    height: 26px;
}

.cf-success-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-gray);
    margin: 0;
}

.cf-success-text {
    font-size: 1rem;
    color: var(--color-medium-gray);
    max-width: 380px;
    line-height: 1.6;
    margin: 0;
}

.cf-reset-btn {
    margin-top: 0.625rem;
    display: inline-block;
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    background: transparent;
    padding: 0.625rem 1.25rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--color-text-gray);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.cf-reset-btn:hover {
    border-color: var(--color-indigo);
    background: rgba(37, 99, 235, 0.04);
}
