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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(80, 40, 180, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(40, 60, 200, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(60, 30, 140, 0.15) 0%, transparent 60%),
        linear-gradient(160deg, #05051a 0%, #0a0a30 20%, #150d45 40%, #0f0a35 60%, #080825 80%, #040415 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #ddd0f0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(160, 130, 255, 0.4), transparent),
        radial-gradient(1px 1px at 30% 60%, rgba(130, 100, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(180, 150, 255, 0.35), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(140, 110, 255, 0.3), transparent),
        radial-gradient(1px 1px at 90% 30%, rgba(160, 130, 255, 0.25), transparent);
    pointer-events: none;
    z-index: 0;
}

.page-wrap {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(12, 8, 30, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(140, 110, 255, 0.15);
    border-radius: 28px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(80, 50, 200, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: box-shadow 0.5s ease, border-color 0.4s ease, transform 0.4s ease;
}

.card:hover {
    box-shadow:
        0 28px 100px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(100, 70, 230, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border-color: rgba(140, 110, 255, 0.25);
    transform: translateY(-2px);
}

.card-sm {
    width: 100%;
    max-width: 400px;
    padding: 48px;
}

.card-md {
    width: 100%;
    max-width: 740px;
    padding: 48px 52px;
}

.card-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ede4ff 0%, #c4b0ff 50%, #a080f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 36px;
    position: relative;
}

.card-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, rgba(140, 110, 255, 0.6), transparent);
    border-radius: 2px;
    margin: 16px auto 0;
}

.card-sub {
    font-size: 18px;
    font-weight: 600;
    color: #c8b8f0;
    letter-spacing: 2px;
    margin-bottom: 22px;
    position: relative;
    padding-left: 14px;
    border-left: 3px solid rgba(140, 110, 255, 0.4);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #a090d0;
    margin-bottom: 8px;
    letter-spacing: 1.2px;
    font-weight: 600;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    border: 1px solid rgba(140, 110, 255, 0.12);
    background: rgba(8, 5, 22, 0.5);
    border-radius: 14px;
    font-size: 15px;
    color: #f0e8ff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.form-input:focus {
    border-color: rgba(140, 110, 255, 0.5);
    box-shadow:
        0 0 0 4px rgba(140, 110, 255, 0.08),
        0 0 30px rgba(100, 70, 230, 0.06);
    background: rgba(12, 8, 28, 0.6);
}

.form-input::placeholder {
    color: rgba(160, 140, 200, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a3090 0%, #6a4ac0 50%, #8060d8 100%);
    color: #fff;
    font: 600 15px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(60, 30, 140, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.btn:hover {
    background: linear-gradient(135deg, #5a3aa0 0%, #7a5ad0 50%, #9070e8 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(100, 70, 230, 0.45);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-sm {
    display: inline-block;
    padding: 9px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4a3090, #6a4ac0);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(60, 30, 140, 0.3);
}

.btn-sm:hover {
    background: linear-gradient(135deg, #5a3aa0, #7a5ad0);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 4px 18px rgba(100, 70, 230, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #602040, #903060);
    box-shadow: 0 2px 10px rgba(120, 30, 60, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #802850, #b03870);
    box-shadow: 0 4px 18px rgba(160, 40, 80, 0.35);
}

.btn-outline {
    display: inline-block;
    padding: 9px 24px;
    border-radius: 10px;
    border: 1px solid rgba(140, 110, 255, 0.2);
    color: #b0a0e0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    background: transparent;
}

.btn-outline:hover {
    border-color: rgba(140, 110, 255, 0.4);
    color: #e0d8ff;
    background: rgba(100, 70, 230, 0.08);
    transform: translateY(-1px);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(140, 110, 255, 0.1);
}

.top-bar .card-title {
    margin-bottom: 0;
}

.top-bar .card-title::after {
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-info span {
    font-size: 14px;
    color: #9080c0;
}

.upload-area {
    background: rgba(100, 70, 230, 0.04);
    border: 1px dashed rgba(140, 110, 255, 0.2);
    border-radius: 18px;
    padding: 36px;
    margin-bottom: 36px;
    text-align: center;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.upload-area:hover {
    border-color: rgba(140, 110, 255, 0.35);
    background: rgba(100, 70, 230, 0.07);
    box-shadow: 0 0 40px rgba(100, 70, 230, 0.04);
}

.upload-area .form-group {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.upload-area input[type="file"] {
    color: #ddd0f0;
    font-size: 14px;
    display: block;
    margin: 0 auto 18px;
}

.upload-area input[type="file"]::file-selector-button {
    padding: 10px 22px;
    border: 1px solid rgba(140, 110, 255, 0.18);
    border-radius: 10px;
    background: linear-gradient(135deg, #3a2080, #5a3ab0);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s;
    margin-right: 14px;
}

.upload-progress {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: rgba(8, 5, 22, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6a4ac0, #9070e8);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 13px;
    color: #9080c0;
}

.upload-result {
    margin-top: 14px;
}

.upload-result .msg-success,
.upload-result .msg-error {
    font-size: 14px;
}

.upload-area input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #4a3090, #6a4ac0);
    transform: translateY(-1px);
}

.file-list {
    list-style: none;
}

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

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-control label {
    font-size: 12px;
    color: #9080c0;
    letter-spacing: 0.5px;
}

.sort-control select {
    height: 36px;
    padding: 0 32px 0 14px;
    border: 1px solid rgba(140, 110, 255, 0.12);
    border-radius: 10px;
    background: rgba(8, 5, 22, 0.5);
    color: #ddd0f0;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239080c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.sort-control select:hover {
    border-color: rgba(140, 110, 255, 0.25);
}

.sort-control select:focus {
    border-color: rgba(140, 110, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(140, 110, 255, 0.06);
}

.sort-control select option {
    background: #120e28;
    color: #ddd0f0;
}

.file-category {
    padding: 8px 16px;
    margin: 16px 0 6px;
}

.file-category:first-of-type {
    margin-top: 0;
}

.file-category span {
    font-size: 13px;
    font-weight: 600;
    color: #b0a0e0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.file-item {
    display: flex;
    align-items: center;
    background: rgba(100, 70, 230, 0.04);
    border: 1px solid rgba(140, 110, 255, 0.08);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.file-item:hover {
    background: rgba(100, 70, 230, 0.09);
    transform: translateX(8px);
    border-color: rgba(140, 110, 255, 0.16);
}

.file-item-main {
    flex: 1;
    display: block;
    padding: 16px 22px;
    color: #b8a8f0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.file-item-main:hover {
    color: #d8c8ff;
}

.file-item .file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    padding-right: 22px;
}

.empty-msg {
    text-align: center;
    color: #605090;
    font-size: 14px;
    padding: 40px;
}

.msg-box {
    text-align: center;
}

.msg-success {
    color: #60d080;
    font-size: 16px;
    margin: 14px 0;
    line-height: 1.8;
    text-shadow: 0 0 20px rgba(80, 200, 100, 0.1);
}

.msg-error {
    color: #e06070;
    font-size: 16px;
    margin: 14px 0;
    line-height: 1.8;
    text-shadow: 0 0 20px rgba(200, 60, 80, 0.1);
}

.msg-icon {
    font-size: 52px;
    margin-bottom: 18px;
    display: block;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mt-15 {
    margin-top: 15px;
}

a {
    color: #9a8aff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #c8b8ff;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(8, 5, 22, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(140, 110, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 110, 255, 0.35);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}
