/* ============================================
   NitroUpload - استایل پیشرفته نسخه 2.0
   ============================================ */

@font-face {
    font-family: 'Mikhak';
    src: url('../fonts/Mikhak-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --gradient-start: #0f0c29;
    --gradient-mid: #1a1a3e;
    --gradient-end: #24243e;
    --primary: #7c4dff;
    --primary-light: #b47cff;
    --primary-dark: #5c2bd6;
    --surface: rgba(18, 18, 28, 0.75);
    --text: #e8e8f0;
    --text-muted: #8a8aa0;
    --border: rgba(124, 77, 255, 0.2);
    --success: #00e676;
    --error: #ff4d6d;
    --glass-border: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --gradient-start: #f5f0ff;
    --gradient-mid: #e8e0ff;
    --gradient-end: #ddd0ff;
    --surface: rgba(255, 255, 255, 0.85);
    --text: #1a1a2e;
    --text-muted: #5a5a7a;
    --border: rgba(124, 77, 255, 0.3);
    --glass-border: rgba(124, 77, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Mikhak', 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(145deg, var(--gradient-start), var(--gradient-mid) 45%, var(--gradient-end));
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(124, 77, 255, 0.2);
    border-radius: 50%;
    animation: float 12s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 720px;
}

.upload-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: 36px;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5);
}

.upload-card:hover {
    border-color: var(--border);
    box-shadow: 0 30px 55px -15px rgba(124, 77, 255, 0.25);
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(145deg, #ffffff, var(--primary-light) 60%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 28px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s ease;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(124, 77, 255, 0.05);
    transform: scale(1.01);
}

.upload-zone.dragover {
    border-color: var(--success);
    background: rgba(0, 230, 118, 0.08);
    transform: scale(1.02);
}

.upload-icon-svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon-svg {
    opacity: 1;
    transform: translateY(-5px);
}

.upload-zone h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-zone .hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-preview {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(124, 77, 255, 0.1);
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#fileInput {
    display: none;
}

.info-grid {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.info-chip {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    text-align: center;
    transition: all 0.25s ease;
}

.info-chip:hover {
    border-color: var(--border);
    background: rgba(124, 77, 255, 0.05);
    transform: translateY(-2px);
}

.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
}

.submit-btn {
    width: 100%;
    background: linear-gradient(95deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 18px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 0.5rem;
    font-family: 'Mikhak', 'Inter', sans-serif;
    text-decoration: none;
    display: block;
    text-align: center;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -8px var(--primary);
}

.submit-btn:disabled {
    opacity: 0.5;
    transform: none;
    cursor: not-allowed;
}

.message {
    padding: 1rem;
    border-radius: 20px;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.message.success {
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid var(--success);
    color: var(--success);
}

.message.error {
    background: rgba(255, 77, 109, 0.12);
    border: 1px solid var(--error);
    color: var(--error);
}

.rules-section {
    margin-top: 1.8rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

.rules-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.rules-summary:hover {
    color: var(--primary-light);
}

.rules-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.75rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.rules-content p {
    margin-bottom: 0.5rem;
    padding-right: 1rem;
    border-right: 2px solid var(--primary);
}

.footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary);
}

.theme-toggle {
    position: fixed;
    top: 24px;
    left: 24px;
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 100;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: rotate(15deg);
    background: rgba(124, 77, 255, 0.2);
}

/* ============================================
   استایل صفحه موفقیت (Success Page)
   ============================================ */
.success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.result-card-static {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: 36px;
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(145deg, var(--success), #00c853);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-icon svg {
    width: 48px;
    height: 48px;
    stroke: white;
    stroke-width: 2;
}

@keyframes popIn {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.result-card-static h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
}

.preview-box {
    margin: 1.5rem auto;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.preview-box:hover {
    border-color: var(--primary);
}

.preview-image {
    width: 100%;
    display: block;
    cursor: pointer;
}

.click-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 8px;
}

.link-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 28px;
    padding: 1rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.link-container:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.2);
}

.link-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.result-link {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--primary-light);
    word-break: break-all;
    background: rgba(124, 77, 255, 0.08);
    padding: 0.9rem;
    border-radius: 18px;
    direction: ltr;
    text-align: left;
    font-weight: 500;
}

.copy-btn-special {
    background: linear-gradient(95deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 40px;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    font-family: 'Mikhak', 'Inter', sans-serif;
}

.copy-btn-special:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px var(--primary);
}

.close-result-btn {
    display: block;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
    text-decoration: none;
    text-align: center;
    font-family: 'Mikhak', 'Inter', sans-serif;
}

.close-result-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

/* ============================================
   استایل صفحه 404
   ============================================ */
.error-page .error-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: 36px;
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s ease;
}

.error-icon {
    margin-bottom: 1.5rem;
}

.error-code {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--error), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 560px) {
    body {
        padding: 16px;
    }
    .upload-card {
        padding: 1.25rem;
    }
    .header h1 {
        font-size: 2rem;
    }
    .info-grid {
        flex-direction: column;
    }
    .upload-zone {
        padding: 2rem 1rem;
    }
    .result-card-static {
        padding: 1.5rem;
    }
    .error-code {
        font-size: 3.5rem;
    }
}
/* ============================================
   نوار پیشرفت شیک
   ============================================ */
.progress-container {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideUp 0.4s ease;
}

.progress-bar-wrapper {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    height: 14px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.4);
}

.progress-percent {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-light);
    min-width: 45px;
    text-align: left;
}