* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    position: relative; /* 讓語言按鈕可以絕對定位 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* Stack items vertically initially */
    text-align: center;
    margin-bottom: 20px;
    color: #0066cc;
}

.logo {
    max-width: 100px; /* Adjust size as needed */
    height: auto;
    margin-bottom: 10px; /* Add space below logo */
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

header p {
    font-size: 1.2rem;
    color: #666;
}

.info-text {
    font-size: 1rem; /* Adjust size as needed */
    color: #0066cc; /* Match header color */
    margin-top: 2px; /* Add small space between lines */
    margin-bottom: 2px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-container {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1rem;
}

#map {
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.court-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.court-info h2 {
    color: #0066cc;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.court-info p {
    color: #666;
    line-height: 1.6;
}

.court-details {
    margin-top: 15px;
}

.court-details h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.court-details p {
    margin-bottom: 5px;
}

.court-details .label {
    font-weight: bold;
    display: inline-block;
    min-width: 100px;
}

/* Marker cluster customization */
.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.6);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.6);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.6);
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column; /* Keep vertical stacking on small screens */
    }

    .logo {
        max-width: 80px; /* Slightly smaller logo on mobile */
        margin-bottom: 8px;
    }

    header h1 {
        font-size: 1.8rem; /* Adjust heading size */
    }

    header p {
        font-size: 1rem; /* Adjust paragraph size */
    }

    .controls {
        flex-direction: column; /* Stack filters vertically */
        padding: 10px;
    }

    .filter-container {
        min-width: 100%;
        margin-bottom: 10px; /* Add space between filters */
    }

    select {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    #map {
        height: 350px; /* Adjust map height */
    }

    .court-info {
        padding: 15px;
    }

    .court-info h2 {
        font-size: 1.3rem;
    }

    .court-details h3 {
        font-size: 1.1rem;
    }

    .court-details .label {
        min-width: 80px; /* Adjust label width */
    }
}

/* Optional: Adjust header layout for slightly larger screens */
@media (min-width: 481px) and (max-width: 768px) {
    header {
        flex-direction: row; /* Side-by-side layout for tablets */
        justify-content: flex-start; /* Align items to the start */
        text-align: left;
    }
    .logo {
        margin-right: 15px; /* Add space between logo and text */
        margin-bottom: 0;
    }
    header h1, header p {
        margin-bottom: 0;
    }
}

/* 更新日期樣式 */
.update-date {
    font-size: 0.95rem !important;
    color: #888 !important;
    font-style: italic;
    margin-top: 5px !important;
}

/* ========== 語言切換按鈕樣式 ========== */

/* 語言切換按鈕 */
.lang-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lang-button:hover {
    background-color: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.lang-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.lang-button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* 響應式調整 - 手機版 */
@media (max-width: 768px) {
    .lang-button {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 響應式調整 - 平板版 */
@media (min-width: 481px) and (max-width: 768px) {
    .lang-button {
        top: 15px;
        right: 15px;
        padding: 7px 14px;
        font-size: 0.85rem;
    }
}