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

body {
    font-family: 'Vazirmatn', 'Tahoma', 'B Nazanin', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
    position: relative;
}

header {
    text-align: center;
    color: #ffffff;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    text-shadow: none;
    font-weight: 700;
    letter-spacing: 1px;
}

header p {
    font-size: 1.2em;
    opacity: 0.8;
    font-weight: 300;
    color: #cccccc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-filter-section {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out;
    border: 2px solid #333333;
}

/* جستجو */
.search-box {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #444444;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #2a2a2a;
    color: #ffffff;
}

.search-input:focus {
    outline: none;
    border-color: #666666;
    background: #2a2a2a;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.search-input::placeholder {
    color: #999;
}

/* نوار الفبایی */
.alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
}

.alphabet-btn {
    padding: 8px 12px;
    border: 2px solid #444444;
    background: #2a2a2a;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
    color: #ffffff;
}

.alphabet-btn:hover {
    border-color: #666666;
    color: #ffffff;
    transform: translateY(-2px);
    background: #333333;
}

.alphabet-btn.active {
    background: #444444;
    color: white;
    border-color: #666666;
}

/* Sidebar الفبایی */
.alphabet-sidebar {
    display: none;
}

.sidebar-label {
    text-align: center;
    font-weight: bold;
    color: #ffffff;
    font-size: 0.55em;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ffffff;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-letter {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.55em;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
    background: #1a1a1a;
}

.sidebar-letter:hover {
    background: #4a4a4a;
    color: white;
    transform: scale(1.15);
}

.sidebar-letter.active {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.15);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* فیلتر تگ ها */
.tags-filter h3 {
    margin-bottom: 10px;
    font-size: 1em;
    color: #ffffff;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-filter-btn {
    padding: 8px 16px;
    border: 2px solid #444444;
    background: #2a2a2a;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    white-space: nowrap;
    color: #ffffff;
}

.tag-filter-btn:hover {
    border-color: #666666;
    color: #ffffff;
    background: #333333;
}

.tag-filter-btn.active {
    background: #444444;
    color: white;
    border-color: #666666;
}

/* شبکه کارت ها */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 30px;
}

/* کارت */
.website-card {
    background: #2a2a2a;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
    animation: fadeIn 0.5s ease-out;
    display: flex;
    flex-direction: column;
    border: 2px solid #333333;
}

.website-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: #1a1a1a;
}

.card-header {
    background: #1a1a1a;
    color: white;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
}

.card-title {
    font-size: 1.4em;
    font-weight: 700;
    flex: 1;
    letter-spacing: 0.5px;
}

.card-icon {
    font-size: 2.2em;
    margin-left: 12px;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #2a2a2a;
}

.card-description {
    color: #cccccc;
    margin-bottom: 16px;
    line-height: 1.7;
    flex: 1;
    font-size: 0.95em;
}

.card-url {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 18px;
    font-size: 0.85em;
    word-break: break-all;
    padding: 12px 14px;
    background: #1a1a1a;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid #444444;
    font-weight: 500;
}

.card-url:hover {
    background: #444444;
    color: white;
    padding-left: 18px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    display: inline-block;
    background: #2a2a2a;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1.5px solid #444444;
    font-weight: 500;
}

.tag-badge:hover {
    background: #444444;
    color: white;
    transform: scale(1.05);
    border-color: #666666;
}

/* پیام خالی */
.empty-message {
    text-align: center;
    padding: 80px 40px;
    background: #1a1a1a;
    border-radius: 15px;
    color: #999;
    font-size: 1.3em;
    display: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border: 2px solid #333333;
}

.empty-message.show {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* انیمیشن ها */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
        margin-right: 0;
    }

    header {
        margin-right: 0;
    }

    .websites-grid {
        grid-template-columns: 1fr;
        margin-right: 0;
    }

    .search-filter-section {
        margin-right: 0;
    }

    .empty-message {
        margin-right: 0;
    }

    .alphabet-sidebar {
        right: 10px;
        left: auto;
        border-radius: 25px;
        top: 50%;
    }

    .sidebar-content {
        gap: 6px;
    }

    .sidebar-letter {
        width: 28px;
        height: 28px;
        font-size: 0.7em;
    }
}
