/* Material You Theme - Material Design 3 with Dark Mode & Themes */

/* Dracula Theme Variables */
:root[data-theme="dracula"] {
    --md-sys-color-primary: #bd93f9;
    --md-sys-color-on-primary: #282a36;
    --md-sys-color-primary-container: #44475a;
    --md-sys-color-on-primary-container: #f8f8f2;
    --md-sys-color-secondary: #ff79c6;
    --md-sys-color-on-secondary: #282a36;
    --md-sys-color-secondary-container: #44475a;
    --md-sys-color-on-secondary-container: #f8f8f2;
    --md-sys-color-tertiary: #8be9fd;
    --md-sys-color-on-tertiary: #282a36;
    --md-sys-color-tertiary-container: #44475a;
    --md-sys-color-on-tertiary-container: #f8f8f2;
    --md-sys-color-error: #ff5555;
    --md-sys-color-on-error: #282a36;
    --md-sys-color-error-container: #44475a;
    --md-sys-color-on-error-container: #ff5555;
    --md-sys-color-background: #282a36;
    --md-sys-color-on-background: #f8f8f2;
    --md-sys-color-surface: #282a36;
    --md-sys-color-on-surface: #f8f8f2;
    --md-sys-color-surface-variant: #44475a;
    --md-sys-color-on-surface-variant: #f8f8f2;
    --md-sys-color-surface-container: #282a36;
    --md-sys-color-surface-container-low: #21222c;
    --md-sys-color-surface-container-high: #44475a;
    --md-sys-color-surface-container-highest: #6272a4;
    --md-sys-color-outline: #6272a4;
    --md-sys-color-outline-variant: #44475a;
}

/* Elevation shadows */
:root {
    --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-3: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-4: 0 2px 3px rgba(0, 0, 0, 0.3), 0 6px 10px 4px rgba(0, 0, 0, 0.15);
    --md-sys-typescale-display-large: 57px;
    --md-sys-typescale-headline-large: 32px;
    --md-sys-typescale-headline-medium: 28px;
    --md-sys-typescale-title-large: 22px;
    --md-sys-typescale-body-large: 16px;
    --md-sys-typescale-body-medium: 14px;
}

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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: var(--md-sys-color-background);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--md-sys-color-on-background);
    line-height: 1.5;
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    overflow-x: hidden;
}

/* Utility classes */
.mobile-only {
    display: none !important;
}

@media (max-width: 968px) {
    .mobile-only {
        display: flex !important;
    }
}

/* Sidebar Layout */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--md-sys-color-surface-container-low);
    box-shadow: var(--md-sys-elevation-2);
    z-index: 1002;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 968px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Top Bar */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--md-sys-color-surface);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    letter-spacing: -0.5px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stream-count {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--md-sys-color-primary-container);
    border-radius: 12px;
}

.count-badge {
    font-size: 24px;
    font-weight: 700;
    color: var(--md-sys-color-on-primary-container);
    min-width: 32px;
    text-align: center;
}

.count-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-primary-container);
    opacity: 0.9;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 32px;
}

.subtitle {
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 400;
}

/* Hamburger Menu */
.hamburger-menu {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 1001;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.hamburger-menu:hover {
    background: transparent;
    box-shadow: none;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--md-sys-color-on-surface);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Sidebar (Desktop permanent, Mobile drawer) */
.drawer-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.drawer-header h2 {
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface);
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 968px) {
    .drawer-close {
        display: flex;
    }
}

.drawer-close:hover {
    background: var(--md-sys-color-surface-container-highest);
    transform: scale(1.1);
}

.drawer-nav {
    padding: 12px;
    margin-top: auto;
}

.drawer-item {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface);
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    margin-bottom: 8px;
    position: relative;
    border-bottom: 2px solid transparent;
}

.drawer-item:hover {
    color: var(--md-sys-color-primary);
    transform: scale(1.02);
    border-bottom-color: var(--md-sys-color-primary);
}

.drawer-item:hover .drawer-icon {
    color: var(--md-sys-color-primary);
}

.drawer-item:active {
    transform: scale(1.01);
}

.drawer-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    color: var(--md-sys-color-on-surface-variant);
    transition: all 0.2s;
}

/* Sidebar Overlay (Mobile Only) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

@media (min-width: 969px) {
    .sidebar-overlay {
        display: none;
    }
}

/* Server selection in drawer */
.current-server-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.current-server-label {
    font-size: var(--md-sys-typescale-label-small);
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.current-server-name {
    font-size: var(--md-sys-typescale-title-large);
    color: var(--md-sys-color-primary);
    font-weight: 600;
}

/* Server selection dropdown */
.server-selection-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.server-select-label {
    font-size: var(--md-sys-typescale-label-small);
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.server-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 8px;
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.server-select:hover {
    background: var(--md-sys-color-surface-container-high);
    border-color: var(--md-sys-color-primary);
}

.server-select:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px var(--md-sys-color-primary-container);
}

.drawer-divider {
    height: 1px;
    background: var(--md-sys-color-outline-variant);
    margin: 8px 0;
}

/* Grid Layout Section */
.grid-layout-section {
    padding: 20px 24px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.grid-layout-label {
    font-size: var(--md-sys-typescale-label-small);
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: block;
}

.grid-cycle-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-surface-container-high));
    border: 2px solid var(--md-sys-color-primary);
    border-radius: 16px;
    color: var(--md-sys-color-on-primary-container);
    font-size: var(--md-sys-typescale-body-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.grid-cycle-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.grid-cycle-btn:hover::before {
    opacity: 1;
}

.grid-cycle-btn:hover {
    background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-primary-container));
    color: var(--md-sys-color-on-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(189, 147, 249, 0.4);
    border-color: var(--md-sys-color-primary);
}

.grid-cycle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.grid-icon {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}

#gridLabel {
    font-size: var(--md-sys-typescale-body-small);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Password option checkbox */
.password-option {
    margin: 16px 0;
    display: flex;
    align-items: center;
}

.password-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface);
}

.password-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Modal buttons layout */
.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-buttons button {
    flex: 1;
}

.secondary-btn {
    background: var(--md-sys-color-surface-container-high) !important;
    color: var(--md-sys-color-on-surface) !important;
}

.error-message {
    margin-top: 12px;
    padding: 12px;
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    border-radius: 8px;
    font-size: var(--md-sys-typescale-body-medium);
}

.add-stream-section {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Input Fields */
input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 16px;
    border: none;
    border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
    border-radius: 4px 4px 0 0;
    font-size: var(--md-sys-typescale-body-large);
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

input[type="text"]:hover {
    background: var(--md-sys-color-surface-container-high);
}

input[type="text"]:focus {
    outline: none;
    border-bottom: 2px solid var(--md-sys-color-primary);
    background: var(--md-sys-color-surface-container-highest);
}

/* Buttons */
button:not(.icon-btn):not(.drawer-item):not(.drawer-close):not(.hamburger-menu):not(.setup-tab-btn):not(.server-delete-btn) {
    padding: 12px 24px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 20px;
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    white-space: nowrap;
    box-shadow: var(--md-sys-elevation-1);
    letter-spacing: 0.1px;
}

button:not(.icon-btn):not(.drawer-item):not(.drawer-close):not(.hamburger-menu):not(.setup-tab-btn):not(.server-delete-btn):hover {
    box-shadow: var(--md-sys-elevation-2);
    filter: brightness(1.1);
}

/* Settings Section (inside modal) */
.settings-section {
    margin-bottom: 32px;
    padding: 16px 0;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    color: var(--md-sys-color-on-surface);
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 500;
    margin-bottom: 20px;
}

.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 32px;
    background: var(--md-sys-color-surface-container-highest);
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 2px solid var(--md-sys-color-outline);
}

.toggle-switch.active {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.toggle-switch .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--md-sys-color-outline);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.toggle-switch.active .toggle-thumb {
    left: 22px;
    background: var(--md-sys-color-on-primary);
}

/* Stream Count */
.stream-count {
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-body-large);
    margin-bottom: 24px;
    font-weight: 500;
}

/* Stream Grid */
.stream-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

/* Grid Layout Options */
.stream-grid.grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.stream-grid.grid-normal {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.stream-grid.grid-large {
    grid-template-columns: 1fr;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Single stream layout - large and centered */
.stream-grid.single-stream {
    grid-template-columns: 1fr;
    max-width: 1600px;
    margin: 0 auto 40px;
    gap: 0;
}

.stream-grid.single-stream .stream-card {
    height: calc(100vh - 250px);
    min-height: 600px;
}

.stream-grid.single-stream .stream-embed {
    height: calc(100% - 60px);
}

/* Multi-stream layout - grid */
.stream-grid.multi-stream {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.stream-grid.multi-stream .stream-card {
    height: auto;
}

.stream-grid.focus-mode {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto 40px;
}

.stream-grid.focus-mode .stream-card {
    height: 280px;
    opacity: 0.7;
    grid-column: auto;
}

.stream-grid.focus-mode .stream-card.focused {
    grid-column: 1 / -1;
    grid-row: 1;
    height: calc(100vh - 380px);
    min-height: 500px;
    opacity: 1;
}

/* Grid layout for unfocused streams - horizontal arrangement */
.stream-grid.focus-mode .stream-card:not(.focused) {
    grid-row: 2;
}

/* Responsive grid columns for unfocused streams */
@supports (grid-template-columns: repeat(auto-fit, minmax(400px, 1fr))) {
    .stream-grid.focus-mode {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Stream Card */
.stream-card {
    background: var(--md-sys-color-surface-container);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid var(--md-sys-color-outline-variant);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stream-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
    border-color: var(--md-sys-color-primary);
}

.stream-card.focused {
    cursor: default;
    transform: none;
}

.stream-header {
    padding: 16px;
    background: var(--md-sys-color-surface-container-high);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.stream-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-badge {
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.streamer-name {
    font-weight: 500;
    font-size: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface);
}

.stream-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    padding: 0;
    box-shadow: none;
}

.icon-btn:hover {
    background: var(--md-sys-color-surface-container-highest);
}

.stream-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.stream-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 32px;
    background: var(--md-sys-color-surface-container-low);
    border-radius: 20px;
    max-width: 600px;
    margin: 80px auto;
    border: 2px dashed var(--md-sys-color-outline-variant);
}

.empty-state.hidden {
    display: none;
}

.empty-state-icon {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.7;
}

.empty-state h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--md-sys-color-on-surface);
}

.empty-state p {
    font-size: 16px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 32px;
    line-height: 1.6;
}

.primary-btn {
    padding: 14px 32px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--md-sys-color-surface-container-low);
    margin: 5% auto;
    padding: 24px;
    border-radius: 28px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--md-sys-elevation-4);
}

.close {
    color: var(--md-sys-color-on-surface-variant);
    float: right;
    font-size: 28px;
    font-weight: 400;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: background 0.2s;
}

.close:hover {
    background: var(--md-sys-color-surface-container-highest);
}

/* Setup Steps */
.setup-steps h2 {
    color: var(--md-sys-color-primary);
    margin-bottom: 24px;
    font-size: var(--md-sys-typescale-headline-medium);
    font-weight: 400;
}

.setup-steps h3 {
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: var(--md-sys-typescale-title-large);
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--md-sys-color-primary);
}

.setup-steps ol, .setup-steps ul {
    margin-left: 24px;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface);
}

.setup-steps li {
    margin-bottom: 12px;
    font-size: var(--md-sys-typescale-body-large);
}

.setup-steps p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-body-large);
    margin-bottom: 12px;
}

.setup-steps code {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
}

.setup-steps a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
    font-weight: 500;
}

.setup-steps a:hover {
    text-decoration: underline;
}

.tip {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
    border-left: 4px solid var(--md-sys-color-tertiary);
    padding: 16px;
    margin-top: 24px;
    border-radius: 12px;
    font-size: var(--md-sys-typescale-body-medium);
}

.tip strong {
    font-weight: 600;
    color: var(--md-sys-color-on-tertiary-container);
}

.tip-warning {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    border-left-color: var(--md-sys-color-error);
}

.tip-warning strong {
    color: var(--md-sys-color-on-error-container);
}

.tip-info {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-left-color: var(--md-sys-color-primary);
}

.tip-info strong {
    color: var(--md-sys-color-on-primary-container);
}

.tip-small {
    padding: 12px;
    margin-top: 16px;
    font-size: var(--md-sys-typescale-body-medium);
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    border-left-color: var(--md-sys-color-primary);
}

.tip-small strong {
    color: var(--md-sys-color-on-surface);
}

/* Setup Tabs */
.setup-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--md-sys-color-outline-variant);
}

.setup-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-title-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.setup-tab-btn:hover {
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface-container-highest);
}

.setup-tab-btn.active {
    color: var(--md-sys-color-primary);
    border-bottom-color: var(--md-sys-color-primary);
}

.setup-tab-content {
    display: none;
}

.setup-tab-content.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    body { padding: 16px; }
    header h1 { font-size: 28px; }
    .stream-grid { grid-template-columns: 1fr; }
    .hamburger-menu { top: 16px; left: 16px; }
    .side-drawer { width: 280px; left: -280px; }

    .stream-grid.single-stream .stream-card {
        height: calc(100vh - 200px);
        min-height: 400px;
    }

    .stream-grid.multi-stream {
        grid-template-columns: 1fr;
    }

    .stream-grid.focus-mode .stream-card.focused {
        height: calc(50vh - 100px);
        min-height: 280px;
    }

    .stream-grid.focus-mode .stream-card:not(.focused) {
        height: 180px;
    }

    /* Mobile: single column for unfocused streams */
    .stream-grid.focus-mode {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--md-sys-color-surface-container);
}

::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-outline);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--md-sys-color-on-surface-variant);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.fab:active {
    transform: scale(1.05);
}

.fab-icon {
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
}

@media (max-width: 968px) {
    .fab {
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
    }

    .fab-icon {
        font-size: 28px;
    }
}
