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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    font-size: 32px;
    color: #667eea;
}

.header-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.storage-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-icon {
    padding: 10px;
    background: #f0f0f0;
    color: #666;
    border-radius: 10px;
}

.btn-icon:hover {
    background: #e0e0e0;
    color: #333;
}

/* Breadcrumb */
.breadcrumb {
    background: white;
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.breadcrumb-item:hover {
    color: #764ba2;
}

.breadcrumb-separator {
    color: #ccc;
    font-size: 12px;
}

/* Upload Zone */
.upload-zone {
    background: white;
    border: 2px dashed #d0d0d0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.upload-subtext {
    font-size: 13px;
    color: #999;
}

/* File List */
.file-list-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th {
    background: #f8f9fa;
    padding: 14px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
}

.file-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.file-item:hover {
    background: #f8f9ff;
}

.file-item:last-child td {
    border-bottom: none;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.folder-icon {
    color: #ffc107;
    font-size: 20px;
}

.file-icon {
    color: #667eea;
    font-size: 20px;
}

.file-name {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.file-name:hover {
    color: #667eea;
}

.file-size {
    color: #999;
    font-size: 13px;
}

.file-modified {
    color: #999;
    font-size: 13px;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.download-btn:hover {
    color: #667eea;
    background: #eef0ff;
}

.delete-btn:hover {
    color: #f5576c;
    background: #ffeef0;
}

/* Empty State */
.empty-state {
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 18px;
    color: #999;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px;
    color: #ccc;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
}

.text-warning {
    color: #f5576c;
    font-size: 13px;
    margin-top: 8px;
}

/* Upload Progress */
.upload-progress {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    min-width: 300px;
}

.upload-progress.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-content {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

.progress-content i {
    color: #667eea;
}

.progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    background: white;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.toast-icon.success {
    color: #4caf50;
}

.toast-icon.error {
    color: #f5576c;
}

.toast-icon.info {
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .file-table th:nth-child(2),
    .file-table th:nth-child(3),
    .file-table td:nth-child(2),
    .file-table td:nth-child(3) {
        display: none;
    }
    
    .upload-zone {
        padding: 30px 20px;
    }
}

/* Auth Pages */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    display: flex;
    gap: 40px;
    max-width: 900px;
    width: 100%;
    align-items: center;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    flex: 1;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #999;
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #667eea;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: -4px;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.auth-footer p {
    font-size: 14px;
    color: #666;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-link:hover {
    color: #764ba2;
}

.auth-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    color: white;
}

.feature-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 600;
}

.feature-item p {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.6;
}

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 16px;
    border-right: 1px solid #eee;
    margin-right: 4px;
}

.storage-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.storage-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.storage-text {
    font-size: 12px;
    color: #999;
    text-align: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    font-size: 28px;
    color: #667eea;
}

.username {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    color: #999;
}

.logout-btn:hover {
    color: #f5576c;
    background: #ffeef0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Toast Colors */
.toast-success .toast-icon {
    color: #4caf50;
}

.toast-error .toast-icon {
    color: #f5576c;
}

.toast-info .toast-icon {
    color: #667eea;
}

/* Responsive for Auth */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .auth-card {
        max-width: 100%;
        padding: 30px 24px;
    }
    
    .auth-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        text-align: center;
    }
    
    .feature-item {
        flex: 1;
        min-width: 120px;
    }
    
    .feature-icon {
        font-size: 24px;
    }
    
    .feature-item h3 {
        font-size: 14px;
    }
    
    .feature-item p {
        font-size: 12px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 8px;
        padding-right: 0;
        border-right: none;
        margin-right: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid #eee;
        width: 100%;
    }
    
    .storage-info {
        min-width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* 错误提示样式 */
.auth-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #f5576c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-error i {
    font-size: 16px;
}
