/* ============================================
   TempShare - Premium Dark Theme for Cloudflare
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #06060b;
    --bg-secondary: #0c0c14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-input-focus: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(139, 92, 246, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #a78bfa;
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #60a5fa 100%);
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.08);
    --success-border: rgba(74, 222, 128, 0.2);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.08);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.08);
    --error-border: rgba(248, 113, 113, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    animation: glowMove 15s ease-in-out infinite alternate;
}

.bg-glow--1 {
    top: -200px;
    left: -100px;
    background: rgba(139, 92, 246, 0.08);
}

.bg-glow--2 {
    bottom: -200px;
    right: -100px;
    background: rgba(59, 130, 246, 0.06);
    animation-delay: -7s;
}

@keyframes glowMove {
    0% { transform: translate(0, 0); }
    50% { transform: translate(40px, 30px); }
    100% { transform: translate(-20px, 50px); }
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 36px;
    animation: fadeInDown 0.6s ease-out;
}

.header__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
}

.header__icon {
    width: 46px;
    height: 46px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.4); }
}

.header__title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.header__subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transition: border-color var(--transition-normal);
    animation: fadeInUp 0.6s ease-out;
}

.card:hover { border-color: var(--border-medium); }
.card + .card { margin-top: 20px; }

/* Drop Zone */
.dropzone {
    position: relative;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: transparent;
    overflow: hidden;
}

.dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-glow);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.dropzone:hover::before, .dropzone.dragover::before { opacity: 1; }

.dropzone.dragover {
    border-style: solid;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
}

.dropzone__content { position: relative; z-index: 1; }

.dropzone__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    margin-bottom: 16px;
    color: var(--accent-primary);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.dropzone__icon { stroke: var(--accent-primary); }

.dropzone__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.dropzone__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropzone__browse {
    color: var(--text-accent);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.dropzone__limit {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Settings */
.settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-group--full { grid-column: 1 / -1; }

.setting-group label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.setting-group label svg { color: var(--text-muted); }

.setting-group select, .setting-group input {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
    width: 100%;
}

.setting-group select:focus, .setting-group input:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.setting-group select option { background: #1a1a2e; color: var(--text-primary); }

/* Upload Button */
.btn-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 24px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-upload::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-upload:hover:not(:disabled)::before { opacity: 1; }

.btn-upload:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.btn-upload:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-upload span, .btn-upload .btn-icon { position: relative; z-index: 1; }

/* File Preview */
.file-preview {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 16px;
    animation: fadeIn 0.3s ease-out;
}

.file-preview.visible { display: flex; }
.file-preview__icon { font-size: 36px; flex-shrink: 0; }
.file-preview__info { flex: 1; min-width: 0; }

.file-preview__name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview__meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.file-preview__remove {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--error);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.file-preview__remove:hover { background: rgba(248, 113, 113, 0.2); }

/* Progress */
.progress-container {
    display: none;
    margin-top: 20px;
    animation: fadeIn 0.3s ease-out;
}

.progress-container.visible { display: block; }

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Result */
.result { display: none; animation: fadeInUp 0.5s ease-out; }
.result.visible { display: block; }

.result__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.result__check {
    width: 44px;
    height: 44px;
    background: var(--success-bg);
    border: 2px solid var(--success-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.result__title { font-size: 1.2rem; font-weight: 700; color: var(--success); }
.result__subtitle { font-size: 0.85rem; color: var(--text-muted); }

.url-box {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    transition: border-color var(--transition-fast);
}

.url-box:focus-within { border-color: var(--accent-primary); }

.url-box__label {
    padding: 8px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.url-box__input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    padding: 10px 0;
    outline: none;
    min-width: 0;
}

.url-box__copy {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.url-box__copy:hover { box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.url-box__copy span { position: relative; z-index: 1; }

.result__meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.result__meta-item {
    text-align: center;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.result__meta-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result__meta-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.result__actions { display: flex; gap: 10px; margin-top: 20px; }

.btn-secondary {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
    color: var(--error);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.visible { transform: translateX(-50%) translateY(0); }
.toast--success { border-color: var(--success-border); }
.toast--error { border-color: var(--error-border); }

/* Download Page */
.download-card { text-align: center; }

.download-card__icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.download-card__name {
    font-size: 1.25rem;
    font-weight: 700;
    word-break: break-all;
    margin-bottom: 8px;
}

.download-card__meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.download-card__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.download-card__preview {
    margin: 20px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.download-card__preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
}

.download-card__preview video, .download-card__preview audio {
    width: 100%;
    border-radius: var(--radius-md);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-download:hover::before { opacity: 1; }
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3); }
.btn-download span { position: relative; z-index: 1; }

.download-card__expiry {
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--warning);
}

/* Password Page */
.password-form { text-align: center; }
.password-form__icon { font-size: 64px; margin-bottom: 16px; }
.password-form__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.password-form__subtitle { color: var(--text-secondary); margin-bottom: 24px; }

.password-form__input-group {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.password-form__input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
}

.password-form__input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.password-form__error { color: var(--error); font-size: 0.85rem; margin-top: 12px; }

/* Status/Error Pages */
.status-page { text-align: center; padding: 48px 32px; }
.status-page__icon { font-size: 72px; margin-bottom: 16px; display: block; }
.status-page__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.status-page__message { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; margin-bottom: 30px; }

.status-page__link {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.status-page__link:hover { color: var(--accent-primary); }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Stats */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    padding: 16px 0;
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.stats-bar__item { text-align: center; }

.stats-bar__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-accent);
}

.stats-bar__label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 0 16px;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.8;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover { color: var(--text-accent); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 600px) {
    .container { padding: 24px 16px; }
    .card { padding: 24px 18px; border-radius: var(--radius-lg); }
    .dropzone { padding: 36px 16px; }
    .settings { grid-template-columns: 1fr; }
    .header__title { font-size: 1.6rem; }
    .result__meta { grid-template-columns: 1fr; }
    .result__actions { flex-direction: column; }
    .stats-bar { gap: 20px; }
    .url-box { flex-direction: column; align-items: stretch; }
    .url-box__label { padding: 8px 12px 0; }
    .url-box__input { padding: 8px 12px; font-size: 0.78rem; }
    .url-box__copy { margin: 4px; }
    .download-card__meta { flex-direction: column; align-items: center; gap: 8px; }
    .password-form__input-group { flex-direction: column; }
    .bg-glow { width: 300px; height: 300px; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

#fileInput { display: none; }

/* Gallery */
.gallery {
    margin-top: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.gallery__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 8px;
    border-left: 4px solid var(--accent-primary);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.gallery-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.gallery-item__icon {
    font-size: 36px;
    text-align: center;
    background: var(--bg-input);
    padding: 24px 0;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.gallery-item__thumbnail {
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background-color: var(--bg-input);
}

.gallery-item__name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    justify-content: space-between;
}

.gallery-item__protected {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 15, 25, 0.8);
    padding: 4px;
    border-radius: 50%;
    font-size: 12px;
}

.gallery-item__delete {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: all var(--transition-fast);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.gallery-item:hover .gallery-item__delete {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-item__delete:hover {
    background: #ef4444;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Premium Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(248, 113, 113, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.modal-overlay.visible .modal-card {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: var(--error-bg);
    border: 2px solid var(--error-border);
    color: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-medium);
}

.btn-danger-solid {
    flex: 1;
    padding: 12px;
    background: #dc2626;
    border: 1px solid #ef4444;
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-danger-solid:hover {
    background: #ef4444;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}
