@import url("shared/common.css");

:root {
    --bg: var(--bg-main);
    --border: var(--border-color);
    --border-hover: var(--border-glow);
    
    /* ZTM & PKP app variables */
    --bg-gradient-start: var(--bg-main);
    --bg-gradient-end: var(--bg-main);
    --card-bg: var(--bg-card);
    --card-border: var(--border-color);
    --card-border-hover: var(--border-glow);
    --accent-blue: var(--accent);
    --accent-sky: #818cf8;
    --success-green: var(--success);
    --error-red: var(--danger);
    --tram-color: #b91c1c;
    --bus-color: #1d4ed8;
}

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

body {
    min-height: 100vh;
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 50% -20%, rgba(120, 119, 198, 0.1), transparent 70%),
        radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.02), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.02), transparent 40%);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

body.hub-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 24px;
}

body.app-page {
    display: flex;
    justify-content: center;
    padding: 20px;
}

        /* ─── Top Nav / Auth Bar ─── */
        .top-nav {
            position: absolute;
            top: 24px;
            right: 24px;
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 10;
        }

        .btn-auth {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 8px 16px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .btn-auth:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: var(--border-hover);
        }

        .btn-auth.primary {
            background: linear-gradient(135deg, #3b82f6, #ef4444);
            border: none;
            color: #ffffff;
        }

        .btn-auth.primary:hover {
            opacity: 0.95;
            transform: translateY(-1px);
        }

        .user-badge {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border);
            padding: 6px 14px;
            border-radius: 20px;
        }

        .avatar-circle {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #ef4444);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
            color: #ffffff;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .avatar-circle:hover {
            transform: scale(1.05);
        }

        .user-name {
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .user-name:hover {
            opacity: 0.8;
        }

        /* ─── Header ─── */
        .landing-header {
            text-align: center;
            margin-top: 40px;
            margin-bottom: 64px;
            animation: fadeIn 0.8s ease-out;
        }

        .logo-row {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .logo-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #ef4444);
            box-shadow: 0 0 16px rgba(59, 130, 246, 0.6);
        }

        .logo-text {
            font-size: 28px;
            font-weight: 600;
            letter-spacing: -0.03em;
            color: #ffffff;
        }

        .landing-subtitle {
            font-size: 15px;
            color: var(--text-secondary);
            font-weight: 300;
            letter-spacing: 0.02em;
        }

        /* ─── Grid ─── */
        .carrier-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 24px;
            width: 100%;
            max-width: 960px;
            animation: fadeIn 0.8s ease-out 0.15s both;
            margin-bottom: 40px;
        }

        .carrier-card {
            position: relative;
            border-radius: 16px;
            padding: 32px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.005);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
        }

        .carrier-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(150px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.03), transparent 80%);
            opacity: 0;
            transition: opacity 0.4s ease;
            pointer-events: none;
            z-index: 1;
        }

        .carrier-card:hover::before {
            opacity: 1;
        }

        .carrier-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.015);
        }

        .carrier-card.public:hover {
            box-shadow: 0 30px 60px -15px rgba(59, 130, 246, 0.05), inset 0 1px 0 0 rgba(255,255,255,0.05);
        }

        .carrier-card.locked:hover {
            box-shadow: 0 30px 60px -15px rgba(239, 68, 68, 0.04), inset 0 1px 0 0 rgba(255,255,255,0.05);
        }

        /* Ikony SVG */
        .carrier-icon-wrapper {
            margin-bottom: 24px;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.03);
            background: rgba(255, 255, 255, 0.01);
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .carrier-card:hover .carrier-icon-wrapper {
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(255, 255, 255, 0.15);
        }

        .carrier-icon-wrapper svg {
            width: 22px;
            height: 22px;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.5;
            color: var(--text-secondary);
            transition: color 0.3s ease;
        }

        .carrier-card:hover .carrier-icon-wrapper svg {
            color: var(--text-primary);
        }

        .carrier-name {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 8px;
            color: #ffffff;
            letter-spacing: -0.02em;
        }

        .carrier-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.6;
            font-weight: 300;
        }

        /* Lock Badge */
        .lock-badge {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #f87171;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 500;
            transition: opacity 0.3s ease;
        }

        .lock-badge svg {
            width: 12px;
            height: 12px;
            fill: currentColor;
        }

        /* ─── Modale (Overlay, Card, Close) ─── */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(3, 5, 10, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
            animation: modalFadeIn 0.3s ease;
        }

        .modal-card {
            background: rgba(18, 22, 30, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.05);
            width: 100%;
            max-width: 400px;
            border-radius: 24px;
            padding: 32px;
            position: relative;
            box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
        }

        .modal-close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 24px;
            cursor: pointer;
            transition: color 0.2s;
            line-height: 1;
        }

        .modal-close-btn:hover {
            color: var(--text-primary);
        }

        /* Login Tabs */
        .modal-tabs {
            display: flex;
            gap: 20px;
            margin-bottom: 28px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding-bottom: 8px;
        }

        .modal-tab {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            padding-bottom: 8px;
            position: relative;
            font-family: inherit;
        }

        .modal-tab.active {
            color: var(--text-primary);
        }

        .modal-tab.active::after {
            content: '';
            position: absolute;
            bottom: -9px;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(135deg, #3b82f6, #ef4444);
        }

        .modal-form {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-group label {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .form-group input {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 12px 16px;
            color: #ffffff;
            font-family: inherit;
            font-size: 14px;
            transition: all 0.2s;
        }

        .form-group input:focus {
            outline: none;
            border-color: rgba(59, 130, 246, 0.4);
            background: rgba(255, 255, 255, 0.04);
        }

        .btn-submit {
            background: linear-gradient(135deg, #3b82f6, #ef4444);
            border: none;
            color: #ffffff;
            padding: 14px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s;
            margin-top: 10px;
        }

        .btn-submit:hover {
            opacity: 0.95;
            transform: translateY(-1px);
        }

        .auth-error-msg {
            color: #f87171;
            font-size: 13px;
            background: rgba(239, 68, 68, 0.08);
            padding: 10px 14px;
            border-radius: 10px;
            border-left: 3px solid #ef4444;
            display: none;
        }

        /* ─── Profile Stats Styles ─── */
        .accent-text {
            background: linear-gradient(135deg, #3b82f6, #ef4444);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: 600;
        }

        .stats-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 20px;
        }

        .stat-row-header, .stat-row {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1.2fr;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 14px;
        }

        .stat-row-header {
            color: var(--text-secondary);
            font-weight: 500;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .stat-row {
            background: rgba(255, 255, 255, 0.01);
            border: 1px solid rgba(255, 255, 255, 0.02);
            color: var(--text-primary);
        }
        
        .stat-row span:first-child {
            font-weight: 500;
        }

        /* ─── Stopka ─── */
        .landing-footer {
            margin-top: auto;
            text-align: center;
            color: rgba(148, 163, 184, 0.2);
            font-size: 11px;
            font-weight: 300;
            letter-spacing: 0.05em;
            animation: fadeIn 0.8s ease-out 0.3s both;
        }

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

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

        /* ─── Responsive ─── */
        @media (max-width: 640px) {
            .carrier-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }
            .carrier-card {
                padding: 28px;
            }
            .top-nav {
                position: relative;
                top: 0;
                right: 0;
                margin-bottom: 24px;
                justify-content: center;
                width: 100%;
            }
            body {
                padding: 32px 16px;
            }
        }

        /* ─── Role Badges (Plakietki ról) ─── */
        .role-badge {
            display: inline-flex;
            align-items: center;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 2px 8px;
            border-radius: 9999px;
            margin-left: 6px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            user-select: none;
        }
        .role-administrator {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3));
            color: #f87171;
            border-color: rgba(239, 68, 68, 0.3);
            box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
        }
        .role-moderator {
            background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.3));
            color: #c084fc;
            border-color: rgba(168, 85, 247, 0.3);
            box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
        }
        .role-użytkownik {
            background: rgba(100, 116, 139, 0.15);
            color: #94a3b8;
            border-color: rgba(148, 163, 184, 0.2);
        }

        /* ─── Luksusowy Panel (Large Modal) ─── */
        .modal-card-large {
            max-width: 900px;
            width: 95%;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .modal-header-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 24px;
            gap: 20px;
            flex-wrap: wrap;
        }
        .admin-panel-title {
            font-size: 24px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            background: linear-gradient(135deg, #fff, var(--text-secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .admin-search-wrapper {
            position: relative;
            flex-grow: 1;
            max-width: 320px;
        }
        .admin-search-wrapper input {
            width: 100%;
            padding: 10px 16px;
            border-radius: 12px;
            background: rgba(30, 41, 59, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: #f8fafc;
            font-size: 14px;
            transition: all 0.2s;
        }
        .admin-search-wrapper input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
        }

        /* ─── Tabela Admina ─── */
        .admin-table-container {
            flex-grow: 1;
            overflow-y: auto;
            background: rgba(15, 23, 42, 0.3);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            margin-bottom: 8px;
        }
        .admin-table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 14px;
        }
        .admin-table th {
            position: sticky;
            top: 0;
            background: rgba(15, 23, 42, 0.9);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            color: var(--text-secondary);
            font-weight: 600;
            padding: 16px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            z-index: 1;
        }
        .admin-table td {
            padding: 14px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            color: var(--text-primary);
            vertical-align: middle;
        }
        .admin-table tr:hover {
            background: rgba(255, 255, 255, 0.02);
        }
        
        /* Selektory ról */
        .role-select {
            background: rgba(30, 41, 59, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #f8fafc;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 13px;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s;
        }
        .role-select:focus {
            outline: none;
            border-color: #3b82f6;
        }

        .btn-delete-user {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.35));
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.4);
            border-radius: 8px;
            padding: 6px 14px;
            font-size: 12px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .btn-delete-user:hover {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.45), rgba(220, 38, 38, 0.55));
            color: #ffffff;
            border-color: rgba(239, 68, 68, 0.7);
            box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
            transform: translateY(-1px);
        }

        .btn-delete-lobbies {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.35));
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.4);
            border-radius: 10px;
            padding: 10px 18px;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .btn-delete-lobbies:hover {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.45), rgba(220, 38, 38, 0.55));
            color: #ffffff;
            border-color: rgba(239, 68, 68, 0.7);
            box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
            transform: translateY(-1px);
        }
        .btn-delete-user:active {
            transform: translateY(0);
        }

        /* ─── Przełącznik iOS (Toggle Switch) ─── */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(100, 116, 139, 0.3);
            transition: .3s;
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        .toggle-switch input:checked + .toggle-slider {
            background-color: #10b981;
            border-color: rgba(16, 185, 129, 0.3);
        }
        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(20px);
        }
        .toggle-switch input:disabled + .toggle-slider {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* ─── Sekcje Profilu (Dla wszystkich użytkowników) ─── */
        .profile-modal-grid {
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 28px;
        }
        @media (max-width: 768px) {
            .profile-modal-grid {
                grid-template-columns: 1fr;
                gap: 24px;
            }
        }
        .profile-section-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 16px;
            font-family: 'Outfit', sans-serif;
            border-left: 3px solid #3b82f6;
            padding-left: 10px;
        }
        .profile-data-card {
            background: rgba(30, 41, 59, 0.3);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            padding: 16px 20px;
            margin-bottom: 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .profile-data-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 14px;
        }
        .profile-data-label {
            color: var(--text-secondary);
        }
        .profile-data-value {
            color: var(--text-primary);
            font-weight: 500;
        }

        /* Chipy uprawnień w profilu */
        .perm-chips-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .perm-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 500;
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            background: rgba(15, 23, 42, 0.4);
            color: var(--text-secondary);
            transition: all 0.2s;
        }
        .perm-chip.active {
            background: rgba(16, 185, 129, 0.1);
            border-color: rgba(16, 185, 129, 0.3);
            color: #34d399;
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
        }
        .perm-chip.inactive {
            opacity: 0.6;
            text-decoration: line-through;
        }

/* ==========================================================================
   MULTIPLAYER HUB CSS
   ========================================================================== */
.multiplayer-hub {
    width: 100%;
    max-width: 960px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 32px;
    animation: fadeIn 0.8s ease-out 0.1s both;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.hub-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
}

.hub-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.hub-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.hub-live-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 12px #10b981;
    animation: pulse 2s infinite;
}

.hub-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 300;
}

.hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }
}

.hub-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-column-title {
    font-size: 14px;
    font-weight: 500;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.hub-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.online-users-list, .active-lobbies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for lists */
.online-users-list::-webkit-scrollbar,
.active-lobbies-list::-webkit-scrollbar {
    width: 4px;
}
.online-users-list::-webkit-scrollbar-thumb,
.active-lobbies-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.hub-empty-state {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 24px 0;
    font-style: italic;
}

/* Online User Card */
.online-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.online-user-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.user-info-side {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-status-indicator {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.user-nick {
    font-size: 13px;
    font-weight: 500;
    color: #f1f5f9;
}

.user-role-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 500;
}

.user-role-badge.admin {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.user-role-badge.user {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Lobby Card */
.lobby-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.lobby-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.lobby-details-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lobby-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.game-badge.hangman {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.game-badge.ships {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.game-badge.tictactoe {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.lobby-host {
    font-size: 11px;
    color: var(--text-secondary);
}

.lobby-meta-side {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lobby-slots {
    font-size: 12px;
    font-weight: 500;
    color: #f1f5f9;
}

.lobby-lock-icon {
    width: 14px;
    height: 14px;
    color: #fbbf24;
    display: flex;
    align-items: center;
}

.btn-join-lobby {
    background: linear-gradient(135deg, #3b82f6, #ef4444);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-join-lobby:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ─── ZTM & PKP Application Specific Styles (Merged from style.css) ─── */
/* Główny kontener aplikacji */
.app-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.5s ease-out;
}

/* 1. NAGŁÓWEK (Header) */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 15px;
    margin-bottom: 5px;
}

.header-left .metropolis-label {
    color: var(--accent-sky);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 2px;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #FFFFFF, #E2E8F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background-color: var(--success-green);
    box-shadow: 0 0 8px var(--success-green);
}

.status-dot.offline {
    background-color: var(--error-red);
    box-shadow: 0 0 8px var(--error-red);
}

.status-text {
    font-size: 12px;
    font-weight: 600;
}

.status-text.online {
    color: var(--success-green);
}

.status-text.offline {
    color: var(--error-red);
}

.clock {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 2. PANEL STEROWANIA (Wyszukiwarka i Filtry) */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 14px 45px 14px 18px;
    background-color: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.search-box input:focus {
    border-color: var(--card-border-hover);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.02);
}

.search-box input::placeholder {
    color: #64748B;
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748B;
    font-size: 22px;
    cursor: pointer;
    display: none;
    outline: none;
    padding: 5px;
    line-height: 1;
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* Podpowiedzi wyszukiwania (Search Results Dropdown) */
.search-results-list {
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: rgba(14, 18, 28, 0.98); /* Bardziej dopasowany do motywu, lekko jaśniejszy */
    border: 1px solid var(--card-border);
    border-radius: 12px;
    z-index: 100;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
}

.search-result-item {
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.15s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.search-result-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 26px;
    transition: color 0.15s;
}

.search-result-item:hover .search-result-sub {
    color: rgba(255, 255, 255, 0.8);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* Chipsy filtrujące */
.filter-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.chip {
    padding: 8px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
    outline: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.chip:hover {
    border-color: var(--card-border-hover);
    color: var(--text-primary);
}

.chip:active {
    transform: scale(0.97);
}

.chip.active {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

/* Nagłówek sekcji odjazdów */
.section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 1.2px;
    margin-top: 5px;
}

/* 3. TABLICA ODJAZDÓW */
.departures-board-container {
    width: 100%;
    flex: 1;
}

.departures-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Karta odjazdu (Departure Card) */
.departure-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 15px;
    display: grid;
    grid-template-columns: 80px 1fr 95px;
    align-items: center;
    column-gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.departure-card:hover {
    transform: translateY(-1px);
    border-color: var(--card-border-hover);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

/* Plakietka numeru linii */
.route-badge {
    justify-self: start;
    width: 55px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
    color: #FFFFFF;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.route-badge.tram {
    background-color: var(--tram-color);
}

.route-badge.bus {
    background-color: var(--bus-color);
}

/* Kierunek */
.headsign {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Czas odjazdu i opóźnienie */
.time-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.time-info .time {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.time-info .delay {
    font-size: 12px;
    font-weight: 700;
}

.time-info .delay.delayed {
    color: var(--error-red);
}

.time-info .delay.on-time {
    color: var(--success-green);
}

.time-info .delay.offline-badge {
    color: var(--text-secondary);
    opacity: 0.85;
}

/* Stany puste i ładowanie */
.empty-state, .loading-state, .error-state {
    padding: 40px 20px;
    text-align: center;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.error-state {
    color: var(--error-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    display: inline-block;
    animation: spin 0.8s linear infinite;
    margin-bottom: 10px;
}

/* Animacje */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Customowy scrollbar dla podpowiedzi */
.search-results-list::-webkit-scrollbar {
    width: 6px;
}

.search-results-list::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsywność dla małych ekranów */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .app-header h1 {
        font-size: 22px;
    }
    
    .search-box input {
        padding: 12px 40px 12px 14px;
        font-size: 14px;
    }
    
    .departure-card {
        padding: 12px;
        grid-template-columns: 65px 1fr 85px;
        column-gap: 10px;
    }
    
    .route-badge {
        width: 48px;
        height: 32px;
        font-size: 14px;
    }
    
    .headsign {
        font-size: 14px;
    }
    
    .time-info .time {
        font-size: 18px;
    }
}

/* 4. MODAL DIALOG (Trasa linii & Rozkład jazdy) */
dialog#route-dialog, dialog#timetable-dialog {
    border: none;
    border-radius: 16px;
    background: rgba(3, 5, 10, 0.98);
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    padding: 0;
    color: var(--text-primary);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

dialog#route-dialog::backdrop, dialog#timetable-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dialog-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dialog-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dialog-title-group h3 {
    font-size: 18px;
    font-weight: 500;
}

.close-dialog-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    outline: none;
    padding: 5px;
    line-height: 1;
}

.close-dialog-btn:hover {
    color: var(--text-primary);
}

.dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Oś czasu trasy (Timeline) */
.timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--card-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    border: 2px solid var(--bg-gradient-start);
    z-index: 2;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.timeline-item.active .timeline-dot {
    background-color: var(--accent-sky);
    box-shadow: 0 0 8px var(--accent-sky);
}

.timeline-item.passed .timeline-dot {
    background-color: rgba(255, 255, 255, 0.2);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-stop-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-item.passed .timeline-stop-name {
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.6;
}

.timeline-item.active .timeline-stop-name {
    color: var(--accent-sky);
    font-weight: 700;
}

.timeline-time {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.timeline-item.passed .timeline-time {
    opacity: 0.5;
}

/* Customowy scrollbar dla modala */
.dialog-body::-webkit-scrollbar {
    width: 6px;
}

.dialog-body::-webkit-scrollbar-track {
    background: transparent;
}

.dialog-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.dialog-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Stylizacja tabeli/siatki rozkładu jazdy */
.timetable-stop-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.timetable-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 14px;
    max-height: 50vh;
    overflow-y: auto;
}
.timetable-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.timetable-row:last-child {
    border-bottom: none;
}
.timetable-hour {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-blue);
    width: 32px;
    text-align: right;
    margin-right: 12px;
    flex-shrink: 0;
}
.timetable-minutes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}
.timetable-minute-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* Sekcja przycisków rozkładów jazdy na tablicy odjazdów */
.departures-timetable-pills {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}
.departures-timetable-pills h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.timetable-pills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.timetable-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.timetable-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}
.timetable-pill.tram-pill:hover {
    border-color: #ff3b30;
}

/* ====================================================
   PANEL DEBUGOWANIA
   ==================================================== */

#debug-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: #0d0d0d;
    border-top: 2px solid #1a1a1a;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease;
    max-height: 280px;
    display: flex;
    flex-direction: column;
}

#debug-panel.collapsed #debug-box {
    display: none;
}

#debug-panel.collapsed {
    max-height: unset;
}

#debug-panel.hidden {
    display: none;
}

/* Pasek narzędzi */
#debug-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #111;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
    flex-wrap: wrap;
}

#debug-title {
    color: #4af;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 0.04em;
    user-select: none;
    cursor: pointer;
}

#debug-entry-count {
    color: #555;
    font-size: 10px;
    flex-shrink: 0;
}

/* Filtry poziomów */
#debug-filters {
    display: flex;
    gap: 4px;
    margin-left: 4px;
}

.dbg-filter {
    padding: 1px 7px;
    border-radius: 3px;
    border: 1px solid #333;
    background: transparent;
    color: #666;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 600;
}

.dbg-filter:hover {
    border-color: #555;
    color: #aaa;
}

.dbg-filter.active[data-level="ALL"]   { background: #1c2d3a; border-color: #4af; color: #4af; }
.dbg-filter.active[data-level="INFO"]  { background: #1a2b1a; border-color: #4f4; color: #4f4; }
.dbg-filter.active[data-level="WARN"]  { background: #2b2510; border-color: #fa4; color: #fa4; }
.dbg-filter.active[data-level="ERROR"] { background: #2b1010; border-color: #f44; color: #f44; }

/* Przyciski akcji */
#debug-actions {
    margin-left: auto;
    display: flex;
    gap: 2px;
}

#debug-actions button {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #666;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

#debug-actions button:hover {
    border-color: #555;
    color: #ccc;
    background: #1a1a1a;
}

/* Obszar logów */
#debug-box {
    overflow-y: auto;
    flex: 1;
    padding: 6px 10px;
    scroll-behavior: smooth;
}

#debug-box::-webkit-scrollbar { width: 5px; }
#debug-box::-webkit-scrollbar-track { background: #111; }
#debug-box::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
#debug-box::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* Wpisy logów */
.dbg-entry {
    display: flex;
    gap: 6px;
    padding: 1.5px 0;
    border-bottom: 1px solid #151515;
    line-height: 1.5;
    align-items: baseline;
}

.dbg-entry.hidden { display: none; }

.dbg-time {
    color: #444;
    flex-shrink: 0;
    font-size: 10px;
}

.dbg-badge {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dbg-entry.lvl-info .dbg-badge  { background: #0a2a0a; color: #4f4; border: 1px solid #1a4a1a; }
.dbg-entry.lvl-warn .dbg-badge  { background: #2a1f00; color: #fa4; border: 1px solid #4a3a00; }
.dbg-entry.lvl-error .dbg-badge { background: #2a0000; color: #f55; border: 1px solid #5a0000; }

.dbg-entry.lvl-info  .dbg-msg { color: #8dc; }
.dbg-entry.lvl-warn  .dbg-msg { color: #fa4; }
.dbg-entry.lvl-error .dbg-msg { color: #f55; font-weight: bold; }

.dbg-msg {
    color: #8dc;
    word-break: break-all;
    font-size: 11px;
}

/* Licznik błędów w tytule */
#debug-error-badge {
    background: #f44;
    color: #fff;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    padding: 0 5px;
    margin-left: 2px;
    display: none;
}

/* ====================================================
   PRZYCISK POWROTU DO STRONY GŁÓWNEJ
   ==================================================== */
.back-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-home-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    transform: translateX(-2px);
}

/* ── Pasek filtrów odjazdów ──────────────────────────────── */
#departure-filter-bar {
    padding: 8px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: none;
}

.filter-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.time-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 4px 10px;
    transition: border-color 0.2s, background 0.2s;
}

.time-filter-group.active {
    border-color: rgba(96,165,250,0.45);
    background: rgba(59,130,246,0.09);
}

.time-filter-group label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    user-select: none;
}

#time-filter-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    outline: none;
    width: 76px;
    cursor: pointer;
}

#time-filter-input::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.35);
    cursor: pointer;
}

#time-filter-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    display: none;
}

#time-filter-clear:hover { color: #fff; }
#time-filter-clear.visible { display: inline; }

.show-more-btn {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.show-more-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
}

/* Przycisk powrotu i spójne logo w nagłówku podstron */
.back-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.2s;
    margin-bottom: 8px;
}

.back-link:hover {
    color: var(--text-primary);
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #ef4444);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
}

.logo-text {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.ztm-label, .pkp-label {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    margin-left: 8px;
}

.ztm-label {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.pkp-label {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}
