/* ============================================
   基础样式
============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    color: #fff;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    background: url('assets/aurora.webp') no-repeat center center fixed;
    background-size: cover;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   登录界面
============================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background: rgba(15, 18, 30, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(64, 72, 104, 0.5);
    border-radius: 24px;
    padding: 40px 50px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-card h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 8px;
    color: #00a8ff;
}

.login-subtitle {
    text-align: center;
    color: #808090;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-error {
    background: rgba(220, 53, 69, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #fff;
    font-size: 14px;
}

.login-field {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.login-field:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00a8ff;
}

.login-field i {
    color: #808090;
    font-size: 16px;
}

.login-field input {
    background: transparent;
    border: none;
    padding: 14px 12px;
    color: #fff;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.login-field input::placeholder {
    color: #606070;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #00a8ff;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #0078d4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 255, 0.3);
}

.login-btn i {
    margin-right: 8px;
}

/* ============================================
   主界面
============================================ */
.filemanager-header {
    background: rgba(15, 18, 30, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(64, 72, 104, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filemanager-header h1 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    background: rgba(0, 168, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #00a8ff;
}

/* ============================================
   面板
============================================ */
.panel {
    padding: 15px 20px;
    border-radius: 16px;
    margin: 10px 0;
}

.error-panel {
    background: rgba(220, 53, 69, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.success-panel {
    background: rgba(40, 167, 69, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.path-display {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 18px;
    margin: 15px 0;
    border-radius: 12px;
    font-size: 14px;
}

.toolbar {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   按钮
============================================ */
.asp-button,
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: rgba(0, 120, 212, 0.8);
    color: white;
}
.btn-primary:hover {
    background: rgba(0, 90, 158, 0.9);
    transform: translateY(-2px);
}

.btn-success {
    background: rgba(40, 167, 69, 0.8);
    color: white;
}
.btn-success:hover {
    background: rgba(30, 126, 52, 0.9);
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(255, 193, 7, 0.8);
    color: #212529;
}
.btn-warning:hover {
    background: rgba(224, 168, 0, 0.9);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(220, 53, 69, 0.8);
    color: white;
}
.btn-danger:hover {
    background: rgba(200, 35, 51, 0.9);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.8);
    color: white;
}
.btn-secondary:hover {
    background: rgba(84, 91, 98, 0.9);
    transform: translateY(-2px);
}

/* ============================================
   搜索
============================================ */
.search-container {
    position: relative;
    display: inline-block;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.search-container input {
    padding-left: 35px;
    width: 220px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 8px 14px 8px 35px;
    color: white;
    font-size: 13px;
    outline: none;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.search-container input:focus {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   文件列表
============================================ */
.file-list-container {
    margin-top: 15px;
}

.stats-bar {
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 8px 15px;
    display: inline-block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    margin-top: 10px;
}

.file-table th {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-table td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.file-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-table .file-icon {
    margin-right: 8px;
}

.file-table .folder-link,
.file-table .file-link,
.file-table .preview-link {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.file-table .folder-link:hover,
.file-table .file-link:hover,
.file-table .preview-link:hover {
    color: #fff;
    text-decoration: underline;
}

.action-btn {
    padding: 4px 10px;
    font-size: 11px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ============================================
   弹窗
============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-card {
    background: rgba(15, 18, 30, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(64, 72, 104, 0.5);
    border-radius: 24px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(64, 72, 104, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(220, 53, 69, 0.8);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.modal-body {
    padding: 24px;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(64, 72, 104, 0.4);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   右键菜单
============================================ */
.context-menu {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.context-menu-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.context-menu-item {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

/* ============================================
   空状态
============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.empty-state i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 15px;
}
.empty-state h3 {
    color: rgba(255, 255, 255, 0.9);
}
.empty-state p {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   响应式
============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .login-card {
        padding: 30px 25px;
        margin: 20px;
    }
    .filemanager-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .toolbar {
        flex-direction: column;
    }
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        flex-wrap: wrap;
    }
    .search-container input {
        width: 100%;
    }
    .file-table {
        font-size: 12px;
    }
    .file-table th:nth-child(3),
    .file-table td:nth-child(3),
    .file-table th:nth-child(4),
    .file-table td:nth-child(4) {
        display: none;
    }
}

/* ============================================
   滚动条
============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   表单控件
============================================ */
.form-control {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}