:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-main: #2d3748;
    --text-sub: #718096;
}
* { box-sizing: border-box; }
body {
    margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-gradient); min-height: 100vh;
    color: var(--text-main); display: flex; justify-content: center; align-items: center;
}
.container {
    width: 90%; max-width: 800px; background: var(--glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 24px; border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); padding: 30px; margin: 20px 0; min-height: 600px;
}
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 15px; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.menu-item.active { background: rgba(99, 102, 241, 0.1); color: var(--primary-color); padding: 8px 16px; border-radius: 12px; font-weight: 600; }
.upload-section { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); margin-bottom: 30px; }
.upload-box { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; display: block; transition: all 0.3s; }
.upload-box:hover { border-color: var(--primary-color); background: rgba(99, 102, 241, 0.02); }
.upload-box i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; }
.progress-container { height: 8px; background: #edf2f7; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress-bar { height: 100%; width: 0%; background: var(--primary-color); transition: width 0.3s ease; }
.btn-primary { background: var(--primary-color); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; width: 100%; margin-top: 15px; }
.btn-primary:disabled { background: #cbd5e0; cursor: not-allowed; }
.file-table { width: 100%; border-collapse: collapse; }
.file-table th { text-align: left; color: var(--text-sub); font-size: 0.85rem; padding: 10px; border-bottom: 1px solid #eee; }
.file-table td { padding: 12px 10px; font-size: 0.9rem; border-bottom: 1px solid #f7fafc; }
.td-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.td-date { font-size: 0.8rem; color: #a0aec0; }
.btn-icon { border: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; justify-content: center; align-items: center; }
.download-btn { background: rgba(99, 102, 241, 0.1); color: var(--primary-color); }
.download-btn:hover { background: var(--primary-color); color: white; }
.delete-btn { background: rgba(255, 71, 87, 0.1); color: #ff4757; }
.delete-btn:hover { background: #ff4757; color: white; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 9999; display: flex; justify-content: center; align-items: center; animation: fadeIn 0.3s ease; }
.modal-box { background: rgba(255, 255, 255, 0.95); width: 90%; max-width: 420px; border-radius: 20px; padding: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.8); animation: slideUp 0.3s; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.btn-text-action { background: rgba(99, 102, 241, 0.1); color: var(--primary-color); border: 1px solid rgba(99, 102, 241, 0.2); padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-text-action:hover { background: var(--primary-color); color: white; }
.btn-close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #cbd5e0; line-height: 1; }
.btn-close:hover { color: #ff4757; }
.file-info { background: #f8f9fa; padding: 12px; border-radius: 10px; font-size: 0.85rem; color: var(--text-sub); margin: 0 0 15px 0; word-break: break-all; }
.gateway-list { display: flex; flex-direction: column; gap: 8px; max-height: 350px; overflow-y: auto; padding-right: 5px; }
.gateway-link { display: flex; align-items: center; padding: 12px 16px; background: #fff; border-radius: 12px; text-decoration: none; color: var(--text-main); border: 1px solid #edf2f7; transition: all 0.2s; }
.gateway-link:hover { background: #f4f6ff; border-color: #a5b4fc; transform: translateX(3px); }
.gw-icon { margin-right: 12px; font-size: 1.2rem; }
.gw-name { flex: 1; font-weight: 500; font-size: 0.95rem; }
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; }
.toast-msg { background: rgba(45, 55, 72, 0.9); color: white; padding: 12px 24px; border-radius: 30px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-size: 0.9rem; animation: slideDown 0.3s ease; backdrop-filter: blur(4px); display: flex; align-items: center; gap: 8px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 600px) { .container { width: 100%; border-radius: 0; min-height: 100vh; border: none; padding: 20px; } .td-date { display: none; } }
