/* styles.css */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --dark: #212529;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
    --text: #212529;
    --text-light: #6c757d;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --server-up: #2ecc71;
    --server-down: #e74c3c;
    --server-pending: #f39c12;
    --gradient-start: #4361ee;
    --gradient-end: #3a0ca3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Noto Sans SC', sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
    color: var(--text);
    min-height: 100vh;
    padding: 10px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 20px 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.logo i {
    margin-right: 10px;
    font-size: 2.2rem;
    color: #fff;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.subtitle {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.upload-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 50px;
    display: inline-block;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(67, 97, 238, 0.1);
}

.card-title i {
    margin-right: 12px;
    font-size: 1.6rem;
    background: rgba(67, 97, 238, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-msg {
    background: rgba(247, 37, 133, 0.15);
    border-left: 4px solid var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: var(--danger);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

/* 精简版房间操作样式 */
.room-entry {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.entry-card {
    flex: 1;
    min-width: 100%;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.entry-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.entry-icon {
    width: 60px;
    height: 60px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.8rem;
    color: var(--primary);
}

.entry-content h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--dark);
}

.entry-content p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.entry-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 8px;
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #fff;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 3px 5px rgba(67, 97, 238, 0.2);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary);
}

.btn-success {
    background: #2ecc71;
    box-shadow: 0 3px 5px rgba(46, 204, 113, 0.2);
}

.btn-warning {
    background: var(--warning);
    box-shadow: 0 3px 5px rgba(248, 150, 30, 0.2);
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 3px 5px rgba(247, 37, 133, 0.2);
}

.btn-share {
    background: #9c27b0;
    box-shadow: 0 3px 5px rgba(156, 39, 176, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.room-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    gap: 15px;
}

.room-id {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.servers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.server-item {
    flex: 1;
    min-width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.server-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.server-item.best-server {
    border: 2px solid var(--success);
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.25);
    transform: scale(1.01);
}


@media (min-width: 480px) and (max-width: 767px) {
    .server-item.best-server::after {
        content: '最佳服务器';
        position: absolute;
        top: -10px;
        right: 10px;
        background: var(--success);
        color: white;
        padding: 3px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: bold;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
}
@media (max-width: 480px) {
        .server-item.best-server::after {
        content: '最佳服务器';
        position: absolute;
        top: -10px;
        right: 10px;
        background: var(--success);
        color: white;
        padding: 3px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: bold;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
}
@media (min-width: 768px) {
    /* 修复最佳服务器标签位置 */
    .server-item.best-server::after {
        content: '最佳服务器';
        position: absolute;
        top: 8px; /* 调整到卡片内部 */
        right: 8px; /* 调整到卡片内部 */
        background: var(--success);
        color: white;
        padding: 3px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: bold;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        z-index: 10; /* 确保在内容上方 */
    }
}
.server-item h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.latency-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.95rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-pending {
    background: var(--server-pending);
    animation: pulse 1.5s infinite;
}

.status-success {
    background: var(--server-up);
}

.status-error {
    background: var(--server-down);
}

.progress-container {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s ease;
}

.latency-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.latency-stat {
    flex: 1;
    min-width: 100%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.latency-stat .value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.latency-stat div:last-child {
    font-size: 0.9rem;
    color: var(--text-light);
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.status-indicator {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.status-indicator i {
    margin-right: 12px;
    font-size: 1.6rem;
}

.status-indicator.success {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border-left: 4px solid #2ecc71;
}

.status-indicator.error {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.file-list {
    margin-bottom: 25px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 15px;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.file-icon {
    width: 50px;
    height: 50px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.file-info {
    flex: 1;
    width: 100%;
}

.file-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--dark);
    word-break: break-all;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.file-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.file-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
}

.upload-container {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border: 2px dashed var(--border);
    transition: all 0.3s;
}

.upload-container.drag-over {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

.upload-icon i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-progress {
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: none;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.progress-bar-container {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.upload-success, .upload-error {
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.upload-success i, .upload-error i {
    margin-right: 12px;
    font-size: 1.6rem;
}

.upload-success {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border-left: 4px solid #2ecc71;
}

.upload-error {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.server-status-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.7);
    font-size: 1rem;
}

.server-status-panel .status-dot {
    width: 14px;
    height: 14px;
    margin-right: 10px;
}

.server-status-panel .status-down {
    background: var(--server-down);
}

.server-status-panel .status-up {
    background: var(--server-up);
}

.debug-panel {
    background: #2c3e50;
    color: #ecf0f1;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    font-family: monospace;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    font-size: 0.85rem;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.debug-toggle {
    background: #3498db;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.debug-entry {
    margin-bottom: 6px;
    padding: 6px;
    border-bottom: 1px solid #34495e;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* 空房间样式 */
.empty-room {
    text-align: center;
    padding: 30px 20px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    margin-top: 20px;
}

.empty-room i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-room h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.empty-room p {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 100%;
}

/* 分享区域样式 */
.share-container {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #c7d2fe;
}

.share-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.share-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 销毁房间样式 */
.destroy-room-section {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.destroy-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #e11d48;
}

.destroy-icon {
    width: 45px;
    height: 45px;
    background: rgba(225, 29, 72, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem;
}

.destroy-warning {
    background: rgba(225, 29, 72, 0.1);
    border-left: 4px solid #e11d48;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #e11d48;
    font-size: 1rem;
}

.destroy-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.destroy-actions .btn {
    width: 100%;
}

/* 移动端优化 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .logo {
        font-size: 1.6rem;
    }

    .logo i {
        font-size: 1.8rem;
        width: 40px;
        height: 40px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .upload-status {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .card {
        padding: 15px;
    }

    .card-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .card-title i {
        font-size: 1.4rem;
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .room-entry {
        gap: 15px;
    }

    .entry-card {
        padding: 15px;
    }

    .entry-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    .entry-content h3 {
        font-size: 1.2rem;
    }

    .entry-content p {
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .room-header {
        gap: 10px;
    }

    .room-id {
        font-size: 1.2rem;
    }

    .latency-value {
        font-size: 1.6rem;
    }

    .server-status {
        font-size: 0.9rem;
    }

    .progress-header {
        font-size: 0.9rem;
    }

    .latency-stat .value {
        font-size: 1.4rem;
    }

    .status-indicator {
        font-size: 0.9rem;
        padding: 12px;
    }

    .status-indicator i {
        font-size: 1.4rem;
    }

    .file-name {
        font-size: 1rem;
    }

    .file-meta {
        font-size: 0.85rem;
        gap: 8px;
    }

    .upload-icon i {
        font-size: 3rem;
    }

    .progress-info {
        font-size: 0.9rem;
    }

    .server-status-panel {
        font-size: 0.9rem;
        padding: 10px;
    }

    .empty-room i {
        font-size: 3.5rem;
    }

    .empty-room h3 {
        font-size: 1.3rem;
    }

    .empty-room p {
        font-size: 0.95rem;
    }

    .share-container {
        padding: 15px;
    }

    .destroy-room-section {
        padding: 15px;
    }

    .destroy-warning {
        font-size: 0.95rem;
        padding: 12px;
    }
    
    /* 服务器检测区域在移动端横屏时的优化 */
    .servers-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .server-item {
        min-width: calc(50% - 10px);
    }
    
    .latency-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .latency-stat {
        min-width: calc(50% - 10px);
    }
    
    /* 控制按钮在移动端横屏时的优化 */
    .control-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .control-buttons .btn {
        flex: 1 0 45%;
    }
    
    /* 文件上传区域在移动端横屏时的优化 */
    .upload-container {
        padding: 15px;
    }
    
    /* 文件列表在移动端横屏时的优化 */
    .file-item {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .file-icon {
        margin-bottom: 0;
    }
    
    .file-info {
        flex: 1;
        min-width: 60%;
    }
    
    .file-actions {
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 10px;
        width: 100%;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

.copied-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    align-items: center;
    font-size: 0.95rem;
}

.copied-message i {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* 隐藏的iframe用于表单提交 */
.upload-iframe {
    display: none;
}

/* 系统说明样式修复 */
.system-info {
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 30px;
    font-size: 0.95rem;
}

.system-info ul {
    padding-left: 20px;
    line-height: 1.7;
    margin-top: 12px;
    font-size: 0.95rem;
}

.system-info li {
    margin-bottom: 8px;
}

.system-info .highlight {
    background: rgba(67, 97, 238, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.guest-badge {
    background: rgba(108, 117, 125, 0.2);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 8px;
}
/* 精简版房间操作样式 */
.room-entry {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* PC端布局：并排显示 */
@media (min-width: 768px) {
    .room-entry {
        flex-direction: row; /* 横向排列 */
        flex-wrap: wrap; /* 允许换行 */
    }
    
    .entry-card {
        min-width: calc(50% - 10px); /* 减去间隙宽度 */
        flex: 1; /* 等宽分布 */
    }
}

/* 移动端保持垂直堆叠 */
@media (max-width: 767px) {
    .room-entry {
        flex-direction: column;
    }
    
    .entry-card {
        min-width: 100%;
    }
}
/* 服务器检测区域 - 移动端垂直排列 */
.servers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* 延迟统计区域 - 移动端垂直排列 */
.latency-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}


/* 服务器检测区域 */
.servers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.server-item {
    flex: 1;
    min-width: 100%;
    /* 其他样式保持不变 */
}

/* 延迟统计区域 */
.latency-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.latency-stat {
    flex: 1;
    min-width: 100%;
    /* 其他样式保持不变 */
}

/* PC端布局调整（≥768px） */
@media (min-width: 768px) {
    /* 服务器卡片横向排列（4个一行） */
    .servers-container {
        flex-direction: row;
        flex-wrap: nowrap; /* 确保不换行 */
        overflow-x: auto; /* 允许水平滚动 */
        padding-bottom: 10px; /* 为滚动条留空间 */
    }
    
    .server-item {
        min-width: calc(25% - 12px); /* 4个卡片各占25%宽度，减去间隙 */
        flex: 0 0 auto; /* 不增长，不收缩，自动宽度 */
    }
    
    /* 延迟统计卡片横向排列（5个一行） */
    .latency-stats {
        flex-direction: row;
        flex-wrap: nowrap; /* 确保不换行 */
        overflow-x: auto; /* 允许水平滚动 */
        padding-bottom: 10px; /* 为滚动条留空间 */
    }
    
    .latency-stat {
        min-width: calc(20% - 12px); /* 5个卡片各占20%宽度，减去间隙 */
        flex: 0 0 auto; /* 不增长，不收缩，自动宽度 */
    }
    
    /* 控制按钮在PC端不换行 */
    .control-buttons {
        flex-wrap: nowrap;
    }
    
    /* 隐藏滚动条（美观考虑） */
    .servers-container::-webkit-scrollbar,
    .latency-stats::-webkit-scrollbar {
        height: 6px;
    }
    
    .servers-container::-webkit-scrollbar-thumb,
    .latency-stats::-webkit-scrollbar-thumb {
        background: rgba(67, 97, 238, 0.3);
        border-radius: 3px;
    }
}




/* 文件选择框样式 */
.file-select {
    position: relative;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.file-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #4361ee;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.file-checkbox:checked {
    background-color: #4361ee;
    border-color: #4361ee;
}

.file-checkbox:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.file-checkbox:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

/* 文件项选中状态 */
.file-item.selected {
    background: rgba(67, 97, 238, 0.08);
    border-color: rgba(67, 97, 238, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.1);
}

/* 批量操作区域样式 */
.file-list-actions {
    display: flex;
    gap: 10px;
    margin-top: -5px;
    margin-bottom: 15px;
    align-items: center;
}

#selectAllBtn {
    background: transparent;
    color: #4361ee;
    border: 2px solid #4361ee;
    padding: 6px 12px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

#selectAllBtn:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: translateY(-1px);
}

#batchDeleteBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    font-size: 0.85rem;
}

/* 队列状态指示器 */
.queue-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(241, 245, 249, 0.7);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.queue-status {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.queue-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-size {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: 10px;
}

/* 批量删除模态框 */
#batchDeleteModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#batchDeleteModal > div {
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#batchDeleteTitle {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark);
    text-align: center;
}

#batchDeleteError {
    color: #e74c3c;
    margin-top: 12px;
    font-size: 0.9rem;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.08);
    border-radius: 6px;
    display: none;
}

.batch-delete-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 分页样式调整 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 6px;
    flex-wrap: wrap;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    border: 1px solid #dee2e6;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 3px 8px rgba(67, 97, 238, 0.25);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-select {
        position: absolute;
        top: 10px;
        right: 10px;
        margin-right: 0;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .file-actions .btn {
        width: 100%;
    }
    
    .file-list-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-delete-actions {
        flex-direction: column;
    }
    
    .batch-delete-actions .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.4s ease;
}
/* 上传速度显示样式 */
.upload-speed-container {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
    gap: 10px;
}

.speed-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.speed-info i {
    color: var(--primary);
}

/* 禁用状态下的下载按钮样式 */
.download-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none !important;
}

/* 文件上传进度条下方的额外信息 */
.upload-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 进度信息容器增强 */
.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    flex-wrap: wrap;
    gap: 8px;
}

/* 文件上传区域增强 */
.upload-progress {
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: none;
    position: relative;
}

/* 上传速度数值样式 */
.speed-value {
    font-weight: bold;
    color: var(--primary);
}

/* 剩余文件大小样式 */
.remaining-size {
    font-weight: bold;
    color: var(--secondary);
}

/* 上传状态指示器 */
.upload-status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    background: rgba(67, 97, 238, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    color: var(--primary);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .upload-speed-container {
        flex-direction: column;
    }
    
    .upload-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .progress-info {
        flex-direction: column;
    }
}
/* 文件列表操作区域样式 */
.file-list-actions {
    display: flex;
    gap: 15px; /* 增加按钮间距 */
    margin-top: -5px;
    margin-bottom: 15px;
    align-items: center;
    padding: 0 10px; /* 增加左右内边距 */
}

/* 全选按钮样式 - 与批量删除按钮一致 */
#selectAllBtn {
    background: transparent;
    color: #4361ee;
    border: 2px solid #4361ee;
    padding: 8px 15px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-weight: 600;
}

#selectAllBtn:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: translateY(-2px);
}

#batchDeleteBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 文件项样式调整 */
.file-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 15px;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: relative;
}

.file-select {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 文件列表操作按钮 */
    .file-list-actions {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 5px;
    }
    
    /* 文件项在移动端布局 */
    .file-item {
        padding-top: 45px; /* 为选择框留出空间 */
    }
    
    .file-select {
        top: 10px;
        right: 10px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .file-actions .btn {
        width: 100%;
    }
    
    /* 服务器卡片布局 */
    .servers-container {
        flex-direction: column;
    }
    
    .server-item {
        min-width: 100%;
    }
    
    /* 延迟统计卡片布局 */
    .latency-stats {
        flex-direction: column;
    }
    
    .latency-stat {
        min-width: 100%;
    }
    
    /* 控制按钮布局 */
    .control-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-buttons .btn {
        width: 100%;
    }
    
    /* 文件上传区域 */
    .upload-container {
        padding: 15px;
    }
    
    /* 分享区域 */
    .share-input-group {
        flex-direction: column;
    }
}
/* 添加上传统计样式 */
.upload-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    padding: 8px;
    background: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
}

/* 文件操作按钮样式 */
.file-list-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 120px;
}

/* 全选按钮图标位置 */
#selectAllBtn i {
    margin-right: 5px;
}

/* 批量删除按钮图标位置 */
#batchDeleteBtn i {
    margin-right: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .file-list-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .file-list-actions .btn {
        width: 45%;
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}
        /* 添加分页相关样式 */
        .queue-pagination {
            display: flex;
            justify-content: center;
            margin-top: 15px;
            padding: 10px 0;
            border-top: 1px solid #eee;
        }
        
        .queue-pagination button {
            margin: 0 5px;
            padding: 5px 12px;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .queue-pagination button:hover:not(:disabled) {
            background: #e9ecef;
        }
        
        .queue-pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .queue-pagination .active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }
        
        .queue-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
        }
        
        .queue-title {
            font-weight: bold;
            color: #444;
        }
        
        .queue-info {
            font-size: 0.9em;
            color: #6c757d;
        }
        
        .queue-item {
            display: flex;
            align-items: center;
            padding: 8px 12px;
            margin-bottom: 8px;
            background: #f8f9fa;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .queue-item:hover {
            background: #e9ecef;
        }
        
        .queue-status {
            width: 24px;
            margin-right: 10px;
            text-align: center;
        }
        
        .queue-name {
            flex-grow: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.95em;
        }
        
        .queue-size {
            font-size: 0.85em;
            color: #6c757d;
            min-width: 70px;
            text-align: right;
        }
        
        .current-upload {
            background-color: #e6f7ff;
            border-left: 3px solid #1890ff;
        }
        
        /* 添加分页相关样式 */
        .queue-pagination {
            display: flex;
            justify-content: center;
            margin-top: 15px;
            padding: 10px 0;
            border-top: 1px solid #eee;
        }
        
        .queue-pagination button {
            margin: 0 5px;
            padding: 5px 12px;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .queue-pagination button:hover:not(:disabled) {
            background: #e9ecef;
        }
        
        .queue-pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .queue-pagination .active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }
        
        .queue-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
        }
        
        .queue-title {
            font-weight: bold;
            color: #444;
        }
        
        .queue-info {
            font-size: 0.9em;
            color: #6c757d;
        }
        
        .queue-item {
            display: flex;
            align-items: center;
            padding: 8px 12px;
            margin-bottom: 8px;
            background: #f8f9fa;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .queue-item:hover {
            background: #e9ecef;
        }
        
        .queue-status {
            width: 24px;
            margin-right: 10px;
            text-align: center;
        }
        
        .queue-name {
            flex-grow: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.95em;
        }
        
        .queue-size {
            font-size: 0.85em;
            color: #6c757d;
            min-width: 70px;
            text-align: right;
        }
        
        .current-upload {
            background-color: #e6f7ff;
            border-left: 3px solid #1890ff;
        }
        
        .queue-delete-btn {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            margin-left: 10px;
            padding: 2px 5px;
            border-radius: 4px;
        }
        
        .queue-delete-btn:hover {
            background: rgba(231, 76, 60, 0.1);
        }
        
        /* 移动端服务器状态检测样式 */
        @media (max-width: 767px) {
            .servers-container {
                flex-direction: column;
            }
            
            .server-item {
                min-width: 100%;
                margin-bottom: 15px;
            }
            
            .latency-stats {
                flex-direction: column;
            }
            
            .latency-stat {
                min-width: 100%;
                margin-bottom: 15px;
            }
            
            .control-buttons {
                flex-direction: column;
            }
            
            .control-buttons .btn {
                width: 100%;
                margin-bottom: 10px;
            }
            
            .file-actions {
                flex-direction: column;
            }
            
            .file-actions .btn {
                width: 100%;
                margin-bottom: 10px;
            }
        }
/* 移动端保持垂直堆叠 */
@media (max-width: 767px) {
    .room-entry {
        flex-direction: column;
    }
    
    .entry-card {
        min-width: 100%;
    }
}

/* 移动端布局调整 */
@media (max-width: 767px) {
    /* 服务器卡片横向排列 */
    .servers-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .server-item {
        min-width: calc(50% - 10px);
    }
    
    /* 延迟统计卡片横向排列 */
    .latency-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .latency-stat {
        min-width: calc(50% - 10px);
    }
    
    /* 控制按钮在移动端不换行 */
    .control-buttons {
        flex-wrap: nowrap;
    }
}