/* =====================================================
 *  Clipboard Uploader v5 - Midnight Sapphire
 *  چیدمان مرتب‌شده: هرو+سرویس داخل دراپ‌زون، بج هدر، FAB راهنما
 * =================================================== */

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

:root {
    /* پالت Midnight Sapphire */
    --bg-0:   #050a18;
    --bg-1:   #0a1428;
    --bg-2:   #0f1d3a;
    --bg-3:   #16264a;

    --cyan-1: #00d4ff;
    --cyan-2: #06b6d4;
    --cyan-3: #0891b2;
    --cyan-glow: rgba(0, 212, 255, 0.5);

    --blue-1: #3b82f6;
    --blue-2: #2563eb;

    --plat-1: #e2e8f0;
    --plat-2: #cbd5e1;
    --plat-3: #94a3b8;

    --amber:  #fbbf24;
    --amber-glow: rgba(251, 191, 36, 0.4);

    --text:       #f1f5f9;
    --text-dim:   #cbd5e1;
    --text-mute:  #94a3b8;
    --text-faint: #64748b;

    --glass:        rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.08);
    --glass-brd:    rgba(255, 255, 255, 0.12);
    --glass-brd-hi: rgba(0, 212, 255, 0.4);

    --shadow-soft:  0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-deep:  0 20px 60px -10px rgba(0, 0, 0, 0.6);

    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;

    --font: 'Vazirmatn', 'IRANSans', 'Tahoma', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
}

/* =================== پس‌زمینه =================== */
.bg-mesh {
    position: fixed; inset: 0; z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.10) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float 22s ease-in-out infinite;
}
.blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--cyan-2) 0%, transparent 70%);
    top: -200px; right: -100px;
}
.blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--blue-1) 0%, transparent 70%);
    bottom: -150px; left: -100px;
    animation-delay: -7s;
}
.blob-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--cyan-3) 0%, transparent 70%);
    top: 40%; left: 50%;
    animation-delay: -14s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -40px) scale(1.05); }
    66%      { transform: translate(-20px, 30px) scale(0.95); }
}
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

#particles {
    position: fixed; inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* =================== اپلیکیشن =================== */
.app {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 18px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =================== هدر =================== */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-soft);
}

/* دکمه‌های آیکونی هدر */
.header-btn.icon-btn {
    position: relative;
    width: 44px; height: 44px;
    border: 1px solid var(--glass-brd);
    background: var(--glass);
    border-radius: var(--r-md);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.header-btn.icon-btn:hover {
    background: var(--glass-strong);
    border-color: var(--glass-brd-hi);
    color: var(--cyan-1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}
.header-btn.icon-btn svg {
    width: 22px; height: 22px;
}
.badge-count {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    background: linear-gradient(135deg, var(--cyan-1), var(--blue-1));
    color: var(--bg-0);
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px var(--cyan-glow);
    border: 2px solid var(--bg-1);
}
.badge-count[data-count="0"] { display: none; }

/* بج وسط هدر */
.header-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.03));
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    justify-self: center;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}
.header-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.15), transparent);
    transform: translateX(-100%);
    animation: amber-sweep 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes amber-sweep {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}
.hp-icon {
    display: flex;
    color: var(--amber);
    filter: drop-shadow(0 0 6px var(--amber-glow));
    flex-shrink: 0;
}
.hp-icon svg {
    width: 18px; height: 18px;
}
.hp-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}
.hp-text strong {
    color: var(--amber);
    font-weight: 700;
}
.hp-sub {
    color: var(--text-mute);
    font-size: 12px;
}

/* سمت راست هدر: برند */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-icon {
    width: 38px; height: 38px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--cyan-1), var(--blue-1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-0);
    box-shadow: 0 0 20px var(--cyan-glow);
}
.brand-icon svg {
    width: 20px; height: 20px;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}
.brand-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--cyan-1);
    letter-spacing: 2px;
}

/* =================== محتوای وسط =================== */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    min-height: 0;
}

/* کانتینر یکپارچه: هرو + سرویس + دراپ‌زون */
.upload-stack {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: linear-gradient(180deg, rgba(15, 29, 58, 0.6) 0%, rgba(10, 20, 40, 0.7) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px dashed rgba(0, 212, 255, 0.35);
    border-radius: var(--r-xl);
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    transition: all 0.3s ease;
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.08),
        0 20px 60px -20px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.upload-stack::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--r-xl);
    padding: 2px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), transparent 30%, transparent 70%, rgba(59, 130, 246, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.upload-stack:hover::before,
.upload-stack.dragover::before {
    opacity: 1;
}
.upload-stack.dragover {
    border-color: var(--cyan-1);
    box-shadow:
        0 0 0 1px rgba(0, 212, 255, 0.2),
        0 0 60px rgba(0, 212, 255, 0.25),
        0 20px 60px -20px rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}
.upload-stack.paste-active {
    animation: pulse-paste 0.5s ease-out;
}
@keyframes pulse-paste {
    0%   { box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.2), 0 0 0 rgba(0, 212, 255, 0.5); }
    50%  { box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.6), 0 0 80px rgba(0, 212, 255, 0.6); }
    100% { box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.08), 0 20px 60px -20px rgba(0, 0, 0, 0.7); }
}

/* هرو داخل کانتینر */
.hero-inline {
    text-align: center;
    width: 100%;
}
.hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}
.gradient-text {
    background: linear-gradient(135deg, var(--cyan-1) 0%, var(--blue-1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.arrow {
    color: var(--cyan-1);
    opacity: 0.7;
    font-size: 18px;
}
.kbd-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan-1);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: var(--r-sm);
    box-shadow: 0 2px 0 rgba(0, 212, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}
.plus {
    color: var(--text-mute);
    font-weight: 700;
}
.hero-subtitle {
    margin-top: 8px;
    color: var(--text-mute);
    font-size: 13px;
}

/* =================== انتخاب سرویس =================== */
.service-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
.service-chip {
    position: relative;
    cursor: pointer;
    display: block;
}
.service-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.chip-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-md);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.chip-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(59, 130, 246, 0.10));
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.service-chip:hover .chip-content {
    border-color: rgba(0, 212, 255, 0.3);
}
.service-chip.active .chip-glow {
    opacity: 1;
}
.service-chip.active .chip-content {
    border-color: var(--cyan-1);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.25), inset 0 0 0 1px rgba(0, 212, 255, 0.2);
}
.chip-radio {
    width: 18px; height: 18px;
    border: 2px solid var(--text-faint);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}
.service-chip.active .chip-radio {
    border-color: var(--cyan-1);
}
.service-chip.active .chip-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--cyan-1);
    box-shadow: 0 0 8px var(--cyan-glow);
}
.chip-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.chip-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    font-family: 'Courier New', monospace;
}
.service-chip.active .chip-name {
    color: var(--cyan-1);
}
.chip-note {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 2px;
}
.service-chip.active .chip-note {
    color: var(--text-dim);
}
.chip-icon {
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mute);
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.chip-icon svg {
    width: 16px; height: 16px;
}
.service-chip.active .chip-icon {
    background: rgba(0, 212, 255, 0.12);
    color: var(--cyan-1);
}

/* =================== جداکننده =================== */
.stack-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 360px;
}
.sd-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-brd), transparent);
}
.sd-or {
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* =================== ناحیه دراپ‌زون =================== */
.dropzone-area {
    position: relative;
    width: 100%;
    padding: 32px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.dropzone-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.4;
}
.ring {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 50%;
}
.ring-1 { width: 220px; height: 220px; }
.ring-2 { width: 280px; height: 280px; border-color: rgba(0, 212, 255, 0.08); }
.ring-3 { width: 340px; height: 340px; border-color: rgba(0, 212, 255, 0.04); }

.dropzone-icon {
    width: 64px; height: 64px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-1);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
    position: relative;
    z-index: 1;
}
.dropzone-icon svg {
    width: 32px; height: 32px;
}
.dropzone-text {
    text-align: center;
    z-index: 1;
}
.dropzone-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.dropzone-text h3 kbd {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
}
.dropzone-text p {
    margin-top: 4px;
    color: var(--text-mute);
    font-size: 12px;
}

/* دکمه انتخاب فایل */
.file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--cyan-1), var(--blue-1));
    color: var(--bg-0);
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    z-index: 1;
    position: relative;
}
.file-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.6);
}
.file-btn svg {
    width: 16px; height: 16px;
}

/* موج paste */
.paste-ripple {
    position: absolute;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--cyan-1);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
}
.paste-ripple.active {
    animation: ripple 0.8s ease-out;
}
@keyframes ripple {
    0%   { opacity: 0.6; width: 20px; height: 20px; }
    100% { opacity: 0;   width: 600px; height: 600px; }
}

/* =================== Overlay آپلود =================== */
.upload-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 24, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}
.upload-overlay.hidden {
    display: none;
}
.upload-overlay.show {
    opacity: 1;
}
.overlay-card {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--glass-brd-hi);
    border-radius: var(--r-lg);
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-deep), 0 0 60px rgba(0, 212, 255, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.upload-overlay.show .overlay-card {
    transform: scale(1);
}
.overlay-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.spinner {
    width: 48px; height: 48px;
    border: 3px solid rgba(0, 212, 255, 0.15);
    border-top-color: var(--cyan-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.overlay-name {
    text-align: center;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 12px;
    word-break: break-all;
}
.overlay-progress {
    height: 6px;
    background: var(--glass);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan-1), var(--blue-1));
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--cyan-glow);
}
.overlay-status {
    text-align: center;
    font-size: 13px;
    color: var(--text-mute);
}
.overlay-status.success { color: var(--success); }
.overlay-status.error   { color: var(--danger); }

/* =================== کارت نتیجه =================== */
.result-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.result-thumb {
    width: 80px; height: 80px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    flex-shrink: 0;
}
.result-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.result-info {
    flex: 1;
    min-width: 0;
}
.result-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    word-break: break-all;
}
.result-retention {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-mute);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.rr-icon { color: var(--amber); }
.rr-num { color: var(--amber); font-weight: 700; }
.rr-bar {
    flex: 1;
    min-width: 60px;
    height: 3px;
    background: var(--glass);
    border-radius: 2px;
    overflow: hidden;
}
.rr-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--amber), rgba(251, 191, 36, 0.3));
    border-radius: 2px;
    animation: retention-shrink 604800s linear; /* 7 days */
}
@keyframes retention-shrink {
    to { width: 0%; }
}
.result-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-sm);
    padding: 6px 8px;
    font-size: 11px;
}
.link-row a {
    flex: 1;
    color: var(--cyan-1);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    direction: ltr;
}
.link-row a:hover { text-decoration: underline; }
.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.badge.tmpfile { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge.filebin { background: rgba(0, 212, 255, 0.15); color: var(--cyan-1); }
.copy-btn {
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    color: var(--text-dim);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.copy-btn:hover {
    background: var(--cyan-1);
    color: var(--bg-0);
    border-color: var(--cyan-1);
}
.copy-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}
.result-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}
.delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: var(--r-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.delete-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}
.delete-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}
.delete-btn.deleted {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}
.delete-btn svg {
    width: 12px; height: 12px;
}
.result-close {
    width: 28px; height: 28px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    color: var(--text-mute);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}
.result-close:hover {
    background: var(--glass-strong);
    color: var(--text);
}

/* =================== دکمه شناور راهنما =================== */
.fab-help {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-1), var(--blue-1));
    border: none;
    color: var(--bg-0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4), 0 0 0 1px rgba(0, 212, 255, 0.2);
    z-index: 50;
    transition: all 0.3s ease;
}
.fab-help:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.6), 0 0 0 1px rgba(0, 212, 255, 0.3);
}
.fab-help svg {
    width: 24px; height: 24px;
}
.fab-help::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.4);
    animation: fab-pulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes fab-pulse {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* =================== پنل تاریخچه =================== */
.history-drawer {
    position: fixed;
    top: 0; right: -360px;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border-left: 1px solid var(--glass-brd);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.history-drawer.open {
    right: 0;
}
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--glass-brd);
}
.drawer-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.drawer-close {
    width: 32px; height: 32px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    color: var(--text-mute);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.drawer-close:hover {
    background: var(--glass-strong);
    color: var(--text);
}
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.drawer-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--glass-brd);
}
.clear-btn {
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 199;
}
.drawer-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-faint);
}
.empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.history-item {
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-md);
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
.history-item:hover {
    border-color: var(--glass-brd-hi);
}
.history-item.deleted {
    opacity: 0.5;
}
.h-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: right;
}
.h-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-mute);
    margin-bottom: 8px;
}
.h-link {
    color: var(--cyan-1);
    text-decoration: none;
}
.h-link:hover { text-decoration: underline; }
.h-actions {
    display: flex;
    gap: 6px;
}
.h-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    color: var(--text-dim);
    border-radius: var(--r-sm);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.h-action svg {
    width: 12px; height: 12px;
}
.h-action:hover {
    background: var(--glass-strong);
}
.h-action.delete {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}
.h-action.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

/* =================== Toast =================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 29, 58, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-md);
    padding: 12px 20px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-deep);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}
.toast.error {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

/* =================== مدال راهنما =================== */
.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 24, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}
.help-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.help-modal {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--glass-brd-hi);
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-deep), 0 0 80px rgba(0, 212, 255, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.help-overlay.show .help-modal {
    transform: scale(1);
}
.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--glass-brd);
}
.help-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.help-icon {
    font-size: 22px;
}
.help-title h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.help-close {
    width: 32px; height: 32px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    color: var(--text-mute);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: all 0.2s ease;
}
.help-close:hover {
    background: var(--glass-strong);
    color: var(--text);
}
.help-body {
    padding: 20px;
    overflow-y: auto;
}
.help-section {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-md);
}
.help-section.highlight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(59, 130, 246, 0.03));
    border-color: rgba(0, 212, 255, 0.25);
}
.help-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan-1);
    margin-bottom: 10px;
}
.help-section p {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 8px;
    line-height: 1.7;
}
.help-section ul, .help-section ol {
    padding-right: 20px;
    margin-bottom: 8px;
}
.help-section li {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    line-height: 1.7;
}
.help-section strong {
    color: var(--text);
    font-weight: 700;
}
.help-section code {
    background: rgba(0, 212, 255, 0.1);
    color: var(--cyan-1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}
.help-section kbd {
    min-width: 24px;
    height: 24px;
    font-size: 11px;
    padding: 0 6px;
}
.help-note {
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
}
.service-card {
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.sc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.sc-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}
.sc-badge.tmpfile { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.sc-badge.filebin { background: rgba(0, 212, 255, 0.15); color: var(--cyan-1); }
.sc-meta {
    font-size: 11px;
    color: var(--text-mute);
}
.service-card p {
    font-size: 12px;
    color: var(--text-mute);
    margin: 0;
}
.file-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}
.ft-chip {
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-dim);
}

/* =================== Responsive =================== */
@media (max-width: 720px) {
    .app { padding: 12px; }
    .header {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        padding: 8px 10px;
    }
    .header-pill {
        padding: 6px 10px;
        font-size: 11px;
    }
    .hp-sub { display: none; }
    .brand-text { display: none; }
    .upload-stack {
        padding: 20px 16px 18px;
        gap: 16px;
    }
    .hero-title {
        font-size: 17px;
        gap: 6px;
    }
    .service-selector {
        grid-template-columns: 1fr;
    }
    .dropzone-area {
        padding: 24px 12px 16px;
    }
    .fab-help {
        bottom: 16px;
        right: 16px;
        width: 48px; height: 48px;
    }
    .fab-help svg {
        width: 22px; height: 22px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 15px;
    }
    .hero-subtitle {
        font-size: 12px;
    }
    .dropzone-icon {
        width: 56px; height: 56px;
    }
    .dropzone-icon svg {
        width: 28px; height: 28px;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb {
    background: var(--glass-brd);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-3);
}
