* {
    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: 1000px;
    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;
}

.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;
}

.section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #667eea;
}

/* 录音人输入区域 */
.recorder-input-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);
}

/* 会话头部 */
.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recorder-name {
    font-size: 1.1rem;
    color: #666;
}

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

/* 当前录音控制 */
.current-recording {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    z-index: 100;
    margin-bottom: 20px;
}

.current-text-display {
    margin-bottom: 20px;
}

.text-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.text-content {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-align: center;
    line-height: 1.6;
}

.recording-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.recording-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-top: 8px;
}

.status-text {
    font-weight: 600;
    color: #667eea;
}

.status-text.recording {
    color: #dc3545;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.duration-text {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    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;
    transform: translateY(-2px);
}

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

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

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* 文本列表 */
.texts-recording-list {
    margin-top: 30px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls label {
    font-size: 0.9rem;
    color: #666;
}

.page-size-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.page-size-select:focus {
    outline: none;
    border-color: #667eea;
}

.texts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.text-list-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.text-list-item:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.text-list-item.active {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.text-list-item.recorded {
    border-color: #28a745;
    background: #f0fff4;
}

.text-list-item.recorded:hover {
    border-color: #28a745;
}

.item-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
}

.text-list-item.recorded .item-number {
    background: #28a745;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-recorded {
    color: #28a745;
    font-weight: 600;
}

.status-pending {
    color: #999;
}

.mini-player {
    height: 30px;
    max-width: 200px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* 响应式设计 */
@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;
    }
    
    .recorder-input-form {
        flex-direction: column;
    }
    
    .name-input {
        width: 100%;
    }
    
    .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pagination-controls {
        width: 100%;
    }
    
    .page-size-select {
        flex: 1;
    }
    
    .recording-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .text-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .mini-player {
        width: 100%;
        max-width: 100%;
    }
    
    .pagination-buttons {
        gap: 5px;
    }
    
    .btn-page {
        padding: 6px 10px;
        min-width: 35px;
        font-size: 0.85rem;
    }
}

/* 分页控件 */
.pagination {
    margin-top: 20px;
}

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

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

.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;
}

/* 滚动条样式 */
.texts-list::-webkit-scrollbar {
    width: 8px;
}

.texts-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.texts-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.texts-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}
