/* CSS Design System - GeoCat Explorer */
/* Dark theme, contemporary, technological, glassmorphic */

/* Variables */
:root {
    --bg-main: #0a0b10;
    --bg-panel: rgba(18, 20, 32, 0.7);
    --bg-card: rgba(30, 35, 54, 0.4);
    --text-primary: #f3f4f6;
    --text-secondary: #8f9cae;
    --text-muted: #576575;
    
    --accent-cyan: #00f0ff;
    --accent-magenta: #ff007f;
    --accent-violet: #8b5cf6;
    --accent-glow: rgba(0, 240, 255, 0.2);
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-active: rgba(0, 240, 255, 0.35);
    --border-danger: rgba(239, 68, 68, 0.3);
    
    --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --glass-blur: blur(14px);
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Container */
#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Header */
#app-header {
    height: 60px;
    background-color: #0d0e16;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.45));
    border-radius: 6px;
    transition: transform var(--transition-fast);
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-text h1 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    line-height: 1.2;
}

.subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Version Tag */
.version-tag {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.7rem;
    overflow: hidden;
}

.tag-label {
    padding: 3px 8px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.tag-value {
    padding: 3px 8px;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Workspace */
#workspace {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
    position: relative;
}

/* Sidebar */
#sidebar {
    width: 340px;
    background-color: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-light);
    box-shadow: var(--shadow-main);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
    overflow-y: auto;
}

/* Custom Scrollbar for Sidebar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}
#sidebar::-webkit-scrollbar-track {
    background: transparent;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Panel Sections */
.panel-section {
    display: flex;
    flex-direction: column;
}

.panel-section.flex-grow {
    flex-grow: 1;
}

.panel-section h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 6px;
}

/* Dropdown Selector styling */
.select-wrapper {
    position: relative;
    width: 100%;
}

#commune-select {
    width: 100%;
    background-color: rgba(13, 14, 22, 0.85);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#commune-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-glow);
}

#commune-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Custom arrow for select dropdown */
.select-wrapper::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-secondary);
    pointer-events: none;
}

/* Select label */
.select-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    margin-top: 8px;
}

/* Region select styling (inherits from commune-select via shared wrapper) */
#region-select {
    width: 100%;
    background-color: rgba(13, 14, 22, 0.85);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#region-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-glow);
}

#region-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#region-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
}

/* No communes available message */
.no-communes-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 12px 8px;
    line-height: 1.5;
    opacity: 0.7;
}

/* Loading and Alert Components */
.loader-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 240, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.alert-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid var(--border-danger);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.alert-icon {
    font-size: 0.95rem;
}

.alert-text {
    font-size: 0.82rem;
    color: #f87171;
    line-height: 1.3;
}

.hidden {
    display: none !important;
}

/* Sidebar branding context */
.sidebar-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.branding-title {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
}

.branding-subtitle {
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Commune Summary Card */
.commune-card {
    background-color: rgba(30, 41, 59, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.commune-card-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.commune-card-row:not(:last-child) {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.commune-card-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.commune-card-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.commune-card-value.highlight-text {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

/* Panel de Inteligencia Comunal */
.commune-stats-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

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

.commune-stats-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.commune-stats-section:not(:last-child) {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.commune-stats-group-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    opacity: 0.95;
    margin-bottom: 2px;
}

.commune-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.commune-metric {
    min-width: 0;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.commune-metric--wide {
    grid-column: 1 / -1;
}

.commune-stat-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commune-stat-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commune-stat-value.highlight-text {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.legend-description {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Legend Active Theme Indicator */
.legend-active-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    margin-bottom: 12px;
}

.legend-active-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-active-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.15);
}

.highlight-text {
    color: var(--accent-cyan);
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.15);
}

/* Info Panel Placeholder */
.info-content-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    border: 1px dashed var(--border-light);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
}

.placeholder-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
    opacity: 0.6;
    color: var(--accent-violet);
}

.placeholder-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Predio Selected Details Panel */
.predio-info-details {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.predio-details-header {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.predio-header-subtitle {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.predio-header-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-top: 4px;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

.predio-details-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 400;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.82rem;
    text-align: right;
}

.btn-clear-selection {
    margin-top: 12px;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--accent-cyan);
    background-color: rgba(0, 229, 255, 0.08);
    color: #ffffff;
    outline: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-clear-selection:hover {
    background-color: rgba(0, 229, 255, 0.18);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.btn-clear-selection:focus {
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.btn-clear-selection:active {
    transform: scale(0.98);
}

/* Symbology Selector Styles */
.symbology-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    padding: 2px 0;
    transition: color var(--transition-fast);
}

.radio-label:hover {
    color: var(--text-primary);
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.radio-label:hover .radio-custom {
    border-color: rgba(255, 255, 255, 0.2);
}

.radio-label input:checked + .radio-custom {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 6px var(--accent-glow);
}

.radio-custom::after {
    content: "";
    position: absolute;
    display: none;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 4px var(--accent-cyan);
}

.radio-label input:checked + .radio-custom::after {
    display: block;
}

.radio-text {
    transition: color var(--transition-fast);
}

.radio-label input:checked ~ .radio-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Legend items */
.legend-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
}

.legend-help-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-style: italic;
    line-height: 1.3;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-color-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color-box.future {
    background-color: rgba(0, 240, 255, 0.15);
    border: 1.5px dashed var(--accent-cyan);
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.1);
}

.legend-color-box.active {
    background-color: rgba(148, 163, 184, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.legend-label {
    font-size: 0.82rem;
    color: var(--text-primary);
}

/* Map Viewport */
#map-viewport {
    flex: 1;
    position: relative;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

/* Coordinates overlay */
#coords-overlay {
    position: absolute;
    bottom: 28px;
    right: 12px;
    background-color: rgba(13, 14, 22, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 4px 10px;
    z-index: 5;
    pointer-events: none;
    box-shadow: var(--shadow-main);
}

#coords-text {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Custom styles for MapLibre controls to fit dark theme */
.maplibregl-ctrl-group {
    background: rgba(13, 14, 22, 0.85) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 6px !important;
    box-shadow: var(--shadow-main) !important;
    overflow: hidden;
}

.maplibregl-ctrl-group button {
    width: 30px !important;
    height: 30px !important;
    border-bottom: 1px solid var(--border-light) !important;
}

.maplibregl-ctrl-group button:last-child {
    border-bottom: none !important;
}

.maplibregl-ctrl-group button span {
    filter: invert(1) brightness(0.9); /* Inverts icon colors to light for dark bg */
}

.maplibregl-ctrl-scale {
    background: rgba(13, 14, 22, 0.8) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-secondary) !important;
    border-top: none !important;
}

/* Hover / Focus effects */
#commune-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive layout styling */
@media (max-width: 768px) {
    #workspace {
        flex-direction: column;
    }
    
    #map-viewport {
        height: 45vh;
        min-height: 250px;
        order: 1;
        flex: none;
    }
    
    #sidebar {
        width: 100%;
        height: auto;
        order: 2;
        border-right: none;
        border-top: 1px solid var(--border-light);
        padding: 16px;
        gap: 16px;
        overflow-y: visible;
        flex: 1;
    }
    
    .status-grid {
        flex-direction: row;
        width: 100%;
    }
    
    .status-card {
        flex: 1;
    }
    
    .info-content-placeholder {
        padding: 16px;
        min-height: 100px;
    }
    
    #coords-overlay {
        bottom: 8px;
        right: 8px;
        padding: 3px 8px;
    }
}

/* Scroll and layout styling for Legend container */
#legend-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

/* Custom Scrollbar for legend list */
#legend-list::-webkit-scrollbar {
    width: 6px;
}
#legend-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}
#legend-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
#legend-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Interactive legend items styling */
.legend-item.interactive {
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    border: 1px solid transparent;
}

.legend-item.interactive:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.legend-item.interactive:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: -2px;
}

.legend-info-btn {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.legend-item.interactive:hover .legend-info-btn,
.legend-item.interactive:focus-visible .legend-info-btn {
    opacity: 1;
    color: var(--accent-cyan);
}

/* Legend footnote styling */
.legend-footnote {
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
    font-style: italic;
}

/* Modal Overlay and Content with Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 8, 14, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: rgba(18, 22, 33, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 485px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color var(--transition-fast);
}

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

.modal-close-btn:focus-visible {
    outline: 2px solid var(--accent-cyan);
    border-radius: 4px;
}

#modal-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.modal-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 18px;
}

.modal-section h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-terms-list {
    margin: 0;
    padding-left: 20px;
    max-height: 160px;
    overflow-y: auto;
}

.modal-terms-list li {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 6px;
}

/* Scrollbar for modal terms list */
.modal-terms-list::-webkit-scrollbar {
    width: 6px;
}
.modal-terms-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
.modal-terms-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

/* ==========================================================================
   Welcome Modal - Minimalist, Institutional & Dark Glassmorphism
   ========================================================================== */

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 11, 16, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.welcome-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.welcome-modal-card {
    background-color: rgba(26, 26, 36, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(0, 229, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: scale(1);
    animation: welcomeFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

.welcome-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.45));
    flex-shrink: 0;
}

.welcome-title-group h2 {
    font-size: 1.22rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
    letter-spacing: 0.3px;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #e0e0e0;
    font-size: 0.90rem;
    line-height: 1.55;
}

.welcome-intro {
    font-size: 0.92rem;
    color: #f3f4f6;
    margin: 0;
    line-height: 1.6;
}

.welcome-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-subtitle {
    font-size: 0.92rem;
    font-weight: 600;
    color: #00e5ff;
    margin: 0;
}

.welcome-block p {
    margin: 0;
    color: #e0e0e0;
}

.welcome-legal {
    background: rgba(14, 14, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid #00e5ff;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-legal-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: #d1d5db;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.welcome-legal p {
    font-size: 0.80rem;
    color: #b0b0bc;
    line-height: 1.55;
    text-align: justify;
    margin: 0;
}

.welcome-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.welcome-btn {
    background: rgba(0, 229, 255, 0.08);
    color: #00e5ff;
    border: 1.5px solid #00e5ff;
    border-radius: 6px;
    padding: 11px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    outline: none;
}

.welcome-btn:hover {
    background: #00e5ff;
    color: #0a0b10;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.45);
    transform: translateY(-1px);
}

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

.welcome-author {
    font-size: 0.7rem;
    color: #5a5a66;
    opacity: 0.65;
    letter-spacing: 0.3px;
    user-select: none;
    text-align: center;
    margin-top: 4px;
}

/* Scrollbar for modal */
.welcome-modal-card::-webkit-scrollbar {
    width: 6px;
}
.welcome-modal-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
.welcome-modal-card::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.2);
    border-radius: 3px;
}


