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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

/* 标题样式 */
h1 {
    color: #1a73e8;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

h3 {
    color: #424242;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
}

/* 输入区域样式 */
.input-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    font-weight: 500;
    color: #5f6368;
    min-width: 120px;
}

.input-group input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(26, 115, 232, 0.3);
}

/* 省份选择按钮样式 */
.province-btn {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    word-break: break-word;
}

.province-btn:hover {
    background-color: #1a73e8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
}

.province-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.2);
}

/* 地图容器样式 */
.map-container {
    display: flex;
    flex-direction: column;
    height: 800px; /* 固定总高度 */
    position: relative;
}

/* 地址列表样式 - 显示在地图上方 */
.address-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    height: 30%; /* 默认30%高度 */
    overflow-y: auto;
    order: 1;
}

/* 地图包装器 - 用于绝对定位全屏按钮 */
.map-wrapper {
    position: relative;
    height: 70%; /* 默认70%高度 */
    width: 100%;
    order: 2;
}

/* 地图样式 */
.map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* 全屏按钮样式 */
.fullscreen-btn {
    position: absolute;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 全屏模式样式 */
.map-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    height: 100vh;
    width: 100vw;
    background-color: #fff;
    padding: 0;
    margin: 0;
}

.map-container.fullscreen .map-wrapper {
    height: 100%;
    width: 100%;
}

.map-container.fullscreen .map {
    height: 100%;
    width: 100%;
    border-radius: 0;
    border: none;
}

.map-container.fullscreen .address-list {
    display: none;
}

/* 全屏控制按钮容器样式 */
#fullscreenControls {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#addressList {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.address-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.address-table th {
    background-color: #1a73e8;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.address-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    vertical-align: top;
}

/* 厂家名称列样式 */
.address-table td:first-child {
    color: #ff0000;
    font-weight: 500;
    width: 15%;
}

/* 厂家地址列样式 */
.address-table td:nth-child(2) {
    width: 40%;
    word-wrap: break-word;
}

/* 工程名称列样式 - 黄色背景 */
.address-table td:nth-child(3) {
    background-color: rgba(255, 255, 0, 0.2);
    border-left: 3px solid #ffcc00;
    width: 45%;
    word-wrap: break-word;
}

.address-table tbody tr {
    cursor: pointer;
    transition: background-color 0.3s;
}

.address-table tbody tr:hover {
    background-color: #f8f9fa;
}

.address-table tbody tr:last-child td {
    border-bottom: none;
}

/* 地址添加表单样式 */
.address-input-container {
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.address-input-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.address-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.address-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.address-input-row input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* 加载指示器样式 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* 响应式设计 */
@media (max-width: 992px) {
    .map-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: auto;
        min-height: 500px;
    }
    
    .map {
        height: 400px;
    }
    
    .address-list {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .input-group label {
        min-width: auto;
    }
    
    .btn {
        min-width: auto;
    }
}