* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1f1c2c, #928dab);
    background-size: 400% 400%;
    animation: bgFlow 10s ease infinite;
    display: flex;
    justify-content: center;
    padding: 20px;
    color: #fff;
    overflow-x: hidden;
}

@keyframes bgFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-container {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(255,255,255,0.1);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
}

.shiny-text {
    font-size: 2.2rem;
    background: linear-gradient(to right, #fff, #a1c4fd, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 10px rgba(255,255,255,0.3);
    margin-bottom: 5px;
}

/* 5-Item Dashboard */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a1c4fd;
    margin-bottom: 4px;
    white-space: nowrap;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
    word-break: break-all;
}

/* 3D Custom Buttons */
.custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), inset 0 2px 2px rgba(255, 255, 255, 0.3);
    text-align: center;
    gap: 10px;
}

.custom-btn:active:not(.disabled) {
    transform: translateY(4px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.primary-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #000;
}

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

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #000;
}

.custom-btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.15);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#file-name-display {
    font-size: 0.85rem;
    opacity: 0.8;
}

#progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.15s;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: #4facfe;
    box-shadow: 0 0 10px #4facfe;
    transition: width 0.1s linear;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* File Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.file-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.15s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.file-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.file-name {
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.8rem;
    opacity: 0.7;
    display: flex;
    justify-content: space-between;
}

.loader {
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
    padding: 20px;
    font-weight: bold;
    opacity: 0.8;
}

#toast-container {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(10px);
    border-left: 4px solid #4facfe;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    animation: slideIn 0.15s ease forwards, fadeOut 0.15s ease forwards 2.3s;
    font-weight: bold;
    font-size: 0.9rem;
}

.toast.error { border-left-color: #f5576c; }
.toast.success { border-left-color: #43e97b; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

@media (max-width: 600px) {
    .glass-container { padding: 15px; border-radius: 16px; }
    .stats-section { grid-template-columns: repeat(2, 1fr); }
    .stats-section .stat-card:last-child { grid-column: span 2; }
}

