* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
    width: 100%;
}

.search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    text-align: center;
    color: white;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 20px 30px;
    border: none;
    font-size: 1.1rem;
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: scale(1.05);
}

.results-section {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.results-count {
    font-size: 1rem;
    color: #666;
}

.results-count strong {
    color: #667eea;
    font-weight: 700;
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 6px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-btn:hover,
.sort-btn.active {
    border-color: #667eea;
    color: #667eea;
    background: #f0f4ff;
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resource-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s;
}

.resource-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.resource-content {
    flex: 1;
}

.resource-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
}

.resource-title:hover {
    color: #667eea;
}

.resource-url {
    color: #667eea;
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: block;
}

.resource-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.resource-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.resource-meta-top {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-tags .tag {
    background: #f0f4ff;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.resource-tags .tag:hover {
    background: #667eea;
    color: white;
}

.resource-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.resource-category i {
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.85rem;
}

.resource-price {
    margin-left: auto;
    color: #f5576c;
    font-weight: 700;
    font-size: 1.2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.page-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.page-ellipsis {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1rem;
}

.footer {
    background: #1a1a2e;
    color: white;
    padding: 50px 30px;
    text-align: center;
    margin-top: auto;
}

@media (max-width: 1024px) {
    .main-container {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 0;
    }

    .search-hero {
        padding: 10px 0;
    }

    .search-box {
        flex-direction: row;
        border-radius: 50px;
    }

    .search-input {
        width: 100%;
        border-radius: 50px 0 0 50px;
        padding: 15px 20px;
        font-size: 1rem;
    }

    .search-btn {
        padding: 15px 25px;
        width: auto;
        border-radius: 0 50px 50px 0;
        white-space: nowrap;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .sort-options {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }

    .sort-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .resource-item {
        flex-direction: column;
    }

    .resource-meta {
        flex-wrap: wrap;
    }

    .resource-price {
        margin-left: 0;
    }
}