/* ---------- Global ---------- */

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    background: #f6f7fb;
    color: #222;
}

.container {
    max-width: 900px;
    margin: 70px auto;
    padding: 0 30px;
}

.footer {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.footer-logo {
    width: 80px;
    height: auto;
    opacity: .2;
    transition: opacity .15s ease;
    user-select: none;
}

.footer-copyright {
    font-size: 11px;
    color: rgba(0,0,0,.35);
    font-family: Inter, system-ui, sans-serif;
}

/* ---------- File Page: Top ---------- */

h1 {
    font-size: 42px;
    margin-bottom: 24px;
}

.breadcrumbs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.breadcrumbs {
    color: #999;
    font-size: 15px;
}

.breadcrumbs a {
    color: #666;
    font-weight: 500;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #222;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    white-space: nowrap;
    transition: .5s;
}

.share-btn:hover {
    background: #f4f4f4;
}

@media (max-width: 480px) {

    .breadcrumbs-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .breadcrumbs {
        font-size: 12px;
    }

    .share-btn {
        width: 100%;
    }

}


/* ---------- File Page: Share Feature ---------- */

.share-note {
    padding: 24px 30px;
    max-width: 560px;
    margin: 72px auto;
    border-top: 1px solid #e8e8e8;

    color: #777;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 758px) {
    .share-note {
        font-size: 9px;
        margin: 30px;
        padding: 24px 0;
    }
}


/* ---------- File Page: Content ---------- */


.file-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.file {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    box-sizing: border-box;

    background: white;
    padding: 18px 22px;

    border-radius: 12px;
    border: 1px solid #e5e8ef;

    transition: .15s;
}

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

.file-main {
    display: flex;
    align-items: center;
    flex: 1;

    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.file-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-size {
    font-size: 0.85rem;
    color: #888;
    margin-top: 2px;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
}

.file-icon i {
    font-size: 24px;
    color: #666;
    transition: color 0.15s ease;
}

.preview-btn,
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}

.preview-btn i,
.download-btn i {
    font-size: 15px;
    color: #666;
    transition: color 0.15s ease;
    line-height: 1;
}

.preview-btn:hover i,
.download-btn:hover i {
    color: #222;
}

.preview-btn:hover,
.download-btn:hover {
    cursor: pointer;
    background: transparent;
}

@media (max-width: 758px) {
    .file-name {
        font-size: 12px;
    }
    .file-size {
        font-size: 9px!important;
    }
}

.empty-folder {
    padding: 80px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}


/* ---------- Admin Key Page ---------- */

.login-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f6f7fb;
    font-family: Inter, system-ui, sans-serif;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-sizing: border-box;
}

.login-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    color: #444;
}

.login-card h1 {
    margin: 0;
    font-size: 28px;
}

.login-card p {
    margin: 10px 0 28px;
    color: #666;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    margin: 24px 0 12px;
}

.login-input:focus {
    outline: none;
    border-color: #2563eb;
}

.login-button {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    color: #222;
    text-decoration: none;
    cursor: pointer;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    transition: .5s;
}

.login-button:hover {
    background: #f4f4f4;
}

.login-error {
    margin-bottom: 16px;
    color: #b91c1c;
    font-size: 14px;
}


/* ---------- Preview Modal ---------- */

.preview-modal{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,.8);
    z-index:9999;
    cursor:pointer;
}

.preview-modal.open{
    display:flex;
}

.preview-window{
    width:auto;
    max-width:min(1000px,95vw);
    max-height:min(90vh,900px);
    border-radius:12px;
    overflow:hidden;
    position:relative;
    background:transparent;
    cursor:default;
}

.preview-window.fill{
    width:min(1000px,95vw);
    height:min(90vh,900px);
    display:flex;
    align-items:center;
    justify-content:center;
}

.audio-preview,
.no-preview{
    text-align:center;
}

#preview-content video,
#preview-content iframe{
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius: 10px;
}

#preview-content img{
    width:100%;
    max-width:min(700px,85vw);
    max-height:min(70vh,700px);
    height:auto;
    object-fit:contain;
    display:block;
    border-radius: 10px;
}