body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.header-container {
    background-color: #2c3e50;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

h1 {
    margin: 0;
    color: white;
    text-align: center;
    grid-column: 2;
}

.language-selector {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    justify-self: end;
}

.language-globe {
    font-size: 32px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 1001;
}

.language-globe:hover {
    opacity: 0.8;
}

.language-globe:focus {
    outline: none;
}

.language-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1200;
    min-width: 140px;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.language-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.language-option.active {
    background-color: rgba(255, 255, 255, 0.15);
    position: relative;
}

.language-option.active::before {
    content: "✓";
    position: absolute;
    left: 10px;
    font-weight: bold;
}

/* Expand button (right side tab, shown when drawer is collapsed) */
.expand-drawer-button {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 12px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    box-shadow: -4px 0 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1050;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.expand-drawer-button.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.expand-drawer-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: -6px 0 16px rgba(102, 126, 234, 0.4);
    right: 5px;
}

.expand-icon {
    font-size: 16px;
    display: inline-block;
    transform: rotate(-90deg);
    margin-top: 8px;
}

/* Filter drawer (slides in from right) */
.filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    background-color: white;
    box-shadow: -4px 0 16px rgba(0,0,0,0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1000;
    height: 100vh;
    overflow-y: auto;
    padding-top: 70px;
}

.filter-drawer.collapsed {
    transform: translateX(100%);
}

/* Arrow toggle button on left edge of drawer */
.drawer-arrow-toggle {
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px 0 0 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -4px 0 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1001;
}

.drawer-arrow-toggle:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    left: -55px;
    box-shadow: -6px 0 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-50%) scale(1.05);
}

.drawer-arrow-toggle .arrow-icon {
    color: white;
    font-size: 24px;
    font-weight: bold;
    transition: transform 0.3s ease;
    margin-left: -5px;
}

.filter-drawer:not(.collapsed) .drawer-arrow-toggle .arrow-icon {
    transform: rotate(180deg);
}

.filter-section {
    padding: 30px;
    position: relative;
}

.filter-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    text-align: center;
}

.filter-section {
    padding: 30px;
    position: relative;
}

.filter-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    text-align: center;
}

.filters-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* 竖屏显示时（高度大于宽度）改为两列布局 */
@media (orientation: portrait) {
    .filters-container {
        grid-template-columns: 1fr 1fr; /* 两列并排 */
    }
}

/* 横屏显示时（宽度大于高度）改为两行布局 */
@media (orientation: landscape) {
    .filters-container {
        grid-template-columns: 1fr; /* 单列，变成两行 */
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    flex: 1;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin: 0;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.checkbox-group label:hover {
    background-color: #e9ecef;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

#postcodeInput {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#postcodeInput:focus {
    outline: none;
    border-color: #3498db;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-button, .secondary-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.primary-button {
    background-color: #3498db;
    color: white;
}

.primary-button:hover {
    background-color: #2980b9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.secondary-button {
    background-color: #95a5a6;
    color: white;
}

.secondary-button:hover {
    background-color: #7f8c8d;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    min-height: 20px;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

#map {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Scrollbar styling for checkbox groups */
.checkbox-group::-webkit-scrollbar {
    width: 8px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Progress Overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.progress-overlay.show {
    display: flex;
}

.progress-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 500px;
    max-width: 90%;
}

.progress-section {
    margin-bottom: 30px;
}

.progress-section:last-child {
    margin-bottom: 0;
}

.progress-label {
    color: white;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar-wrapper {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    border-radius: 20px;
    transition: width 0.3s ease;
    width: 0%;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    position: relative;
    overflow: hidden;
}

/* Animated shine effect */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .progress-container {
        min-width: auto;
        padding: 30px 20px;
    }
    
    .progress-label {
        font-size: 14px;
    }
    
    .progress-bar {
        height: 32px;
    }
    
    .progress-text {
        font-size: 14px;
    }
}
