* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    line-height: 1.6;
    color: #333;
}

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

/* هدر */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    border-radius: 0 0 10px 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
}

.logo h1 {
    font-size: 20px;
}

.nav {
    display: flex;
    gap: 15px;
}

.admin-link {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

/* تبلیغات */
.main-banner {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.ad-placeholder {
    background: #f0f0f0;
    padding: 40px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    color: #666;
}

.ad-placeholder.small {
    padding: 20px;
}

/* فرم جستجو */
.search-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.search-input-group {
    display: flex;
    gap: 10px;
    /*margin-bottom: 20px;*/
}

.search-input {
    flex: 1;
    padding: 5px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
}

.search-button:hover {
    transform: translateY(-2px);
}

/* پیشنهادات */
.suggestions {
    margin-top: 20px;
}

.suggestions h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

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

.query-tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    transition: all 0.3s;
}

.query-tag:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* محتوا */
.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.main-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-message h2 {
    color: #333;
    margin-bottom: 15px;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.stat-item i {
    color: #667eea;
    font-size: 20px;
}

/* سایدبار */
.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-ads h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-ad {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s;
}

.sidebar-ad:hover {
    transform: translateY(-5px);
}

.sidebar-ad-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.ad-title {
    padding: 10px;
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* نتایج جستجو */
.search-results {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.results-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.results-count {
    color: #666;
    margin-top: 5px;
}

.result-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.result-item:hover {
    background: #f9f9f9;
}

.result-title {
    margin-bottom: 10px;
}

.result-title a {
    color: #1a0dab;
    text-decoration: none;
    font-size: 18px;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.result-description {
    color: #444;
    margin-bottom: 10px;
}

.result-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* تبلیغات درون نتایج */
.in-feed-ad {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.in-feed-ad-content {
    display: flex;
    align-items: center;
    padding: 15px;
}

.in-feed-ad-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-left: 15px;
}

.in-feed-ad-text {
    flex: 1;
}

.in-feed-ad-text h4 {
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-link {
    padding: 8px 15px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.page-link:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

.page-link.active {
    background: #667eea;
    color: white;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

/* نتایج خالی */
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

.no-results i {
    color: #ddd;
    margin-bottom: 20px;
}

.back-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
}

/* فوتر */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
}

/* تبلیغات بالا و پایین */
.top-ad, .bottom-ad {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* پاسخگو */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
    }

    .stats {
        flex-direction: column;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    .in-feed-ad-content {
        flex-direction: column;
        text-align: center;
    }

    .in-feed-ad-image {
        margin-left: 0;
        margin-bottom: 15px;
    }
}