/* Transit Display UI Styles */

:root {
    --primary-bg: #121521;
    --secondary-bg: #1c1f2b;
    --panel-bg: #1c1f2b;
    --panel-alt-bg: #393e53;
    --panel-border: rgba(255, 255, 255, 0.1);
    --accent-orange: #f2cd00;
    --transit-line-active: #806d02;
    --accent-blue: #0052cc;
    --accent-red: #cc2121;
    --accent-green: #41a745;
    --success-green: #4caf50;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Light Mode Theme */
:root.light-mode {
    --primary-bg: #ecebeb;
    --secondary-bg: #ffffff;
    --panel-bg: #f3f4f8;
    --panel-alt-bg: #dde0e2;
    --panel-border: rgba(17, 24, 39, 0.12);
    --accent-orange: #ff9500;
    --transit-line-active: #ffc966;
    --accent-blue: #0052cc;
    --accent-red: #cc2121;
    --accent-green: #41a745;
    --success-green: #4caf50;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

:root.light-mode .modal-header {
    border-bottom-color: var(--panel-border);
}

/* :root.light-mode .category-btn,
:root.light-mode .line-category-btn,
:root.light-mode .message-item,
:root.light-mode .station-item,
:root.light-mode .line-item,
:root.light-mode .transit-line-item {
    background: var(--panel-alt-bg);
    border-color: var(--panel-border);
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 8px rgba(0, 0, 0, 0.04);
} */

:root.light-mode .category-btn:hover,
:root.light-mode .line-category-btn:hover,
:root.light-mode .message-item:hover,
:root.light-mode .station-item:hover,
:root.light-mode .line-item:hover,
:root.light-mode .transit-line-item:hover {
    background: #e7edf6;
}

:root.light-mode .modal-close {
    color: var(--text-primary);
}

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

html,
body {
    width: 100%;
    height: 100%;
    font-family: "Onest", sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.control-panel-wrap.is-top {
    order: -1;
    margin-bottom: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.destination-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.to-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.destination-text {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-green);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.status-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Display Panel */
.display-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 5px;
    position: relative;
}

.intro-tip {
    position: absolute;
    top: 54px;
    left: 50%;
    z-index: 10;
    width: min(420px, calc(100% - 32px));
    margin: 0;
    padding: 10px 14px;
    transform: translateX(-50%);
    border: 1px solid var(--accent-orange);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

:root.light-mode .intro-tip {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
}

.button-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
    z-index: 10;
}

.replay-button {
    position: relative;
    align-self: flex-end;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid var(--panel-border);
    border-radius: 6px;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.theme-toggle-btn {
    position: relative;
    align-self: flex-end;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #ffa01c;
    border-radius: 8px;
    background: var(--secondary-bg);
    color: #ffa01c;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.theme-toggle-btn {
    position: relative;
    overflow: visible;
    padding: 0;
}

.theme-toggle-btn i {
    font-size: 11px;
}

.theme-mode-indicator {
    position: absolute;
    right: -4px;
    bottom: -4px;
    min-width: 11px;
    height: 11px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffa01c;
    color: #000;
    font-size: 7px;
    font-weight: 800;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, 0.35);
}

:root.light-mode .theme-toggle-btn,
:root.light-mode .replay-button {
    background: rgba(255, 255, 255, 0.9);
}

.theme-toggle-btn:hover,
.replay-button:hover,
.control-position-toggle:hover {
    border: 2px solid #ffa01c;
    transform: scale(1.1);
}

:root.light-mode .theme-toggle-btn:hover,
:root.light-mode .replay-button:hover {
    background: rgba(255, 255, 255, 0.95);
}

.replay-button:active,
.theme-toggle-btn:active {
    transform: scale(0.95);
}

.replay-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-btn {
    background: var(--secondary-bg);
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--accent-orange);
    color: var(--primary-bg);
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Video Container */
.video-container {
    text-align: center;
    padding: 0;
    background: var(--primary-bg);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
}

.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #ff6b1a;
    transform: scale(1.1);
}

.station-video,
.station-video-ann,
.station-video-temp {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    flex: 1;
}

.line-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 40px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    color: white;
}

.cc-4 {
    background: var(--accent-orange);
}

.dt-15 {
    background: var(--accent-blue);
}

.station-name {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.station-translations {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
    color: var(--text-secondary);
}

.translation {
    display: inline-block;
}

/* Station Display */
.station-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    min-height: 300px;
    overflow: hidden;
}

.station-video-cld {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Fullscreen video styles */
.video-container:fullscreen,
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen,
.station-display:fullscreen,
.station-display:-webkit-full-screen,
.station-display:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    inset: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}

.station-video:fullscreen,
.station-video:-webkit-full-screen,
.station-video:-moz-full-screen,
.station-video-temp:fullscreen,
.station-video-temp:-webkit-full-screen,
.station-video-temp:-moz-full-screen,
.station-video-cld:fullscreen,
.station-video-cld:-webkit-full-screen,
.station-video-cld:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    display: block !important;
}

/* Control Panel */
.control-panel-wrap {
    position: relative;
}

.control-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.control-options .replay-button,
.control-options .theme-toggle-btn {
    align-self: auto;
}

.control-position-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid var(--panel-border);
    border-radius: 6px;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-position-toggle:hover,
.control-position-toggle:focus-visible {
    border-color: #ffa01c;
    color: var(--text-primary);
}

.control-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 10px;
    border: 2px solid var(--panel-border);
    border-radius: 6px;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.control-toggle:hover,
.control-toggle:focus-visible {
    border-color: #ffa01c;
    color: var(--text-primary);
    transform: scale(1.05);
}

.control-toggle i {
    transition: transform 0.3s ease;
}

.control-panel-wrap.is-collapsed .control-toggle {
    margin-bottom: 0;
}

.control-panel-wrap.is-collapsed .control-toggle i {
    transform: rotate(180deg);
}

.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease, max-height 0.4s ease, padding 0.4s ease, gap 0.4s ease;
    max-height: 300px;
    overflow: hidden;
}

.control-panel-wrap.is-collapsed .control-panel {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    border-width: 0;
}

.control-panel:hover {
    transform: translateY(-2px);
}

.control-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--panel-alt-bg);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.btn-icon {
    font-size: 24px;
    display: block;
}

.btn-text {
    display: block;
    text-align: center;
    width: 100%;
}

.control-button:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.4);
    transform: translateY(-2px);
}

.control-button:active {
    transform: translateY(0);
}

.doors-btn:hover {
    border-color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
}

.next-btn:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 82, 204, 0.4);
}

.messages-btn:hover {
    border-color: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.line-btn:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 15px rgba(211, 23, 23, 0.4);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content.msg {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-blue);
}

.modal-content.ln {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-orange);
}

.modal-content.stn {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-red);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #393e53;
}

.modal-header h2 {
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-blue);
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Message Categories */
.message-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    background: var(--panel-alt-bg);
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.category-btn:hover {
    border-color: var(--accent-blue);
}

.category-btn.active {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
    color: #fff;
}

/* Line Categories */
.line-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.line-category-btn {
    padding: 8px 16px;
    background: var(--panel-alt-bg);
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.line-category-btn:hover {
    border-color: var(--accent-red);
}

.line-category-btn.active {
    border-color: var(--accent-red);
    background: var(--accent-red);
    color: #fff;
}

/* Line Tabs */
.line-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #393e53;
}

:root.light-mode .line-tabs {
    border-bottom-color: var(--panel-border);
}

.line-tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

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

.line-tab-btn.active {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

/* Messages List */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.message-item {
    padding: 12px 16px;
    background: var(--panel-alt-bg);
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-weight: 500;
}

.message-item:hover {
    border-color: var(--accent-blue);
    transform: translateX(5px);
}

.message-item.active {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
    color: #fff;
}

.message-item:active {
    transform: translateX(0);
}

/* Stations List */
.stations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Lines List */
.lines-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.station-item {
    padding: 12px 16px;
    background: var(--panel-alt-bg);
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-weight: 500;
}

.station-item:hover {
    border-color: var(--accent-blue);
    background: #505050;
    transform: translateX(5px);
}

.station-item:active {
    transform: translateX(0);
}

.line-item {
    padding: 12px 16px;
    background: var(--panel-alt-bg);
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-weight: 500;
}

.line-item:hover {
    border-color: var(--accent-red);
    transform: translateX(5px);
}

.line-item.active {
    border-color: var(--accent-red);
    background: var(--accent-red);
    color: #fff;
}

.line-item:active {
    transform: translateX(0);
}

/* Transit Lines List */
.transit-lines-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.transit-line-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--panel-alt-bg);
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
    min-height: 150px;
}

.transit-line-item:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.4);
    transform: translateY(-2px);
}

.transit-line-item.active {
    border-color: var(--transit-line-active);
    background: var(--transit-line-active);
    color: var(--primary-bg);
}

.transit-line-item:active {
    transform: scale(0.98);
}

.transit-line-icon {
    width: 73px;
    height: 44px;
    margin-bottom: 10px;
}

.transit-line-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.transit-line-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-orange);
}

.transit-line-name {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Status Toast */
.status-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--accent-red);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    animation: slideInUp 0.3s ease;
    z-index: 999;
}

.status-toast.hidden {
    display: none;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar Styling */
/* Messages List - Blue */
#messagesModal .messages-list::-webkit-scrollbar {
    width: 8px;
}

#messagesModal .messages-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#messagesModal .messages-list::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 10px;
    transition: background 0.3s ease;
}

#messagesModal .messages-list::-webkit-scrollbar-thumb:hover {
    background: #0066ff;
}

/* Stations List - Red */
#linesModal .lines-list::-webkit-scrollbar {
    width: 8px;
}

#linesModal .lines-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#linesModal .lines-list::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 10px;
    transition: background 0.3s ease;
}

#linesModal .lines-list::-webkit-scrollbar-thumb:hover {
    background: #ee3333;
}

/* Transit Lines List - Orange */
#transitLinesModal .transit-lines-list::-webkit-scrollbar {
    width: 8px;
}

#transitLinesModal .transit-lines-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#transitLinesModal .transit-lines-list::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 10px;
    transition: background 0.3s ease;
}

#transitLinesModal .transit-lines-list::-webkit-scrollbar-thumb:hover {
    background: #ff8c00;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .station-name {
        font-size: 36px;
    }

    .station-display {
        min-height: 150px;
        align-items: self-start;
    }

    .display-panel {
        margin-top: 3em;
        gap: 65px;
        margin-bottom: 15px;
    }

    .control-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .control-button {
        padding: 12px;
        font-size: 12px;
        gap: 6px;
    }

    .btn-icon {
        font-size: 20px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .category-btn,
    .line-category-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .transit-line-item {
        min-height: 120px;
        padding: 12px;
    }

    .transit-line-icon {
        width: 73px;
        height: 44px;
    }

    .station-translations {
        flex-direction: column;
        gap: 10px;
    }

    .station-video-cld,
    .station-display {
        border-radius: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .station-name {
        font-size: 28px;
    }

    .station-display {
        min-height: 120px;
    }

    .display-panel {
        gap: 10px;
        margin-bottom: 10px;
    }

    .control-panel {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .control-button {
        padding: 10px;
        font-size: 11px;
        gap: 5px;
    }

    .btn-icon {
        font-size: 16px;
    }

    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .category-btn,
    .line-category-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .line-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .transit-line-item {
        min-height: 100px;
        padding: 10px;
    }

    .transit-line-icon {
        width: 73px;
        height: 44px;
        margin-bottom: 5px;
    }

    .transit-line-code {
        font-size: 14px;
    }

    .transit-line-name {
        font-size: 10px;
    }

    .display-panel {
        margin-top: 3em;
        gap: 65px;
        margin-bottom: 10px;
    }

    .line-badge {
        flex-wrap: wrap;
    }

    .station-video-cld,
    .station-display {
        border-radius: 5px;
    }
}