* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(120, 119, 198, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(91, 157, 255, 0.14), transparent 28%),
        linear-gradient(180deg, #0b1020 0%, #111827 100%);
    color: #ecf3ff;
}

body {
    position: relative;
    overflow-x: hidden;
}

.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.25;
    pointer-events: none;
}

.orb1 {
    width: 280px;
    height: 280px;
    background: #7c3aed;
    top: 40px;
    left: 40px;
}

.orb2 {
    width: 260px;
    height: 260px;
    background: #2563eb;
    right: 30px;
    bottom: 50px;
}

.app-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 48px;
    position: relative;
    z-index: 2;
}

.login-card {
    width: min(440px, 100%);
    margin: 8vh auto 0;
    padding: 32px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.cloud-logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
    font-size: 34px;
}

.login-card h1,
.topbar h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
}

.subtitle {
    margin: 10px 0 22px;
    color: #bfd0f6;
    font-size: 14px;
}

.small-subtitle {
    margin: 6px 0 0;
}

.helper-note {
    margin-top: 14px;
    color: #9eb4de;
    font-size: 12px;
}

.alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 87, 87, 0.12);
    border: 1px solid rgba(255, 87, 87, 0.22);
    color: #ffd5d5;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 0 16px;
    background: rgba(10, 15, 30, 0.45);
    color: #fff;
    outline: none;
    font-size: 15px;
}

.login-form input::placeholder {
    color: #9eb4de;
}

.login-form button,
.download-btn,
.logout-btn {
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, #6ea8ff, #377dff);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(55, 125, 255, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.login-form button:hover,
.download-btn:hover,
.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(55, 125, 255, 0.4);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding: 22px 24px;
    border-radius: 26px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(18px);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mini-label {
    color: #a7b8db;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.count-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #dce8ff;
    font-size: 14px;
}

.logout-btn {
    padding: 0 18px;
    height: 46px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.file-card,
.empty-card {
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}

.preview {
    height: 180px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-type {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.06em;
}

.file-body {
    padding: 16px;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    min-height: 40px;
    word-break: break-word;
}

.file-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #b3c4e6;
    font-size: 12px;
    margin-bottom: 14px;
}

.download-btn {
    width: 100%;
    height: 46px;
    border-radius: 14px;
}

.empty-card {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

code {
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

@media (max-width: 700px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-card {
        padding: 24px;
        border-radius: 24px;
    }
}