:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --success-hover: #059669;
    --bg-color: #eff6ff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
}

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

input, button, textarea, select {
    font-family: inherit;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(900px circle at 20% 15%, rgba(99, 102, 241, 0.28), transparent 60%),
        radial-gradient(900px circle at 85% 85%, rgba(34, 211, 238, 0.18), transparent 62%),
        radial-gradient(700px circle at 60% 40%, rgba(16, 185, 129, 0.12), transparent 58%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 55%, #0b1220 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

body::before {
    display: none;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-page .login-box {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        0 30px 90px rgba(2, 6, 23, 0.42),
        0 18px 40px rgba(99, 102, 241, 0.18);
    position: relative;
    overflow: hidden;
}

.login-page .login-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(34, 211, 238, 0.38), rgba(16, 185, 129, 0.32));
    filter: blur(18px);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.login-page .login-box > * {
    position: relative;
    z-index: 1;
}

.logo {
    margin-bottom: 30px;
}

.cloud-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 15px;
    display: inline-block;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-page .logo h1 {
    background: linear-gradient(90deg, #0f172a 0%, #1d4ed8 40%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: normal;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background: #f9fafb;
    font-weight: 500;
    color: var(--text-primary);
}

.login-page .input-group input {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.08);
    font-size: 1.05rem;
    padding: 18px 26px;
    letter-spacing: 0.42em;
    font-variant-numeric: tabular-nums;
}

.login-page .input-group input::placeholder {
    color: rgba(51, 65, 85, 0.65);
    letter-spacing: normal;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-page .input-group input:focus {
    border-color: rgba(99, 102, 241, 0.9);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18), 0 14px 30px rgba(2, 6, 23, 0.1);
}

.login-page .input-group input:focus-visible {
    outline: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.login-btn, .logout-btn, .select-files-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    min-height: 46px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.login-btn:hover, .logout-btn:hover, .select-files-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-page .login-btn {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #06b6d4 120%);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.login-page .login-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 55%, #0891b2 120%);
    box-shadow: 0 26px 55px rgba(37, 99, 235, 0.38);
}

.login-page .login-btn:active {
    transform: translateY(-1px) scale(0.99);
}

.login-page .login-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22), 0 26px 55px rgba(37, 99, 235, 0.38);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.error-message {
    color: var(--danger-color);
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    background: #fef2f2;
    border: 1px solid #fee2e2;
    display: none;
    font-weight: 500;
}

.login-page .error-message {
    background: rgba(254, 242, 242, 0.85);
    border-color: rgba(239, 68, 68, 0.25);
    color: #b91c1c;
    backdrop-filter: blur(8px);
}

/* App Styles */
.app-container {
    min-height: 100vh;
    padding: 20px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.app-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow:
        0 30px 90px rgba(2, 6, 23, 0.32),
        0 18px 40px rgba(99, 102, 241, 0.16);
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.7);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(34, 211, 238, 0.32), rgba(16, 185, 129, 0.24));
    filter: blur(18px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.app-header > * {
    position: relative;
    z-index: 1;
}

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

.logo-small {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-small .cloud-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
}

.logo-small h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    min-height: 46px;
    padding: 0 22px;
    font-size: 0.95rem;
    width: auto;
    box-shadow: var(--shadow-sm);
}

.logout-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}


.delete-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.delete-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.download-btn {
    background: var(--success-color);
    color: white;
    border: none;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}


.main-content {
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 900px;
}

@media (min-width: 1200px) {
    .app-header,
    .main-content {
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    .app-header,
    .main-content {
        max-width: 1400px;
    }
}

@media (min-width: 1024px) {
    .upload-section {
        width: 100%;
    }
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow:
        0 30px 90px rgba(2, 6, 23, 0.28),
        0 18px 40px rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.upload-section::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.38), rgba(34, 211, 238, 0.28), rgba(16, 185, 129, 0.22));
    filter: blur(18px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.upload-section > * {
    position: relative;
    z-index: 1;
}

.upload-area {
    border: 2px dashed rgba(37, 99, 235, 0.35);
    border-radius: var(--border-radius-md);
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(239, 246, 255, 0.5));
    backdrop-filter: blur(10px);
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 10px rgba(37, 99, 235, 0.03);
}

.upload-area:hover, .upload-area.drag-active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(219, 234, 254, 0.6));
    transform: translateY(-1px);
    box-shadow: inset 0 2px 10px rgba(37, 99, 235, 0.05), 0 8px 16px rgba(37, 99, 235, 0.08);
}

.upload-content .upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.select-files-btn {
    width: auto;
    margin: 0 auto;
}

/* Progress Bar */
.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Files Section */
.files-section {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow:
        0 30px 90px rgba(2, 6, 23, 0.28),
        0 18px 40px rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.files-section::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.36), rgba(34, 211, 238, 0.26), rgba(16, 185, 129, 0.2));
    filter: blur(18px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.files-section > * {
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 30px;
}

.section-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 0 0 auto;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 50px;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.04);
}

.view-btn {
    border: 1px solid transparent;
    background: transparent;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-btn:hover:not(.active) {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
}

.view-btn.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 
        0 8px 16px rgba(37, 99, 235, 0.12),
        0 4px 6px rgba(37, 99, 235, 0.08);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.view-btn .btn-icon {
    background: none;
    padding: 0;
    font-size: 1.2rem;
}

.refresh-btn {
    border: none;
    background: var(--primary-color);
    color: white;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 46px;
    position: relative;
}

.delete-all-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    position: relative;
}

.refresh-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.delete-all-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.refresh-btn:active {
    transform: translateY(0) scale(0.98);
}

.delete-all-btn:active {
    transform: translateY(0) scale(0.98);
}

.refresh-btn:disabled,
.delete-all-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.refresh-btn .btn-icon,
.delete-all-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    padding: 0;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.refresh-btn .btn-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.refresh-btn .btn-icon svg,
.delete-all-btn .btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.refresh-btn.is-loading .btn-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

.delete-all-btn.is-loading .btn-icon {
    animation: btnSpinner 0.75s linear infinite;
    opacity: 0.8;
}

.refresh-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.95);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-sizing: border-box;
}

.refresh-btn.is-loading::after {
    opacity: 1;
    transform: scale(1);
    animation: btnSpinner 0.75s linear infinite;
}

@keyframes btnSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Files Grid/List View */
.files-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.files-list.grid-view .file-item {
    background: rgba(255, 255, 255, 0.76);
    border-radius: var(--border-radius-md);
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.62);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 250px; /* Fixed height as requested */
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.files-list.grid-view .file-item:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 45px rgba(2, 6, 23, 0.16),
        0 10px 24px rgba(99, 102, 241, 0.12);
    border-color: var(--primary-color);
}

.files-list.grid-view .file-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

.files-list.grid-view .file-thumbnail {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(241, 245, 249, 0.95);
    border-radius: var(--border-radius-sm);
    min-height: 80px;
    border: 1px solid rgba(15, 23, 42, 0.10);
}

.files-list.grid-view .file-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.files-list.grid-view .file-icon.file-icon-terminal {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 1.35rem;
    font-weight: 700;
}

.files-list.grid-view .file-details {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.files-list.grid-view .file-details h4 {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    color: var(--text-primary);
    text-align: center;
}

.files-list.grid-view .file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.files-list.grid-view .meta-date {
    display: none !important;
}

.files-list.grid-view .meta-size {
    background: rgba(241, 245, 249, 0.75);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.files-list.grid-view .file-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    width: 100%;
    padding-top: 6px;
}

.files-list.grid-view .delete-btn,
.files-list.grid-view .download-btn {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    max-width: none;
    height: 40px;
    min-height: 40px;
    padding: 0;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    min-width: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.files-list.grid-view .btn-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* List View Styles */
.files-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.files-list.list-view .file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.78);
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.62);
    transition: all 0.2s;
    height: auto;
    backdrop-filter: blur(10px);
}

.files-list.list-view .file-item:hover {
    background: rgba(255, 255, 255, 0.86);
    border-color: var(--primary-color);
}

.files-list.list-view .file-thumbnail {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.10);
}

.files-list.list-view .file-thumbnail img,
.files-list.list-view .file-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.files-list.list-view .file-icon {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.files-list.list-view .file-icon.file-icon-terminal {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 700;
}

.file-actions .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.file-actions .btn-text {
    display: none;
}

.file-actions .btn-icon svg {
    width: 20px;
    height: 20px;
}

.files-list.list-view .file-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.files-list.list-view .file-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    flex-grow: 1;
    gap: 15px;
}

.files-list.list-view .file-details h4 {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.files-list.list-view .file-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-shrink: 0;
}

.files-list.list-view .meta-size {
    min-width: 80px;
    text-align: right;
}

.files-list.list-view .meta-date {
    min-width: 140px;
    text-align: right;
}

.files-list.list-view .file-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
    flex-shrink: 0;
}

.files-list.list-view .delete-btn,
.files-list.list-view .download-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }

    .app-header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .header-content {
        flex-direction: row;
        gap: 15px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap; /* Allow wrapping to prevent overflow */
    }
    
    .logo-small h2 {
        font-size: 1.2rem;
        white-space: nowrap; /* Prevent logo text break */
    }

    .logout-btn {
        width: auto;
    }

    .main-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .upload-section {
        position: static;
        padding: 20px;
    }

    .files-section {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }
    
    .header-controls {
        width: auto;
        justify-content: flex-end;
    }

    .files-list.grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* List view responsive adjustments */
    .files-list.list-view .file-item {
        gap: 10px;
    }

    /* Prevent overflow on small screens */
    .files-list.list-view .file-details h4 {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .files-list.list-view .meta-date {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .view-btn {
        padding: 0 10px;
    }
}

@media (max-width: 520px) {
    .files-list.grid-view {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}

/* Responsive Logout Button */
.logout-btn .btn-icon {
    display: none;
    background: transparent;
    padding: 0;
    font-size: 1.2rem;
}

@media (max-width: 480px) {
    .files-list.list-view .file-actions .btn-text {
        display: none;
    }

    .files-list.list-view .file-actions .btn-icon {
        display: flex;
        width: 100%;
        height: 100%;
    }

    .files-list.list-view .delete-btn,
    .files-list.list-view .download-btn {
        padding: 0;
        width: 46px;
        min-width: 46px;
        height: 46px;
        min-height: 46px;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        gap: 0;
        flex: 0 0 46px;
    }

    .files-list.list-view .file-actions .btn-icon svg {
        width: 20px;
        height: 20px;
    }

    .logout-btn .btn-text {
        display: none;
    }
    
    .logout-btn .btn-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
    
    .logout-btn {
        padding: 0;
        width: 46px;
        min-width: 46px;
        height: 46px;
        min-height: 46px;
        aspect-ratio: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    .logout-btn .btn-icon svg {
        width: 20px;
        height: 20px;
    }
}

.toast-container {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: min(440px, calc(100vw - 32px));
    padding: 14px 18px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 650;
    letter-spacing: -0.2px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: toastDropIn 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.toast-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.95), rgba(46, 204, 113, 0.92));
}

.toast.toast-error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.96), rgba(192, 57, 43, 0.92));
}

.toast.toast-info {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.96), rgba(53, 122, 189, 0.92));
}

.toast.toast-hide {
    animation: toastDropOut 240ms ease forwards;
}

@keyframes toastDropIn {
    0% {
        transform: translateY(-34px) scale(0.92);
        opacity: 0;
        filter: blur(6px);
    }
    55% {
        transform: translateY(8px) scale(1.02);
        opacity: 1;
        filter: blur(0);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes toastDropOut {
    to {
        transform: translateY(-18px) scale(0.97);
        opacity: 0;
        filter: blur(4px);
    }
}

.files-list.grid-view .file-item,
.files-list.list-view .file-item {
    transition:
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 200ms ease,
        filter 200ms ease,
        height 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        margin 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        padding 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        border-width 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.file-item.is-pending-delete {
    opacity: 0.7;
    filter: grayscale(0.15) saturate(0.85);
}

.file-item.is-removing {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    overflow: hidden;
}

.file-item.is-downloading {
    animation: downloadGlow 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes downloadGlow {
    0% {
        box-shadow: 0 0 0 rgba(56, 189, 248, 0);
        transform: translateY(0) scale(1);
    }
    45% {
        box-shadow: 0 20px 60px rgba(56, 189, 248, 0.22);
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 rgba(56, 189, 248, 0);
        transform: translateY(0) scale(1);
    }
}

.delete-btn,
.download-btn {
    position: relative;
}

.delete-btn:active,
.download-btn:active {
    transform: translateY(0) scale(0.98);
}

.download-btn.is-loading .btn-text,
.download-btn.is-loading .btn-icon {
    opacity: 0;
}

.download-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast.toast-hide,
    .file-item.is-downloading,
    .refresh-btn.is-loading::after {
        animation: none !important;
    }
    .files-list.grid-view .file-item,
    .files-list.list-view .file-item {
        transition: none !important;
    }
}
