:root {
    /* Dark Theme (Default) */
    --bg-body: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #00d2ff;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --hover-bg-strong: rgba(255, 255, 255, 0.2);
    --item-bg: rgba(255, 255, 255, 0.05);
    --scrollbar-track: rgba(0, 0, 0, 0.1);
    --scrollbar-thumb: rgba(255, 255, 255, 0.2);
    --dropdown-bg: #1a1a1a;
    --dropdown-text: #ffffff;
}

[data-theme="light"] {
    /* Light Theme */
    --bg-body: #f0f2f5;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
    --accent-color: #007bff;
    /* Darker blue for contrast */
    --hover-bg: #f8f9fa;
    --hover-bg-strong: #e9ecef;
    --item-bg: #ffffff;
    --scrollbar-track: rgba(0, 0, 0, 0.05);
    --scrollbar-thumb: rgba(0, 0, 0, 0.2);
    --dropdown-bg: #ffffff;
    --dropdown-text: #1a1a1a;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent scrollbars */
}

.container {
    display: flex;
    flex: 1;
    /* Fill remaining space */
    width: 100vw;
    overflow: hidden;
}

/* --- Badges & Intensity --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    /* Reduced padding */
    border-radius: 10px;
    /* Slightly tighter radius */
    font-size: 10px;
    /* Fixed small size to prevent overflow */
    font-weight: 600;
    line-height: 1;
    gap: 3px;
    letter-spacing: 0.3px;
    box-shadow: none;
    white-space: nowrap;
    /* Prevent wrapping */
}

.badge svg {
    width: 12px;
    height: 12px;
    stroke-width: 3;
}

/* Intensity Levels (Outline Style) - Enhanced for Dark Mode */
.level-green {
    background-color: rgba(76, 175, 80, 0.2);
    color: #a5d6a7;
    border: 1px solid #4caf50;
}

.level-yellow {
    background-color: rgba(255, 235, 59, 0.2);
    color: #fff59d;
    border: 1px solid #ffeb3b;
}

.level-orange {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ffcc80;
    border: 1px solid #ff9800;
}

.level-red {
    background-color: rgba(244, 67, 54, 0.2);
    color: #ef9a9a;
    border: 1px solid #f44336;
}

.level-pink {
    background-color: rgba(233, 30, 99, 0.2);
    color: #f48fb1;
    border: 1px solid #e91e63;
}

/* Change Indicators (Dark Outline Style) - Enhanced */
.badge-expanding {
    background-color: rgba(76, 175, 80, 0.25);
    color: #a5d6a7;
    border: 1px solid #66bb6a;
}

.badge-shrinking {
    background-color: rgba(244, 67, 54, 0.25);
    color: #ef9a9a;
    border: 1px solid #ef5350;
}

.badge-neutral {
    background-color: rgba(255, 255, 255, 0.08);
    color: #bdbdbd;
    border: 1px solid #616161;
}

.badge-waiting {
    background-color: rgba(255, 255, 255, 0.05);
    color: #c0c0c0;
    border: 1px solid #757575;
}

/* Sidebar Removed */

.header {
    position: absolute;
    top: 20px;
    left: 20px;
    /* Reset left position */
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1000;
    pointer-events: none;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    pointer-events: auto;
    padding: 10px 20px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 350px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Custom Scrollbar for info-box */
.info-box::-webkit-scrollbar {
    width: 6px;
}

.info-box::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.info-box::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.logo-img {
    height: 45px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

/* Cell List Styles (Adapted for Info Box) */
.cell-list {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cell-item {
    background-color: var(--item-bg);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid var(--glass-border);
}

.cell-item:hover {
    background-color: var(--hover-bg);
    border-color: var(--glass-border);
}

.cell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.cell-id {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.cell-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-size: 0.9rem;
    font-style: italic;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 10px;
    font-size: 0.9rem;
}

.logo-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subdiv {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.station-name {
    font-size: 1.1rem;
    color: #4cc9f0;
    /* Highlight color */
    font-weight: 600;
}

.app-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.dev-name {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.controls-container {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    z-index: 2000;
    /* Ensure above everything */
}

.control-group {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    gap: 10px;
}

.station-dropdown {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

.station-dropdown option {
    background: var(--dropdown-bg);
    color: var(--dropdown-text);
}

.playback-group {
    padding: 6px 12px;
}

.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--accent-color);
    min-width: 160px;
    /* Increased to 160px for safety */
    text-align: center;
    white-space: nowrap;
}

.icon-btn {
    background: var(--hover-bg);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--hover-bg-strong);
    transform: translateY(-1px);
}

.settings-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    width: 44px;
    /* Match height of other groups */
    height: 44px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.close-modal {
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

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

.modal-body {
    padding: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.setting-item select {
    background: rgba(30, 30, 30, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 12px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-item select:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: var(--accent-color);
}

.setting-item select:focus {
    background: rgba(40, 40, 40, 1);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

.setting-item select option {
    background: #1a1a1a;
    color: var(--text-primary);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
    background: rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0099cc 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00e5ff 0%, #00b8d4 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 210, 255, 0.5);
}

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

.cell-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.cell-item {
    background-color: rgba(25, 25, 25, 0.9);
    /* Darker for dark mode */
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Light mode cell styling */
[data-theme="light"] .cell-item {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cell-item:hover {
    background-color: rgba(40, 40, 40, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .cell-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cell-item.active {
    background-color: rgba(0, 210, 255, 0.15);
    border-left: 4px solid var(--accent-color);
    border-color: var(--accent-color);
}

[data-theme="light"] .cell-item.active {
    background-color: rgba(0, 123, 255, 0.1);
}

.cell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cell-id {
    font-weight: bold;
    color: var(--accent-color);
}

.cell-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: var(--hover-bg-strong);
    color: var(--text-primary);
}

.cell-details {
    display: grid;
    gap: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.detail-row {
    display: flex;
    flex-direction: row;
    /* Align horizontal */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.detail-row span {
    color: var(--text-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    /* Better number alignment */
}

/* Map */
#map {
    flex: 1;
    height: 100%;
    background-color: #000;
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-sidebar);
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Animations */
@keyframes flash-green {
    0% {
        color: #4caf50;
        text-shadow: 0 0 5px #4caf50;
    }

    100% {
        color: #eee;
        text-shadow: none;
    }
}

@keyframes flash-red {
    0% {
        color: #f44336;
        text-shadow: 0 0 5px #f44336;
    }

    100% {
        color: #eee;
        text-shadow: none;
    }
}

.flash-update-positive {
    animation: flash-green 1s ease-out;
}

.flash-update-negative {
    animation: flash-red 1s ease-out;
}

.following-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 210, 255, 0.2);
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid var(--accent-color);
    display: none;
    z-index: 1000;
}

/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 200px;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    height: 100%;
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    z-index: 3000;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    position: relative;
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background-color: var(--hover-bg);
    color: var(--accent-color);
}

.custom-option.selected {
    background-color: var(--hover-bg-strong);
    color: var(--accent-color);
    font-weight: 600;
}

.arrow {
    position: relative;
    height: 8px;
    width: 8px;
}

.arrow::before,
.arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 0.1rem;
    height: 100%;
    transition: all 0.2s;
}

.arrow::before {
    left: -3px;
    transform: rotate(45deg);
    background-color: var(--text-secondary);
}

.arrow::after {
    left: 3px;
    transform: rotate(-45deg);
    background-color: var(--text-secondary);
}

.custom-select.open .arrow::before {
    transform: rotate(-45deg);
}

.custom-select.open .arrow::after {
    transform: rotate(45deg);
}

/* --- New Sidebar Layout --- */
.sidebar {
    position: absolute;
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: 360px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 10px;
    border-bottom: 1px solid var(--glass-border);
}

/* Tabs - Neo-Tactile Style */
.tab-group {
    display: flex;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
    padding: 4px;
    margin: 8px 10px 0 10px;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .tab-group {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.03));
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    transform: translateY(-1px);
}

[data-theme="light"] .tab-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
}

.tab-btn.active {
    background: linear-gradient(145deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
    color: #2196F3;
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.4);
}

[data-theme="light"] .tab-btn.active {
    background: linear-gradient(145deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
    color: #1976D2;
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    /* For inner scroll */
}

.tab-content.active {
    display: flex;
}

/* Sidebar Toolbar (Composite + Theme) */
.sidebar-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
}

.icon-btn-small {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .icon-btn-small {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.8));
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.icon-btn-small:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 16px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(33, 150, 243, 0.3);
}

[data-theme="light"] .icon-btn-small:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 0.9));
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 0 16px rgba(33, 150, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-composite {
    flex: 1;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .btn-composite {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.8));
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-composite:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 16px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .btn-composite:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 0.9));
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 0 16px rgba(33, 150, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Station List */
.station-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px 8px;
}

.station-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    margin-bottom: 6px;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .station-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(245, 245, 245, 0.8));
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.station-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(33, 150, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
}

[data-theme="light"] .station-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(250, 250, 250, 0.9));
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 0 12px rgba(33, 150, 243, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.station-item.active {
    background: linear-gradient(145deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
    border-color: rgba(33, 150, 243, 0.5);
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.3),
        0 0 16px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .station-item.active {
    background: linear-gradient(145deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.08));
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.2),
        0 0 16px rgba(33, 150, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Pin Icon area - Neo-Tactile */
.station-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5252;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .station-icon {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.8));
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.station-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.station-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.station-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Rain Tracker Layout adjustments */
.tracker-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.playback-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

/* Text Button Style - Neo-Tactile */
.control-btn-text {
    background: linear-gradient(145deg, rgba(33, 150, 243, 0.9), rgba(25, 118, 210, 0.8));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.control-btn-text:hover {
    background: linear-gradient(145deg, rgba(33, 150, 243, 1), rgba(25, 118, 210, 0.9));
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 6px 16px rgba(33, 150, 243, 0.5),
        0 0 20px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.control-btn-text:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 2px 6px rgba(33, 150, 243, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Pause State (Red) for Play Button when playing */
.control-btn-text.paused {
    /* If we toggle class for visual */
    background: #ff5252;
}

.control-btn-text.active {
    background: linear-gradient(145deg, rgba(255, 152, 0, 0.9), rgba(245, 124, 0, 0.8));
    box-shadow: 
        0 4px 12px rgba(255, 152, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Icon tweak */
.control-btn-text i {
    font-size: 1rem;
}

/* Specific button overrides if needed */
/* #btnPlay (handled by class) */
/* #btnPast (handled by class) */

.p-time-display {
    font-family: 'JetBrains Mono', monospace;
    /* Modern Monospace */
    color: #007bff;
    /* Match button blue */
    font-weight: 700;
    font-size: 1.2rem;
    /* Bigger text */
    min-width: 80px;
    text-align: center;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.settings-trigger {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}

.settings-trigger:hover {
    opacity: 1;
}

/* GPS Location Button */
.gps-location-btn {
    position: absolute;
    bottom: 100px;
    right: 10px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.gps-location-btn:hover {
    background: var(--hover-bg-strong);
    transform: scale(1.05);
}

.gps-location-btn.active {
    background: var(--accent-color);
    color: white;
}

.gps-location-btn.loading {
    animation: pulse 1.5s infinite;
}

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

/* Rain Alert Box */
.rain-alert-box {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    background: linear-gradient(135deg, rgba(0, 100, 200, 0.95), rgba(0, 150, 255, 0.9));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 100, 200, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 90%;
    min-width: 280px;
}

.rain-alert-box.warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.95), rgba(255, 193, 7, 0.9));
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
}

.rain-alert-box.danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95), rgba(255, 82, 82, 0.9));
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

.rain-alert-box.safe {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(129, 199, 132, 0.9));
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.rain-alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.rain-alert-icon {
    font-size: 1.5rem;
}

.rain-alert-text {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.rain-alert-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.rain-alert-close:hover {
    color: white;
}

/* User Location Marker */
.user-location-marker {
    background: var(--accent-color);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.user-accuracy-circle {
    fill: var(--accent-color);
    fill-opacity: 0.15;
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-opacity: 0.5;
}