/* === Components (cards, grid, upload UI) === */

/* Drop area */
.drop-area {
    border: 1px dashed rgba(255,255,255,.25);
    border-radius: 12px;
    padding: 28px;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.drop-area.dragover {
    border-color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.04);
    transform: scale(1.01);
}

/* Captcha container animation */
#turnstile-container {
    transition: opacity .3s ease, max-height .3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}
#turnstile-container:not(.d-none) { max-height: 200px; opacity: 1; }

/* Files grid */
.files-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 576px) { .files-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .files-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px){ .files-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* File card */
.file-card {
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card-bg);
    transform: translateY(4px);
    opacity: 0;
    will-change: transform, opacity;
}
.fade-in { animation: cardIn .35s ease forwards; }
@keyframes cardIn { to { transform: translateY(0); opacity: 1; } }

/* Preview zone */
.file-card .preview {
    position: relative;
    background: rgba(255,255,255,.04);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.file-card .preview img,
.file-card .preview video { width: 100%; height: 100%; object-fit: cover; }
.file-card .preview .icon { font-size: 40px; opacity: .6; }

/* Skeleton shimmer */
.shimmer { position: relative; }
.shimmer::after {
    content: "";
    position: absolute; inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* Card body & meta */
.file-card .body { padding: 12px 12px 6px 12px; }
.file-name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}
.file-meta {
    color: var(--muted);
    font-size: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Actions */
.file-actions {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px 12px;
    flex-wrap: wrap;
}
.file-actions .btn {
    flex: 1 1 auto;
    min-width: 110px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.file-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.2);
}

/* FAB upload (mobile) */
.fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #0d6efd;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 .5rem 1.25rem rgba(13,110,253,.35);
    z-index: 1050;
}
.fab:active { transform: translateY(1px); }

/* Uploads list */
.uploads-list {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
    background: var(--card-bg);
}
.uploads-list .upload-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,255,255,.08);
}
.uploads-list .upload-item.is-hidden { display: none; }
.uploads-list .upload-item:last-child { border-bottom: none; }
.uploads-list .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads-list .meta { font-size: 12px; color: var(--muted); }
.uploads-list .progress { height: 6px; }
