/* ============================================
   bixi Info Page – Light Theme
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-darkest: #f0f2f5;
    --bg-dark: #f5f6f8;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f5;
    --bg-input: #f5f6f8;
    --border: #d8dce3;
    --border-light: #e4e7ec;
    --accent: #5b54e0;
    --accent-hover: #4a43d0;
    --accent-glow: rgba(91, 84, 224, 0.12);
    --accent-secondary: #00a8cc;
    --danger: #e63946;
    --success: #27ae60;
    --warning: #e67e22;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #888899;
    --text-accent: #5b54e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: 0.2s ease;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-darkest);
    color: var(--text-primary);
    line-height: 1.7;
}

.bixi {
    color: var(--accent);
    font-weight: 700;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-nav {
    display: flex;
    gap: 4px;
}

.header-nav a {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.btn-app {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
}

.btn-app:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 80px 24px 60px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-glow), rgba(0, 210, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

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

/* --- Container --- */
.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* --- Section --- */
.section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 24px;
}

/* --- Cards --- */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.card-icon.gmail { background: rgba(234, 67, 53, 0.1); }
.card-icon.seznam { background: rgba(0, 126, 58, 0.1); }
.card-icon.outlook { background: rgba(0, 120, 212, 0.1); }
.card-icon.custom { background: var(--accent-glow); }

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-toggle {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.card-toggle.open {
    transform: rotate(180deg);
}

.card-body {
    display: none;
}

.card-body.open {
    display: block;
}

/* --- Steps --- */
.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 12px 0 12px 48px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.steps li:last-child {
    border-bottom: none;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- IMAP Table --- */
.imap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.85rem;
}

.imap-table th,
.imap-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.imap-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.imap-table td {
    color: var(--text-primary);
}

.imap-table code {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* --- Alert --- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.alert-warning {
    background: rgba(255, 165, 2, 0.08);
    border: 1px solid rgba(255, 165, 2, 0.25);
    color: var(--text-primary);
}

.alert-info {
    background: var(--accent-glow);
    border: 1px solid rgba(91, 84, 224, 0.2);
    color: var(--text-primary);
}

.alert-success {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.25);
    color: var(--text-primary);
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.feature-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.feature-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.feature-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Changelog --- */
.changelog-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.changelog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.changelog-version {
    background: var(--accent);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.changelog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.changelog-list {
    list-style: none;
    padding: 0;
}

.changelog-list li {
    padding: 4px 0 4px 22px;
    position: relative;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.changelog-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.changelog-list li.feat::before { background: var(--success); }
.changelog-list li.fix::before { background: var(--danger); }
.changelog-list li.improve::before { background: var(--accent); }
.changelog-list li.change::before { background: var(--warning); }

.changelog-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.changelog-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.changelog-legend .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-feat { background: var(--success); }
.dot-fix { background: var(--danger); }
.dot-improve { background: var(--accent); }
.dot-change { background: var(--warning); }

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* --- Nav Mobile --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

/* --- Back to top --- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--accent-hover);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        padding: 48px 20px 36px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

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

    .header-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-panel);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 8px;
        box-shadow: var(--shadow-lg);
    }

    .header-nav.open {
        display: flex;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .header .btn-app {
        display: none;
    }

    .imap-table {
        font-size: 0.78rem;
    }

    .imap-table th,
    .imap-table td {
        padding: 8px 8px;
    }

    .changelog-legend {
        flex-wrap: wrap;
        gap: 10px;
    }

    .container {
        padding: 28px 16px;
    }
}
