/* استایل‌های کلی پروژه */
body {
    font-family: 'Vazirmatn', sans-serif;
    background: #0f172a;
    margin: 0;
    padding: 0;
    color: white;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
/* استایل‌های صفحه مشارکت */
#imagesList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (min-width: 640px) {
    #imagesList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    #imagesList {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.card {
    background-color: #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}
.card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}
.card button {
    width: 100%;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.card button:hover {
    background-color: #2563eb;
}
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}
.modal-content {
    background-color: #1e293b;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 64rem;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}
.modal-body {
    padding: 1.25rem;
    flex: 1;
    overflow-y: auto;
}
.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.search-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: #334155;
    color: white;
    border: none;
    margin-bottom: 1rem;
}
.search-input::placeholder {
    color: #94a3b8;
}
#modalFacesGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
@media (min-width: 640px) {
    #modalFacesGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    #modalFacesGrid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
.face-card {
    background-color: #334155;
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.face-card:hover {
    background-color: #475569;
    border-color: #3b82f6;
}
.face-card.selected {
    border-color: #10b981;
    background-color: #1e293b;
}
.face-card.ring-2 {
    border: 2px solid #3b82f6;
    background-color: #1e293b;
}
.face-img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.5rem;
}
.face-name {
    font-size: 0.75rem;
    color: white;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.button-blue {
    background-color: #3b82f6;
    color: white;
}
.button-blue:hover {
    background-color: #2563eb;
}
.button-gray {
    background-color: #4b5563;
    color: white;
}
.button-gray:hover {
    background-color: #64748b;
}
.button-green {
    background-color: #10b981;
    color: white;
}
.button-green:hover {
    background-color: #059669;
}
.message-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 1rem;
}
.message-content {
    background-color: #1e293b;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 24rem;
    padding: 1.25rem;
    text-align: center;
}
.message-text {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.loading-text {
    color: white;
    font-size: 1.125rem;
    text-align: center;
    margin-top: 1rem;
}
/* استایل‌های مرتبط با اسکرول بار */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
/* استایل‌های اضافی برای پنل ادمین */
.tab-btn {
    transition: all 0.2s ease;
}
.tab-btn.active {
    background-color: #3b82f6;
    color: white;
}
/* منوی موبایل از سمت راست */
#mobileMenu { 
    position: fixed; 
    top: 0; 
    right: 0; 
    bottom: 0; 
    width: 280px; 
    z-index: 50; 
    transform: translateX(100%); 
    transition: transform 0.3s ease; 
    background: #1f2937;
}
#mobileMenu.open { 
    transform: translateX(0); 
}
#mobileOverlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.5); 
    z-index: 49; 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s; 
}
#mobileOverlay.open { 
    opacity: 1; 
    visibility: visible; 
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.message-icon {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0 auto;
}
.message-icon.success { background: #10b981; }
.message-icon.error { background: #ef4444; }
.message-icon.warning { background: #f59e0b; }
/* استایل‌های گالری تصاویر */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gallery img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.gallery img:hover {
    transform: scale(1.05);
}
/* استایل‌های کارت‌های چهره در ادمین */
.faces-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
@media (min-width: 640px) { .faces-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .faces-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .faces-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.face-card-admin {
    background-color: #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.face-card-admin:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}
.face-card-admin img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    border: 2px solid #334155;
}
.face-card-admin p {
    font-size: 0.875rem;
    color: white;
    margin: 0;
}
/* استایل‌های فلوتیگ باتن */
.floating-button {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #10b981;
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 3rem;
    height: 3rem;
}
.floating-button:hover {
    background-color: #059669;
    transform: translateX(-50%) translateY(-2px);
}
/* استایل‌های responsive برای مودال‌ها */
@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
    }
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    .button {
        width: 100%;
    }
}
/* استایل‌های line-clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}