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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.search-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn-search {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

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

/* 筛选器样式 */
.filters-container {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 2px solid #e8eaf6;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn-reset {
    padding: 8px 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.btn-reset:hover {
    background: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255,107,107,0.3);
}

.search-tips {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.search-tips strong {
    color: #667eea;
}

.results-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h2 {
    color: #333;
    font-size: 1.5em;
}

.results-count {
    color: #667eea;
    font-weight: bold;
    text-align: right;
}

.table-responsive {
    overflow-x: auto;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
}

.contacts-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contacts-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.contacts-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.contacts-table tbody tr {
    transition: all 0.3s;
}

.contacts-table tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
}

.phone-number {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1em;
    text-decoration: none;
}

.phone-number:hover {
    text-decoration: underline;
}

.extension {
    background: #e8eaf6;
    padding: 3px 10px;
    border-radius: 5px;
    color: #667eea;
    font-size: 0.9em;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
}

.badge-building {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-floor {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-department {
    background: #fff3e0;
    color: #f57c00;
}

/* 关键词高亮 */
mark {
    background: #fff59d;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results .icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 10px 15px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.pagination button.active {
    background: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.2em;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-box,
    .results-container {
        padding: 20px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .btn-reset {
        margin-left: 0;
        width: 100%;
    }
    
    .contacts-table {
        font-size: 0.9em;
    }
    
    .contacts-table th,
    .contacts-table td {
        padding: 10px;
    }
}

.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.8;
}

/* ========================================
   用户认证系统 - 样式补充文件
   ========================================
   说明：将此文件内容添加到 style.css 文件末尾
   或在 index.php 的 <head> 中添加：
   <link rel="stylesheet" href="style_auth.css">
   ======================================== */

/* 用户信息栏样式 */
.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.user-info span {
    color: #2c3e50;
    font-weight: 500;
}

.btn-logout {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    .user-info {
        position: relative;
        top: 0;
        right: 0;
        margin: 10px 0;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .header {
        position: relative;
        padding-top: 10px;
    }
}

/* 页头容器调整（为用户信息栏留出空间） */
.header {
    position: relative;
    padding-right: 200px;
}

@media (max-width: 768px) {
    .header {
        padding-right: 20px;
    }
}

/* 高亮标记样式 */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

