/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

h2 {
    margin-bottom: 20px;
    color: #0056b3;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    border-left: 4px solid #007bff;
}

/* 导航样式 */
.nav {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.nav-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

/* 响应式导航 */
@media (max-width: 768px) {
    .nav {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 2px;
        width: 100%;
        overflow-x: hidden;
    }
    
    .nav-btn {
        flex: 1;
        margin-right: 0;
        margin-bottom: 0;
        border-radius: 4px;
        text-align: center;
        font-size: 9px;
        padding: 6px 1px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    
    .nav-btn.active {
        border-radius: 4px;
    }
}

/* 小屏幕设备 */
@media (max-width: 480px) {
    .nav {
        gap: 1px;
    }
    
    .nav-btn {
        font-size: 8px;
        padding: 5px 1px;
        min-height: 30px;
    }
}

/* 管理页面样式 */
.admin-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-card h3 {
    margin-bottom: 15px;
    color: #333;
}

.admin-card p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

/* 危险按钮样式 */
.danger-btn {
    background-color: #dc3545;
}

.danger-btn:hover {
    background-color: #c82333;
}

/* 响应式管理页面 */
@media (max-width: 768px) {
    .admin-card {
        padding: 15px;
    }
    
    .admin-card h3 {
        font-size: 16px;
    }
    
    .admin-card p {
        font-size: 14px;
    }
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#file-input {
    margin-right: 10px;
    margin-bottom: 15px;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

button:hover {
    background-color: #0069d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

button:active {
    background-color: #0056b3;
    transform: translateY(0);
}

/* 响应式上传区域 */
@media (max-width: 768px) {
    .upload-section {
        padding: 15px;
    }
    
    #file-input {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .upload-buttons {
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }
    
    .upload-buttons button {
        flex: 1;
        margin-right: 0;
        margin-bottom: 0;
        padding: 12px 10px;
        font-size: 13px;
        text-align: center;
    }
    
    .upload-section {
        display: flex;
        flex-direction: column;
    }
}

/* 页面样式 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 数据容器样式 */
.data-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 卡片样式 */
.data-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.data-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.data-card.success-card {
    border-left: 4px solid #28a745;
}

.data-card.failed-card {
    border-left: 4px solid #dc3545;
}

/* 高亮卡片样式 */
.data-card.highlight-card {
    background: #f8f9ff;
    border-left: 4px solid #007bff;
}

.data-card.highlight-card .card-header {
    background: #e3f2fd;
}

.data-card.highlight-card:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* 卡片头部样式 */
.card-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-header:hover {
    background-color: #e9ecef;
}

.card-id {
    font-weight: bold;
    margin-right: 15px;
    color: #666;
    min-width: 50px;
}

.card-title {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-status {
    margin-right: 15px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.card-status:contains('成功') {
    background-color: #d4edda;
    color: #155724;
}

.card-status:contains('失败') {
    background-color: #f8d7da;
    color: #721c24;
}

.expand-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

/* 卡片内容样式 */
.card-content {
    padding: 15px 20px;
    display: none;
    border-top: 1px solid #eee;
}

.data-row {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
}

.data-row:last-child {
    border-bottom: none;
}

/* 响应式卡片 */
@media (max-width: 768px) {
    .card-header {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    
    .card-id {
        min-width: 40px;
        margin-right: 10px;
    }
    
    .card-title {
        flex: 1;
        font-size: 14px;
    }
    
    .card-status {
        margin-right: 10px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .card-content {
        padding: 12px 15px;
    }
    
    .data-row {
        font-size: 14px;
    }
}

/* 卡片操作按钮 */
.card-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 空数据消息 */
.empty-message {
    text-align: center;
    padding: 40px;
    color: #666;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 过滤按钮样式 */
.filter-section {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

/* 对话框样式 */
.dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.dialog-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dialog-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 对话框按钮样式 */
#btn-success {
    background-color: #28a745;
}

#btn-success:hover {
    background-color: #218838;
}

#btn-failed {
    background-color: #dc3545;
}

#btn-failed:hover {
    background-color: #c82333;
}

#btn-cancel {
    background-color: #6c757d;
}

#btn-cancel:hover {
    background-color: #5a6268;
}

/* 电话号码链接样式 */
.phone-link {
    color: #007bff;
    text-decoration: none;
}

.phone-link:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    /* 导航栏保持水平排列 */
    .nav {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 2px;
        width: 100%;
        overflow-x: hidden;
    }

    .nav-btn {
        flex: 1;
        margin-right: 0;
        margin-bottom: 0;
        border-radius: 4px;
        text-align: center;
        font-size: 9px;
        padding: 6px 1px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    .upload-section {
        padding: 15px;
    }

    .card-header {
        padding: 12px 15px;
    }

    .card-content {
        padding: 12px 15px;
    }

    .dialog-content {
        padding: 20px;
        width: 95%;
    }
}