:root {
    --bg-dark: #050505;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #00ff9d;
    /* Neon Green */
    --accent-secondary: #00b8ff;
    /* Neon Blue */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --spacing-container: 1200px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Noise Overlay for texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MDAiIGhlaWdodD0iNTAwIj48ZmlsdGVyIGlkPSJmoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI24pIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed) ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-dark);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-primary);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.btn-primary+.btn-secondary,
.btn-secondary+.btn-secondary {
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.logo .highlight {
    color: var(--accent-primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-speed);
}

.main-nav a:not(.btn-primary):hover {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* aby pozadí neblokovalo klikání */
}

.orb {
    position: absolute;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    filter: blur(70px);
    opacity: 0.22;
    animation: pulse 4s infinite ease-in-out;
}


/* Lab Status Panel (Stav laboratoře) v pravém sloupci */
.lab-status-panel {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    margin-right: clamp(2rem, 6vw, 4rem);

    padding: 1.75rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 157, 0.35);
    background:
        radial-gradient(circle at top left, rgba(0, 255, 157, 0.18), transparent 60%),
        rgba(5, 5, 5, 0.92);
    box-shadow:
        0 0 40px rgba(0, 255, 157, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.9);
    max-width: 420px;
    backdrop-filter: blur(12px);
}

.lab-status-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.9rem;
}

.lab-status-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 1.25rem;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.lab-status-label {
    color: var(--text-secondary);
    white-space: nowrap;
}

.lab-status-value {
    font-weight: 500;
}


@media (max-width: 900px) {
    .hero {
        height: auto;
        padding-top: 80px;
        padding-bottom: 3rem;
    }

    .hero-content {
        position: relative;
        z-index: 2;
    }

    .hero-background {
        position: static;
        width: 100%;
        height: auto;
        margin-top: 2.5rem;
        justify-content: center;
        pointer-events: none;
    }

    .orb {
        display: none;
        /* na mobilu klidně schovat, ať to nezaclání */
    }

    .lab-status-panel {
        margin: 0 auto;
        max-width: min(460px, 100%);
    }
}


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}

/* Pillars Section */
.pillars-section {
    padding: 8rem 0;
    position: relative;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* On screens where 3 items fit per row, the 4th item wraps and should be centered */
@media (min-width: 992px) and (max-width: 1380px) {
    .pillars-grid .pillar-card:nth-child(4):last-child {
        grid-column: 1 / -1;
        max-width: calc(33.333% - 1.333rem);
        margin-inline: auto;
    }
}

.pillar-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.pillar-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
}

.icon-wrapper {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.pillar-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pillar-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.text-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap var(--transition-speed);
}

.text-link:hover {
    gap: 0.8rem;
}

/* Content Sections */
.content-section {
    padding: 6rem 0;
}

.dark-alt {
    background: #0a0a0a;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 2rem;
    border-left: 2px solid var(--accent-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.feature-item h3 {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

/* Services */
.services-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.check-list {
    list-style: none;
    margin: 2rem 0;
}

.check-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.check-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.service-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-gif {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tech-grid-visual {
    width: 100%;
    height: 300px;
    background-image: linear-gradient(rgba(0, 255, 157, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 157, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    position: relative;
}

.tech-grid-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
}

/* Footer */
footer {
    background: #000;
    padding: 4rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #555;
    font-size: 0.8rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .services-layout {
        grid-template-columns: 1fr;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 2rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }
}

/* Digital Hub Section */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* On screens where 3 items fit per row, the 4th item wraps and should be centered */
@media (min-width: 992px) and (max-width: 1380px) {
    .hub-grid .hub-card:nth-child(4):last-child {
        grid-column: 1 / -1;
        max-width: calc(33.333% - 1.333rem);
        margin-inline: auto;
    }
}

@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }

    .hub-grid .hub-card:nth-child(4):last-child {
        grid-column: 1;
        max-width: 100%;
        margin-inline: 0;
    }
}

.hub-card {
    position: relative;
    display: block;
    height: 300px;
    text-decoration: none;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.hub-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.hub-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.hub-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
    z-index: 1;
    opacity: 0.3;
}

/* Placeholder backgrounds for hub cards */
.hub-card:nth-child(1) .hub-bg {
    background-image: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

/* Publications */
.hub-card:nth-child(2) .hub-bg {
    background-image: linear-gradient(45deg, #0f2027, #203a43, #2c5364);
}

/* Downloads */
.hub-card:nth-child(3) .hub-bg {
    background-image: linear-gradient(45deg, #000000, #434343);
}

/* TechPreview */

.hub-card:hover .hub-bg {
    transform: scale(1.05);
    opacity: 0.5;
}

.hub-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hub-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hub-link {
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hub-card.highlight {
    border-color: var(--accent-secondary);
}

.hub-card.highlight .hub-link {
    color: var(--accent-secondary);
}

/* Subpage Specific Styles */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), var(--bg-dark));
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-lead {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Publication List */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pub-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.pub-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pub-item h3 {
    margin-bottom: 1rem;
}

.pub-abstract {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Download Grid */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.download-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sw-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-secondary);
}

.version-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Tech Preview */
.demo-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #00ff9d;
    margin-bottom: 4rem;
}

.demo-visual {
    height: 400px;
    background: radial-gradient(circle at center, #1a1a1a, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.demo-visual::before {
    content: 'INTERACTIVE DEMO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    pointer-events: none;
}

.demo-controls {
    padding: 2rem;
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.hub-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
    z-index: 1;
    opacity: 0.3;
}

/* Placeholder backgrounds for hub cards */
.hub-card:nth-child(1) .hub-bg {
    background-image: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

/* Publications */
.hub-card:nth-child(2) .hub-bg {
    background-image: linear-gradient(45deg, #0f2027, #203a43, #2c5364);
}

/* Downloads */
.hub-card:nth-child(3) .hub-bg {
    background-image: linear-gradient(45deg, #000000, #434343);
}

/* TechPreview */

.hub-card:hover .hub-bg {
    transform: scale(1.05);
    opacity: 0.5;
}

.hub-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hub-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hub-link {
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hub-card.highlight {
    border-color: var(--accent-secondary);
}

.hub-card.highlight .hub-link {
    color: var(--accent-secondary);
}

/* Subpage Specific Styles */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), var(--bg-dark));
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-lead {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Publication List */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pub-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.pub-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pub-item h3 {
    margin-bottom: 1rem;
}

.pub-abstract {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Download Grid */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.download-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sw-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-secondary);
}

.version-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Tech Preview */
.demo-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #00ff9d;
    margin-bottom: 4rem;
}

.demo-visual {
    height: 400px;
    background: radial-gradient(circle at center, #1a1a1a, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.demo-visual::before {
    content: 'INTERACTIVE DEMO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    pointer-events: none;
}

.demo-controls {
    padding: 2rem;
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-alpha {
    background: rgba(255, 0, 100, 0.2);
    color: #ff0064;
}

.status-beta {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

/* Ája 2.0 – Web Chat demo */

.demo-visual.chat-demo::before {
    content: '';
}

/* Hlavní panel chatu */
.chat-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.4rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
}

/* Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.chat-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-subtitle {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Messages area */
#messages {
    flex: 1;
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0.5rem 0 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: radial-gradient(circle at top, rgba(0, 184, 255, 0.12), rgba(0, 0, 0, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

/* Scrollbar jemně do neon stylu */
#messages::-webkit-scrollbar {
    width: 6px;
}

#messages::-webkit-scrollbar-track {
    background: transparent;
}

#messages::-webkit-scrollbar-thumb {
    background: rgba(0, 184, 255, 0.5);
    border-radius: 3px;
}

/* Bubbles */
.message {
    margin-bottom: 0.4rem;
    display: flex;
    flex-direction: column;
}

.message.user p {
    align-self: flex-end;
    text-align: right;
    background: rgba(0, 184, 255, 0.3);
    color: var(--text-primary);
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    max-width: 95%;
    word-wrap: break-word;
    border: 1px solid rgba(0, 184, 255, 0.8);
    font-size: 0.9rem;
}

.message.bot p {
    align-self: flex-start;
    text-align: left;
    background: rgba(0, 0, 0, 0.75);
    color: var(--text-primary);
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    max-width: 95%;
    word-wrap: break-word;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

/* Input row */
.chat-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

#messageInput {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    outline: none;
}

#messageInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#messageInput:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 1px rgba(0, 184, 255, 0.4);
}

/* Mic + tlačítko */
.microphone-icon {
    position: relative;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: transform var(--transition-speed);
}

.microphone-icon:hover {
    transform: scale(1.1);
}

.microphone-icon.active::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    background-color: #ff4b4b;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 75, 75, 0.8);
}

#sendButton {
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--accent-secondary);
    background: var(--accent-secondary);
    color: #000;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    white-space: nowrap;
}

#sendButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(0, 184, 255, 0.7);
}

/* Footer text / odkazy */
.chat-footer-text {
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-left: 0.1rem;
}

.chat-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 0.4rem;
}

.chat-footer-links a {
    font-size: 0.7rem;
    text-decoration: underline;
    color: var(--accent-secondary);
}

.chat-footer-madeby {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.4rem;
}

.chat-footer-madeby div {
    color: var(--text-secondary);
    font-size: 0.7rem;
}


/* Contact Form Styles */
.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 255, 157, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 255, 157, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Responsive form */
@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Swarm Simulation Styles */
#swarm-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    display: block;
}

.swarm-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.swarm-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.swarm-control label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.swarm-control input[type="range"] {
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.swarm-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.swarm-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}



/* Ecosystem Simulation Styles */
.ecosystem-stats {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(5, 5, 5, 0.9);
    padding: 1rem 1.5rem;
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 8px;
    font-family: var(--font-display);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.stat-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-weight: 700;
}

.stat-detail {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.ecosystem-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.ecosystem-controls button {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

#ecosystem-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    display: block;
}

/* ============================
   BLOG STYLES
   ============================ */

/* Blog Index – Grid of Article Cards */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
}

.blog-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: transform var(--transition-speed),
        border-color var(--transition-speed),
        box-shadow var(--transition-speed);
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(0, 255, 157, 0.2);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    position: relative;
}

.blog-card-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.1);
}

.blog-card-body {
    padding: 1.75rem 2rem 2rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-date {
    color: var(--text-secondary);
    font-weight: 500;
}

.blog-card-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 157, 0.15);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.blog-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.blog-card-perex {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Blog Article – Single Post Layout */
.blog-article {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article-header {
    margin-bottom: 3rem;
}

.blog-article-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.blog-article-meta time {
    color: var(--accent-primary);
    font-weight: 600;
}

.blog-article-meta span {
    color: var(--accent-secondary);
    font-weight: 600;
}

.blog-article-perex {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 0;
}

.blog-article-hero {
    margin: 2.5rem 0 3rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.blog-article-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-hero figcaption {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
}

.blog-article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-article-content p {
    margin-bottom: 1.5rem;
}

.blog-article-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--accent-primary);
    font-family: var(--font-display);
    letter-spacing: 1px;
}

.blog-article-content h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1.2rem;
    color: var(--text-primary);
}

.blog-article-content ul,
.blog-article-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
    color: var(--text-secondary);
}

.blog-article-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.blog-article-content a {
    color: var(--accent-secondary);
    text-decoration: underline;
    transition: color var(--transition-speed);
}

.blog-article-content a:hover {
    color: var(--accent-primary);
}

.blog-article-content code {
    background: rgba(0, 255, 157, 0.1);
    color: var(--accent-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.blog-article-content pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-article-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.blog-article-content blockquote {
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-article-footer h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.blog-article-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-article-footer li {
    margin-bottom: 0.8rem;
}

.blog-article-footer a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-article-footer a:hover {
    color: var(--accent-primary);
}

.blog-article-footer a::before {
    content: '→';
    font-weight: bold;
    transition: transform var(--transition-speed);
}

.blog-article-footer a:hover::before {
    transform: translateX(4px);
}

/* Responsive Blog Styles */
@media (max-width: 768px) {
    .blog-list {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-card-thumb {
        height: 180px;
    }

    .blog-card-body {
        padding: 1.5rem;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    .blog-article {
        padding: 0 1rem;
    }

    .blog-article-content {
        font-size: 1rem;
    }

    .blog-article-content h2 {
        font-size: 1.6rem;
    }

    .blog-article-perex {
        font-size: 1.05rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }
}