/* style.css - Stream Troubleshooting for ES Brno */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #12cef1;
    --primary-dark: #009ebc;
    --primary-light: rgba(18, 206, 241, 0.08);
    --primary-glow: rgba(18, 206, 241, 0.25);

    --page-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #000000;
    --text-muted: #555555;
    --text-subtle: #777777;

    --card-border: rgba(18, 206, 241, 0.2);
    --card-hover-border: rgba(18, 206, 241, 0.45);
    --card-shadow: 0 12px 40px rgba(18, 206, 241, 0.08);
    --border-radius: 16px;
    --transition-speed: 0.25s;

    /* Signature Pill Style (Rounded rectangle matching StreamChecklist) */
    --pill-bg: #ffffff;
    --pill-border: #12cef1;
    --pill-color: #009ebc;
    --pill-hover-bg: rgba(18, 206, 241, 0.1);
    --pill-hover-border: #12cef1;
    --pill-radius: 10px;

    /* Guide & Solution Box */
    --how-to-bg: rgba(18, 206, 241, 0.035);
    --how-to-border: rgba(18, 206, 241, 0.16);
    --how-to-text: #2c3e50;

    /* Statuses */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */
html.dark-mode,
body.dark-mode {
    --page-bg: #090e15;
    --card-bg: #131b26;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    /* Subtle gray borders matching StreamChecklist */
    --card-border: #202d3d;
    --card-hover-border: #324458;
    --card-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);

    /* Gray pill borders in dark mode */
    --pill-bg: #141e2b;
    --pill-border: #253547;
    --pill-color: #12cef1;
    --pill-hover-bg: #192534;
    --pill-hover-border: #384e66;

    /* How-to Guide Box */
    --how-to-bg: #0e1621;
    --how-to-border: #1d2a38;
    --how-to-text: #cbd5e1;
}

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

body {
    font-family: 'Rubik', sans-serif;
    background-color: var(--page-bg);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 20px;
    background-image: radial-gradient(circle at 50% 0%, rgba(18, 206, 241, 0.05) 0%, transparent 60%);
    background-attachment: fixed;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Main Container Layout */
.container {
    width: 100%;
    max-width: 850px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    border-top: 8px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

/* Header Styling */
header {
    text-align: center;
    margin-bottom: 25px;
}

.header-badge {
    display: inline-block;
    background-color: var(--pill-bg);
    color: var(--pill-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 6px 16px;
    border-radius: var(--pill-radius);
    margin-bottom: 15px;
    border: 1.5px solid var(--pill-border);
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   SIGNATURE PILL STYLING (ROUNDED RECTANGLE)
   ========================================================================== */
.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--pill-bg);
    color: var(--pill-color);
    border: 1.5px solid var(--pill-border);
    border-radius: var(--pill-radius);
    padding: 7px 16px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-speed);
    white-space: nowrap;
    user-select: none;
}

.pill-btn:hover {
    background-color: var(--pill-hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(18, 206, 241, 0.2);
}

a.pill-btn:hover {
    transform: translateY(-1px);
}

a.pill-btn:active {
    transform: translateY(0);
}

.pill-btn svg {
    color: currentColor;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Status & Action Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

/* Theme Toggle Pill */
.theme-toggle-pill .sun-icon {
    display: none;
}
.theme-toggle-pill .moon-icon {
    display: block;
}

html.dark-mode .theme-toggle-pill .sun-icon,
body.dark-mode .theme-toggle-pill .sun-icon {
    display: block;
}
html.dark-mode .theme-toggle-pill .moon-icon,
body.dark-mode .theme-toggle-pill .moon-icon {
    display: none;
}

/* Category Filters */
.filters-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pill-color);
    background-color: var(--pill-bg);
    border: 1.5px solid var(--pill-border);
    padding: 8px 18px;
    border-radius: var(--pill-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    user-select: none;
}

.filter-btn:hover {
    background-color: var(--pill-hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(18, 206, 241, 0.2);
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000000;
    box-shadow: 0 4px 12px rgba(18, 206, 241, 0.25);
}

html.dark-mode .filter-btn.active,
body.dark-mode .filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #090e15;
}

/* Accordion Styling */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 35px;
}

.accordion-item {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed), border-color var(--transition-speed);
}

.accordion-item:hover {
    box-shadow: 0 8px 24px rgba(18, 206, 241, 0.1);
    border-color: var(--card-hover-border);
}

.accordion-item.active {
    border-color: var(--card-hover-border);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--text-color);
    outline: none;
    transition: background-color var(--transition-speed);
}

.accordion-header:hover {
    background-color: var(--how-to-bg);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.category-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(18, 206, 241, 0.1);
    border-radius: var(--pill-radius);
    color: var(--text-color);
    flex-shrink: 0;
}

.category-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
}

.problem-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-color);
}

.category-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    background-color: var(--pill-bg);
    color: var(--pill-color);
    border: 1px solid var(--pill-border);
    margin-left: 10px;
    vertical-align: middle;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed);
    color: var(--primary-color);
}

.arrow-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.accordion-item.active .arrow-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    border-top: 1px solid transparent;
}

.accordion-item.active .accordion-body {
    border-top-color: var(--card-border);
}

.accordion-content {
    padding: 24px;
}

/* Troubleshooting Layout Details */
.trouble-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.problem-preview {
    display: flex;
    background-color: var(--how-to-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    padding: 16px;
    gap: 20px;
    align-items: center;
    margin-bottom: 10px;
}

.problem-preview-text {
    flex: 1;
}

.problem-preview-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger-color);
    margin-bottom: 6px;
}

.problem-preview-media {
    width: 220px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    cursor: zoom-in;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.05);
    position: relative;
}

.problem-preview-media:hover .screenshot-img {
    /* No zoom transform */
}

.problem-preview-media .zoom-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.problem-preview-media:hover .zoom-overlay {
    opacity: 1;
}

/* Solution Box */
.solution-container h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}

.path-guide {
    background-color: var(--how-to-bg);
    border: 1px solid var(--how-to-border);
    padding: 14px 18px;
    border-radius: var(--pill-radius);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--how-to-text);
}

.path-arrow {
    color: var(--primary-dark);
    font-weight: 800;
    margin: 0 6px;
}

html.dark-mode .path-arrow,
body.dark-mode .path-arrow {
    color: var(--primary-color);
}

/* Steps Gallery inside Accordion */
.steps-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.step-img-card {
    background-color: var(--how-to-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-img-card h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
}

.step-img-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    cursor: zoom-in;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.03);
}

.step-img-wrapper .screenshot-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.step-img-wrapper:hover .screenshot-img {
    /* No zoom transform */
}

.step-img-wrapper .zoom-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.step-img-wrapper:hover .zoom-overlay {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
    padding: 20px;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox.open .lightbox-content {
    /* No scale transform */
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color var(--transition-speed);
}

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

.lightbox-caption {
    position: absolute;
    bottom: 25px;
    color: #fff;
    font-size: 1.05rem;
    text-align: center;
    width: 80%;
    max-width: 600px;
    font-weight: 600;
}

/* Support Sections */
.support-section {
    border-top: 1px solid var(--card-border);
    padding-top: 25px;
    margin-bottom: 30px;
}

.support-block {
    margin-bottom: 18px;
    padding: 20px;
    background-color: var(--how-to-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.support-block strong {
    font-weight: 700;
    color: var(--primary-dark);
}

html.dark-mode .support-block strong,
body.dark-mode .support-block strong {
    color: var(--primary-color);
}

.thanks-block {
    text-align: center;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Action Buttons */
.actions-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: var(--pill-radius); /* 10px rounded rectangle */
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background-color: var(--pill-bg);
    color: var(--pill-color);
    border: 1.5px solid var(--pill-border);
}

.btn-secondary:hover {
    background-color: var(--pill-hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(18, 206, 241, 0.2);
}

a.btn-secondary:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000000;
    border: 1.5px solid var(--primary-color);
    box-shadow: 0 4px 14px rgba(18, 206, 241, 0.3);
}

.btn-primary:hover {
    background-color: #00d2f0;
    border-color: #00d2f0;
    box-shadow: 0 6px 20px rgba(18, 206, 241, 0.4);
}

a.btn-primary:hover {
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .accordion-header {
        padding: 16px 20px;
    }
    .problem-preview {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .problem-preview-media {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .filters-nav {
        gap: 8px;
    }
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.88rem;
    }
}

@media (max-width: 600px) {
    body {
        padding: 20px 10px;
    }
    
    .container {
        padding: 24px 18px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .actions-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
