/* 导航栏样式 */
.main-nav {
    background-color: #0095ff;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    /* margin: 10px; */
}

.nav-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    height: 40px;
    margin-right: 30px;
}

.nav-logo object {
    height: 100%;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 5px 0;
    position: relative;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.active-nav {
    /* box-shadow: 0 4px 8px 5px rgba(0, 0, 0, 0.3);
    /* 文字阴影（与盒子阴影风格匹配） */
    /* text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);  */
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: bold;
    position: relative;
}

.active-nav-link::after {
    width: 100% !important;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 应用容器 */
.app-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* 地图容器 */
.map-wrapper {
    width: 100%;
    padding: 20px;
}

.map-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 地图SVG样式 */
.map-area svg {
    width: 100%;
    height: auto;
    display: block;
    z-index: 1;
    position: relative;
}

/* 标点容器 */
.points-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.point {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('images/tp2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    transform: translate(-50%, -100%);
    cursor: pointer;
    pointer-events: auto;
    z-index: 5;
    transition: transform 0.3s ease;
}

.point:hover {
    transform: translate(-50%, -100%) scale(1.2);
}

.point::after {
    content: '共' attr(data-count) '名同学';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* 防止提示框触发hover */
}

.point:hover::after {
    opacity: 1;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ff5722;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff5722, #ff9800);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.classmate-count {
    position: absolute;
    right: 50px;
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f9f9f9;
    font-weight: bold;
}

/* 调整表格列宽 */
th:nth-child(1), td:nth-child(1) {
    width: 20%;
}

th:nth-child(2), td:nth-child(2) {
    width: 30%;
}

th:nth-child(3), td:nth-child(3) {
    width: 50%;
}

/* 横屏提示 */
.orientation-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ff3333;
    color: white;
    display: none;
    text-align: center;
    padding: 12px 0;
    z-index: 3000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 10s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-100%); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-100%); }
}

.orientation-warning p {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .point {
        width: 16px;
        height: 16px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    th, td {
        padding: 8px 10px;
    }
}