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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* 美化的头部 */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 0.75rem;
    margin: 3px 0 0 0;
    opacity: 0.9;
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.nav-item:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-item.active {
    background: white;
    color: #667eea;
    border-color: white;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.1rem;
}

.nav-text {
    font-size: 0.9rem;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.nav-links {
    margin-top: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.main-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #667eea;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* 录音人输入区 */
.recorder-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

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

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

/* 按钮 */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #138496;
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
}

.btn-warning {
    background: #ffc107;
    color: #333;
    font-weight: 600;
}

.btn-warning:hover:not(:disabled) {
    background: #e0a800;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

/* 列表区域头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    padding: 15px;
    margin: -15px -15px 20px -15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-left {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.selection-info {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: #666;
}

.selection-info #selectionCount {
    color: #667eea;
    font-weight: 600;
}

.recorder-info strong {
    color: #667eea;
}

.page-size-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-size-control label {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}

.page-size-select {
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 80px;
    background: white;
}

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

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

/* 批量操作和分页 */
.pagination-and-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    gap: 20px;
}

.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 表格容器 */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    margin-bottom: 20px;
}

/* 表格头部控件 */
.table-header-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

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

.data-table tbody tr:hover:not(.disabled-row) {
    background: #f8f9ff;
}

.selected-row {
    background: #e7f3ff !important;
}

.disabled-row {
    background: #f5f5f5;
    opacity: 0.6;
}

.disabled-row input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.center-cell {
    text-align: center;
}

.text-cell {
    line-height: 1.6;
}

.empty-cell {
    text-align: center;
    padding: 40px !important;
    color: #999;
}

.audio-player {
    height: 32px;
    max-width: 200px;
}

.no-recording {
    color: #999;
    font-size: 0.9rem;
}

.recorder-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.recorder-badge.own {
    background: #d4edda;
    color: #155724;
}

.recorder-badge.other {
    background: #f8d7da;
    color: #721c24;
}

.time-cell {
    font-size: 0.9rem;
    color: #666;
}

.code-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #667eea;
}

/* 分页 */
.pagination {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pagination-info {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-page {
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 40px;
}

.btn-page:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.btn-page.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-page.disabled,
.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-header {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .logo-section {
        gap: 15px;
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 0.85rem;
    }
    
    .main-nav {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .nav-item {
        width: 100%;
        justify-content: center;
    }
    
    .header-subtitle p {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .recorder-form {
        flex-direction: column;
    }
    
    .name-input {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
    }
    
    .header-right .btn {
        width: 100%;
        justify-content: center;
    }
    
    .selection-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    .audio-player {
        max-width: 150px;
    }
}
