:root {
    --bg-light: #f4f4f4;
    --bg-dark: #1a1a2a;
    --text-light: #333;
    --text-dark: #f0f0f0;
    --panel-bg-light: #fffbe6;
    --panel-bg-dark: #2a2a2a;
    --accent: #00adb5;
    --border-light: #ffe58f;
    --border-dark: #444;
    --text-muted-light: #555;
    --text-muted-dark: #aaa;
    --error-light: #c0392b;
    --error-dark: #e74c3c;
    --success-light: #2ecc71;
    --success-dark: #27ae60;
    --barrier-down: #e74c3c;
    --primary: #00adb5;
    --transition: 0.2s;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 0;
    padding: 10px;
    transition: background-color var(--transition), color var(--transition);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 60px;
    /* Add space for top-right controls on mobile */
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    margin-bottom: 30px;
}

h1 {
    margin: 0 0 10px 0;
    color: var(--text-light);
}

h2 {
    margin: 0 0 15px 0;
    color: var(--text-light);
}

h2 .material-symbols-outlined,
summary .material-symbols-outlined {
    vertical-align: middle;
    font-size: 1.5em;
    margin-right: 8px;
    position: relative;
    top: -3px;
    /* Fine-tune vertical alignment */
}

/* Dark mode */
[data-theme="dark"] body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2 {
    color: var(--text-dark);
}

[data-theme="dark"] .tagline {
    color: var(--text-muted-dark);
}

[data-theme="dark"] .summary-panel {
    background-color: var(--panel-bg-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] #summary-text {
    color: var(--accent);
}

[data-theme="dark"] #login-prompt-btn,
[data-theme="dark"] #history-btn,
[data-theme="dark"] #theme-toggle-btn {
    background-color: #333;
    border-color: #555;
    color: var(--text-dark);
}

[data-theme="dark"] #settings-panel-container details,
[data-theme="dark"] .history-panel {
    background-color: var(--panel-bg-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .setting-item {
    border-bottom-color: var(--border-dark);
}

[data-theme="dark"] .modal-content {
    background-color: #333;
    border-color: #555;
}

[data-theme="dark"] #train-times-container,
[data-theme="dark"] #barrier-prediction-container,
[data-theme="dark"] #double-whammy-container,
[data-theme="dark"] #safe-crossing-timeline {
    background-color: var(--panel-bg-dark);
}

[data-theme="dark"] .barrier-event,
[data-theme="dark"] .safe-event,
[data-theme="dark"] .whammy-event,
[data-theme="dark"] .train-service {
    border-bottom-color: var(--border-dark);
}

[data-theme="dark"] .whammy-event {
    background-color: #4d3d3d;
    border-left-color: var(--error-dark);
}

[data-theme="dark"] .barrier-reason,
[data-theme="dark"] .safe-reason,
[data-theme="dark"] .whammy-reason {
    color: var(--text-muted-dark);
}

[data-theme="dark"] .whammy-reason {
    color: var(--error-dark);
}

[data-theme="dark"] .service-platform {
    color: var(--text-muted-dark);
}

[data-theme="dark"] .service-details {
    background-color: #2a2a2a;
    border-color: var(--border-dark);
}

[data-theme="dark"] .service-details strong {
    color: var(--text-dark);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2000;
    /* Increased z-index to be above everything */
    text-align: center;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
}

.tagline {
    text-align: center;
    font-style: italic;
    font-size: 1.1em;
    margin: -10px 0 0;
    color: var(--text-muted-light);
}

.summary-panel {
    padding: 20px;
    margin-bottom: 30px;
    background-color: var(--panel-bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-align: center;
}

#summary-text {
    font-size: 1.3em;
    font-weight: bold;
    color: #8a6d3b;
}

/* --- Top Right Controls --- */
.top-right-controls {
    position: fixed;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

/* Text button variant */
.icon-btn.text-btn {
    width: auto;
    border-radius: 22px;
    padding: 0 16px 0 12px;
    gap: 6px;
}

.icon-btn.text-btn .btn-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.icon-btn .material-symbols-outlined {
    font-size: 24px;
    line-height: 1;
    display: block;
    /* Ensures no extra vertical space */
}

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

#banana-btn {
    font-size: 24px;
    line-height: 1;
}

/* Settings Panel */
.material-symbols-outlined {
    color: white;
}

.icon-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.icon-btn:hover .material-symbols-outlined,
.icon-btn:hover .btn-text {
    color: white;
}

.icon-btn .material-symbols-outlined {
    font-size: 24px;
    color: var(--text-light);
}

[data-theme="dark"] .icon-btn {
    background-color: rgba(51, 51, 51, 0.9);
    border-color: #555;
}

[data-theme="dark"] .icon-btn .material-symbols-outlined {
    color: var(--text-dark);
}

[data-theme="dark"] .icon-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

[data-theme="dark"] .icon-btn.text-btn .btn-text {
    color: var(--text-dark);
}

/* --- Settings Panel --- */
#settings-panel-container {
    margin-bottom: 20px;
}

#settings-panel-container details {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    text-align: left;
}

#settings-panel-container summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
}

.settings-panel {
    margin-top: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.setting-item label {
    margin-right: 10px;
}

.setting-item input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

/* --- Modal Styles --- */
.modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 300px;
    border-radius: 8px;
    text-align: center;
}

.modal-content input {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px 0;
}

.modal-content button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
}

.error-message {
    color: var(--error-light);
    font-size: 0.9em;
    margin-top: 10px;
}


#train-times-container,
#barrier-prediction-container,
#double-whammy-container,
#safe-crossing-timeline {
    background-color: #fff;
    padding: 20px;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#double-whammy-container h2 .material-symbols-outlined {
    color: #e74c3c;
}

#safe-crossing-timeline h2 .material-symbols-outlined {
    color: #27ae60;
}

#train-times-container h2 .material-symbols-outlined {
    color: var(--accent-color);
}

/* Icon colors for different sections */
#alerts h2 .material-symbols-outlined {
    color: #e74c3c;
}

#safe-crossing-section h2 .material-symbols-outlined {
    color: #27ae60;
}

#live-departures-section h2 .material-symbols-outlined {
    color: var(--accent-color);
}

.barrier-event,
.safe-event,
.whammy-event {
    border-bottom: 1px solid #eee;
    padding: 15px 5px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    align-items: center;
    font-size: 1.1em;
}

.whammy-event {
    background-color: #fff2f2;
    border-left: 5px solid var(--error-light);
}

/* --- Timeline Controls --- */
.timeline-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.timeline-range-btn {
    padding: 8px 16px;
    font-size: 0.95em;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 6px;
    background-color: #f4f4f4;
    color: var(--text-light);
    transition: all 0.2s;
}

.timeline-range-btn:hover {
    background-color: #e0e0e0;
    border-color: var(--accent);
}

.timeline-range-btn.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

[data-theme="dark"] .timeline-range-btn {
    background-color: #333;
    border-color: #555;
    color: var(--text-dark);
}

[data-theme="dark"] .timeline-range-btn:hover {
    background-color: #444;
    border-color: var(--accent);
}

[data-theme="dark"] .timeline-range-btn.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* --- Timeline Styles --- */
.timeline-wrapper {
    padding: 20px 10px;
    position: relative;
}

.timeline-bar {
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    border: 1px solid #ccc;
    border-radius: 5px;
    position: relative;
    overflow: visible;
    cursor: crosshair;
}

[data-theme="dark"] .timeline-bar {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 1px solid #555;
}


.timeline-segment {
    position: absolute;
    height: 100%;
    top: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.timeline-segment:hover {
    opacity: 1;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5) inset;
}

.timeline-safe {
    background-color: var(--success-light);
    z-index: 0;
}

.timeline-down {
    background: var(--barrier-down);
    z-index: 10;
}

.timeline-whammy {
    background: var(--barrier-down);
    z-index: 20;
    /* Removed striped background and borders */
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9em;
    color: var(--text-muted-light);
}

[data-theme="dark"] .timeline-labels {
    color: var(--text-muted-dark);
}


.timeline-tooltip {
    visibility: hidden;
    width: 160px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    /* Prevents the tooltip from blocking mouse events */
}

.timeline-tooltip.tooltip-visible {
    visibility: visible;
    opacity: 1;
}

[data-theme="dark"] .timeline-tooltip {
    background-color: rgba(255, 255, 255, 0.95);
    color: #222;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}


/* Timeline Time Indicator */
.timeline-time-indicator {
    position: absolute;
    top: -10px;
    bottom: -10px;
    width: 3px;
    background-color: rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 20;
}

.timeline-time-label {
    position: absolute;
    bottom: -25px;
    /* Adjusted to be below the timeline bar */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    white-space: nowrap;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .timeline-time-indicator {
    background-color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .timeline-time-label {
    background-color: rgba(255, 255, 255, 0.95);
    color: #222;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* --- End Timeline Styles --- */

.barrier-time,
.safe-time,
.whammy-time {
    font-weight: bold;
}

.barrier-reason,
.safe-reason,
.whammy-reason {
    color: var(--text-muted-light);
}

.whammy-reason {
    font-weight: bold;
    color: var(--error-light);
}


.train-service {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.train-service:last-child {
    border-bottom: none;
}

.service-summary {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr 1fr;
    align-items: center;
    cursor: pointer;
}

.service-time {
    font-weight: bold;
    font-size: 1.1em;
}

.service-dest {
    font-size: 1.1em;
}

.service-etd {
    font-weight: bold;
}

.service-status {
    color: var(--text-light);
}

.service-status.cancelled {
    color: var(--error-light);
}

[data-theme="dark"] .service-status {
    color: var(--text-dark);
}

[data-theme="dark"] .service-status.cancelled {
    color: var(--error-dark);
}

.service-platform {
    text-align: right;
    font-style: italic;
    color: var(--text-muted-light);
}

.service-details {
    display: none;
    /* Hidden by default */
    padding: 15px;
    margin-top: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.service-details p {
    margin: 5px 0;
}

.service-details strong {
    color: var(--text-light);
}

/* Easter Egg: Banana Drop */
.banana-counter-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-light);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

[data-theme="dark"] .banana-counter-widget {
    background-color: rgba(51, 51, 51, 0.9);
    color: var(--text-dark);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.banana-drop {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 60px;
    z-index: 99999;
    transition: none;
    pointer-events: none;
}

.banana-drop.drop {
    animation: banana-fall 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes banana-fall {
    0% {
        top: -100px;
        transform: translateX(-50%) rotate(0deg);
    }

    100% {
        top: calc(100vh - 80px);
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Report Barrier Button */
.report-button-container {
    text-align: center;
    margin: 1.5rem 0;
}

.report-barrier-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6b35, #dc3545);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.report-barrier-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.report-barrier-btn:active:not(:disabled) {
    transform: translateY(0);
}

.report-barrier-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.report-barrier-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

.privacy-notice {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
    color: var(--text-muted-light);
}

[data-theme="dark"] .privacy-notice {
    color: var(--text-muted-dark);
    opacity: 0.6;
}

/* Map Modal */
.map-modal .modal-content {
    width: 95%;
    max-width: 1400px;
    height: 85vh;
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.map-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--panel-bg-light);
    border-bottom: 2px solid var(--border-light);
}

[data-theme="dark"] .map-header {
    background-color: var(--panel-bg-dark);
    border-bottom-color: var(--border-dark);
}

.map-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--text-light);
}

[data-theme="dark"] .map-header h3 {
    color: var(--text-dark);
}

.close-btn {
    font-size: 2rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted-light);
    transition: color 0.2s;
}

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

[data-theme="dark"] .close-btn {
    color: var(--text-muted-dark);
}

[data-theme="dark"] .close-btn:hover {
    color: var(--text-dark);
}

.map-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .map-filters {
    background-color: #2a2a2a;
    border-bottom-color: #444;
}

.map-filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.map-filters select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}

[data-theme="dark"] .map-filters select {
    background-color: #333;
    border-color: #555;
    color: var(--text-dark);
}

#report-count {
    font-weight: bold;
    color: var(--accent);
}

/* Split View: List + Map */
.map-split-view {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.reports-list-panel {
    width: 350px;
    max-width: 40%;
    border-right: 1px solid #ddd;
    background-color: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .reports-list-panel {
    background-color: #1a1a1a;
    border-right-color: #444;
}

.reports-list-panel h4 {
    margin: 0;
    padding: 1rem 1.5rem;
    background-color: #f4f4f4;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}

[data-theme="dark"] .reports-list-panel h4 {
    background-color: #222;
    border-bottom-color: #444;
    color: var(--text-dark);
}

#reports-list {
    flex: 1;
    overflow-y: auto;
}

.no-reports {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted-light);
    font-style: italic;
}

[data-theme="dark"] .no-reports {
    color: var(--text-muted-dark);
}

.report-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.report-list-item:hover {
    background-color: #f9f9f9;
}

.report-list-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid var(--accent);
}

[data-theme="dark"] .report-list-item {
    border-bottom-color: #333;
}

[data-theme="dark"] .report-list-item:hover {
    background-color: #2a2a2a;
}

[data-theme="dark"] .report-list-item.active {
    background-color: #1a3a4a;
}

.report-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent);
    min-width: 40px;
}

.report-details {
    flex: 1;
}

.report-time {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .report-time {
    color: var(--text-dark);
}

.report-coords {
    font-size: 0.85rem;
    color: var(--text-muted-light);
    font-family: monospace;
}

[data-theme="dark"] .report-coords {
    color: var(--text-muted-dark);
}

#map-container {
    flex: 1;
    min-height: 400px;
    position: relative;
}

/* Leaflet popup styling */
.map-info-window h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.map-info-window p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .map-modal .modal-content {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }

    .map-split-view {
        flex-direction: column;
    }

    .reports-list-panel {
        width: 100%;
        max-width: none;
        height: 40%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    [data-theme="dark"] .reports-list-panel {
        border-bottom-color: #444;
    }

    #map-container {
        height: 60%;
    }

    .map-filters {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Footer */
.page-footer {
    text-align: center;
    padding: 2rem 1rem 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted-light);
    font-size: 0.9rem;
}

[data-theme="dark"] .page-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted-dark);
}

.footer-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
}

.footer-link:hover {
    background-color: rgba(0, 173, 181, 0.1);
    color: #008a91;
}

.footer-separator {
    margin: 0 0.25rem;
    color: var(--text-muted-light);
    opacity: 0.5;
}

[data-theme="dark"] .footer-separator {
    color: var(--text-muted-dark);
}

/* Admin Feature Requests Modal Styling */
#feature-requests-view-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 90%;
    max-width: 800px;
    /* Wider for the list */
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
}

/* Feature Request Modal Styling */
#feature-request-modal .modal-content {
    max-width: 500px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 2rem;

    /* Centering */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

[data-theme="dark"] #feature-request-modal .modal-content {
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.95), rgba(30, 30, 30, 0.9));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#feature-request-modal h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: center;
}

[data-theme="dark"] #feature-request-modal h3 {
    color: var(--text-dark);
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
}

[data-theme="dark"] .form-group label {
    color: var(--text-dark);
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.1);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: #3a3a3a;
    border-color: #555;
    color: var(--text-dark);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Button Styling */
.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #008a91);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 173, 181, 0.3);
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #ccc;
}

[data-theme="dark"] .btn-secondary {
    color: var(--text-dark);
    border-color: #555;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #666;
}

/* Feature Requests Admin View */
.requests-filter {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(to bottom, rgba(249, 249, 249, 0.95), rgba(245, 245, 245, 0.95));
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requests-filter::before {
    content: '💡';
    font-size: 1.2rem;
}

[data-theme="dark"] .requests-filter {
    background: linear-gradient(to bottom, rgba(42, 42, 42, 0.95), rgba(35, 35, 35, 0.95));
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

.feature-requests-list {
    padding: 1.5rem;
    max-height: 65vh;
    overflow-y: auto;
    background-color: #fafafa;
}

[data-theme="dark"] .feature-requests-list {
    background-color: #1a1a1a;
}

.feature-request-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-request-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: var(--accent);
}

[data-theme="dark"] .feature-request-item {
    background-color: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .feature-request-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.request-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delete-request-btn,
.delete-report-btn {
    background: transparent;
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.delete-request-btn .material-symbols-outlined,
.delete-report-btn .material-symbols-outlined {
    font-size: 18px;
}

.delete-request-btn:hover,
.delete-report-btn:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.05);
}

[data-theme="dark"] .delete-request-btn,
[data-theme="dark"] .delete-report-btn {
    border-color: rgba(220, 53, 69, 0.4);
}

[data-theme="dark"] .delete-request-btn:hover,
[data-theme="dark"] .delete-report-btn:hover {
    background-color: #dc3545;
}

.request-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

[data-theme="dark"] .request-title {
    color: var(--text-dark);
}

.request-date {
    font-size: 0.8rem;
    color: var(--text-muted-light);
    white-space: nowrap;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

[data-theme="dark"] .request-date {
    color: var(--text-muted-dark);
    background-color: rgba(255, 255, 255, 0.05);
}

.request-description {
    color: var(--text-light);
    margin: 0.75rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

[data-theme="dark"] .request-description {
    color: #ddd;
}

.request-email {
    font-size: 0.9rem;
    color: var(--accent);
    background-color: rgba(0, 173, 181, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 500;
}

[data-theme="dark"] .request-email {
    background-color: rgba(0, 173, 181, 0.2);
}

.no-requests {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted-light);
    font-size: 1.1rem;
}

.no-requests::before {
    content: '📭';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .no-requests {
    color: var(--text-muted-dark);
}

/* Chat Modal Styles */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

[data-theme="dark"] .chat-messages {
    background-color: #1a1a1a;
}

.chat-message {
    animation: fadeIn 0.3s ease-in;
}

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

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

.message-content {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}

.barry-message .message-content {
    background: linear-gradient(135deg, rgba(0, 173, 181, 0.1), rgba(0, 138, 145, 0.05));
    border: 1px solid rgba(0, 173, 181, 0.2);
    color: var(--text-light);
    align-self: flex-start;
}

[data-theme="dark"] .barry-message .message-content {
    background: linear-gradient(135deg, rgba(0, 173, 181, 0.2), rgba(0, 138, 145, 0.1));
    border-color: rgba(0, 173, 181, 0.3);
    color: var(--text-dark);
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--accent), #008a91);
    color: white;
    align-self: flex-end;
}

.chat-message strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.typing-indicator .typing-dots {
    display: inline-block;
    animation: typingDots 1.4s infinite;
}

@keyframes typingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: white;
    border-top: 2px solid #e0e0e0;
}

[data-theme="dark"] .chat-input-container {
    background-color: #2a2a2a;
    border-top-color: #444;
}

#chat-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #f9f9f9;
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.1);
}

[data-theme="dark"] #chat-input {
    background-color: #333;
    border-color: #555;
    color: var(--text-dark);
}

[data-theme="dark"] #chat-input:focus {
    background-color: #3a3a3a;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.2);
}

#send-chat-btn {
    background: linear-gradient(135deg, var(--accent), #008a91);
    color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#send-chat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 173, 181, 0.3);
}

#send-chat-btn:active {
    transform: scale(0.95);
}