/* Import Persian Font - Optimized with font-display */
@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 100;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-Thin.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-Thin.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 200;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-UltraLight.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-UltraLight.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-Light.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-Light.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-Regular.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-Regular.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-Medium.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-Medium.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-DemiBold.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-DemiBold.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: bold;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-Bold.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-Bold.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-ExtraBold.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-ExtraBold.woff') format('woff');
}

@font-face {
    font-family: IRANYekanXFaNum;
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff2/IRANYekanXFaNum-Black.woff2') format('woff2'),
         url('../fonts/IRANYekanX/Farsi numerals/Webfonts/Woff/IRANYekanXFaNum-Black.woff') format('woff');
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IRANYekanXFaNum', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    color: #1e293b;
    position: relative;
    /* Performance optimizations */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(51, 65, 85, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 40px 40px;
    text-align: center;
    color: white;
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

/* Header Links */
.header-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'IRANYekanXFaNum', sans-serif;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-link i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.support-link-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8) 0%, rgba(59, 130, 246, 0.8) 100%) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.support-link-btn:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(59, 130, 246, 0.95) 100%) !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4) !important;
}

@media (max-width: 768px) {
    .header-main {
        gap: 12px;
    }

    .header-links {
        gap: 8px;
    }

    .header-link {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2563eb, #3b82f6, #2563eb, transparent);
    opacity: 0.8;
    z-index: 2;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    z-index: 2;
}

/* Mirror/Shine Animation Banner - Optimized */
.header-banner {
    position: absolute;
    top: 0;
    right: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.15) 35%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.15) 65%,
        rgba(255, 255, 255, 0.05) 80%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: mirror-shine 5s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
    filter: blur(1px);
    will-change: right, opacity;
    contain: layout style paint;
}

@keyframes mirror-shine {
    0% {
        right: -150%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        right: 150%;
        opacity: 1;
    }
    51% {
        opacity: 0;
    }
    100% {
        right: 150%;
        opacity: 0;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    background: rgba(255, 255, 255, 1);
}

.title {
    font-size: 2.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 30px;
}

/* Support Modal */
.support-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    padding-top: 40px;
    animation: fadeIn 0.3s ease;
}

.support-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.support-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: slideDown 0.3s ease;
    z-index: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #dc2626;
    transition: all 0.3s ease;
    z-index: 10;
}

.support-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
}

.support-modal-close i {
    font-size: 1.1rem;
}

/* Support Section */
.support-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 12px;
    padding: 30px;
    margin: 0;
    border: 2px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: fadeInDown 0.5s ease;
}

.support-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-header-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.support-section h2 i {
    font-size: 1.6rem;
    color: #2563eb;
}

.support-toggle-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 999px;
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1e3a8a;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.support-toggle-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}

.support-toggle-btn i {
    font-size: 0.9rem;
    color: #1d4ed8;
    transition: transform 0.25s ease;
}

.support-section.collapsed .support-toggle-btn i {
    transform: rotate(180deg);
}

.support-section.collapsed .support-grid {
    display: none;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.support-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: all 0.3s ease;
}

.support-item:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.2) inset;
    transform: translateY(-2px);
}

.support-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-item-title i {
    color: #2563eb;
    font-size: 1.1rem;
}

.support-item-content {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.8;
}

.support-item-content a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.support-item-content a:hover {
    color: #1e40af;
    border-bottom-color: #1e40af;
}

.support-item-content .phone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-item-content .phone-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-item-content .phone-item i {
    color: #2563eb;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .support-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .support-section h2 {
        font-size: 1.3rem;
    }

    .support-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .support-item {
        padding: 15px;
    }
}

/* Filter Section */
.filter-section {
    margin-bottom: 30px;
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 10px;
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.3), 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.search-box i {
    color: #64748b;
    font-size: 1.1rem;
    margin-left: 10px;
}

.search-box:focus-within i {
    color: #2563eb;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'IRANYekanXFaNum', sans-serif;
    font-size: 0.95rem;
    color: #1e293b;
    background: transparent;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.clear-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.clear-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border-color: rgba(255, 255, 255, 0.5);
}

.clear-btn:hover::before {
    opacity: 1;
}

.clear-btn i {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    color: #ffffff;
}

.clear-btn:hover i {
    transform: rotate(90deg) scale(1.15);
}

.clear-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 2px solid rgba(203, 213, 225, 0.6);
    border-radius: 20px;
    padding: 10px 20px;
    font-family: 'IRANYekanXFaNum', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    position: relative;
    /* Performance optimizations */
    will-change: transform;
    contain: layout style paint;
}

.filter-btn:not(.active) {
    border-color: var(--group-color, #cbd5e1);
    opacity: 0.8;
}

.filter-btn:not(.active):hover {
    opacity: 1;
    border-color: var(--group-color, rgba(148, 163, 184, 0.8));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.filter-btn i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-btn:hover i {
    transform: scale(1.1);
}

.filter-btn.active i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    border-color: rgba(148, 163, 184, 0.8);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--group-color-primary, #2563eb) 0%, var(--group-color-secondary, #1e40af) 100%) !important;
    color: #ffffff !important;
    border-color: var(--group-color-primary, #2563eb) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    opacity: 1 !important;
}

.filter-btn.active:hover {
    filter: brightness(0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.filter-btn.active i {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
    color: #ffffff !important;
}

/* Toggle Group Button */
.toggle-group-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    backdrop-filter: blur(10px);
}

.toggle-group-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.toggle-group-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.group-section.collapsed .toggle-group-btn i {
    transform: rotate(180deg);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #2563eb;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.loading p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Files List */
.files-list {
    display: block;
    gap: 30px;
}

/* Group Section */
.group-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.group-section:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    border-color: rgba(203, 213, 225, 0.8);
    transform: translateY(-1px);
}

.group-header {
    padding: 22px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.group-header i {
    font-size: 1.8rem;
    opacity: 0.95;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.25);
    padding: 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
}

.group-header:hover i {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
    background: rgba(255, 255, 255, 0.35);
}

.group-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    letter-spacing: -0.3px;
    text-shadow: none;
}

.group-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.2px;
}

.group-files {
    padding: 24px;
    display: grid;
    gap: 16px;
    background: rgba(248, 250, 252, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.file-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    /* Performance optimizations */
    will-change: transform;
    contain: layout style paint;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(203, 213, 225, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    transform: translateY(-1px);
}

.file-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-item:hover .file-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.file-content {
    flex: 1;
    min-width: 0;
}

.file-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    word-wrap: break-word;
    letter-spacing: -0.2px;
}

.file-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 10px;
}

.file-order {
    display: inline-block;
    color: #ffffff !important;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.2px;
}

.download-btn {
    flex-shrink: 0;
    color: #ffffff !important;
    border: none;
    padding: 11px 26px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'IRANYekanXFaNum', sans-serif;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.download-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}


.download-btn:active {
    transform: translateY(0);
}

.download-btn i {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Support buttons - clearer colors */
.support-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #ffffff !important;
}

.support-btn.secondary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.support-btn:hover {
    filter: brightness(1.07);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #e53e3e;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.error-message p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Footer Descriptions */
.footer-descriptions {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 12px;
    margin: 30px 0;
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: fadeInUp 0.5s ease;
}

.footer-descriptions pre {
    font-family: 'IRANYekanXFaNum', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: justify;
    direction: rtl;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 32px 40px;
    text-align: center;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    color: #475569;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
}

.footer p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.6;
}

.footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 4px;
    border-radius: 4px;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    color: #1e40af;
    background: rgba(37, 99, 235, 0.1);
}

.footer a:hover::after {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 15px;
        min-height: calc(100vh - 20px);
    }

    .header {
        padding: 28px 24px;
    }

    .header-content {
        flex-direction: column;
        gap: 18px;
    }

    .logo {
        height: 80px;
        padding: 12px;
    }

    .title {
        font-size: 1.6rem;
    }

    .main-content {
        padding: 25px 20px;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .search-box {
        padding: 10px 15px;
    }

    .clear-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
    }

    .clear-btn i {
        font-size: 1rem;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .group-section {
        margin-bottom: 30px;
        border-radius: 12px;
    }

    .group-header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .toggle-group-btn {
        width: 32px;
        height: 32px;
    }

    .group-title {
        font-size: 1.2rem;
    }

    .group-count {
        font-size: 0.85rem;
        padding: 5px 12px;
    }

    .group-files {
        padding: 20px 15px;
        gap: 15px;
    }

    .file-item {
        flex-wrap: wrap;
        padding: 15px;
        gap: 12px;
        align-items: flex-start;
    }

    .file-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        flex-shrink: 0;
    }

    .file-content {
        flex: 1;
        min-width: 0;
    }

    .file-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .file-description {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .download-btn {
        width: 100%;
        flex-basis: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.85rem;
        margin-top: 4px;
    }

    .footer {
        padding: 24px 20px;
        font-size: 0.9rem;
    }

    .footer-descriptions {
        margin: 20px 0;
        padding: 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 24px 20px;
    }

    .logo {
        height: 70px;
        padding: 10px;
    }

    .title {
        font-size: 1.4rem;
    }

    .footer {
        padding: 20px 16px;
        font-size: 0.85rem;
    }

    .group-header {
        padding: 12px 15px;
    }

    .group-title {
        font-size: 1.1rem;
    }

    .group-count {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .group-files {
        padding: 15px 10px;
        gap: 12px;
    }

    .file-item {
        padding: 12px;
        gap: 10px;
    }

    .file-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .file-title {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .file-description {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .download-btn {
        font-size: 0.8rem;
        padding: 10px 16px;
        margin-top: 4px;
    }

    .clear-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
    }

    .clear-btn i {
        font-size: 0.95rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    color: #cbd5e0;
}

.empty-state p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    color: #cbd5e0;
}

.no-results p {
    font-size: 1.2rem;
    font-weight: 500;
}

