.content-wrapper {
    display: flex;
    gap: 25px;
    padding: 50px 140px;
    position: relative;
}

/* form modal */
.modal-filter-panel{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Filter Panel Styles */
.filter-panel {
    flex: 0 0 300px;
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: max-content;
    position: sticky;
    top: 133px;
    left: 0;
}

.filter-panel h2 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eaeaea;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group {
    margin-bottom: 22px;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 10px;
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.apply-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #007bff;
    color: white;
}

.reset-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f1f2f6;
    color: #2c3e50;
}

.apply-btn:hover {
    opacity: 0.7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Websites Grid Styles */
.websites-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.website-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 420px;
    opacity: 0;
    transform: translateY(20px);
}

.website-card:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
    /*z-index: 20;*/
}

.animate-card {
    animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    padding: 20px;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.website-logo {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #007bff;
    font-weight: bold;
    object-fit: cover;
}

.website-info {
    flex: 1;
}

.website-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    /*display: -webkit-box;*/
    width: 170px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.website-domain {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* NEW: Category badge */
.website-category {
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    backdrop-filter: blur(10px);
    align-self: flex-start;
    margin-left: auto;
    color: #ffffff;
    background-color: #ddd;
    width: max-content;
}

.card-body {
    padding: 20px;
    flex: 1;
}

.website-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;   /* limit to 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 100px;
}

.website-stats {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.card-footer {
    padding: 0 20px 20px;
}

.view-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: 2px solid #007bff00;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-btn:hover {
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: max-content;
    /*max-width: 800px;*/
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
}

.modal-logo {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #007bff;
    font-weight: bold;
}

.modal-header-info {
    width: 55%;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 5px;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.modal-domain {
    font-size: 1.1rem;
    opacity: 0.9;
    width: max-content;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: absolute;
    top: 15px;
    right: 15px;
}

.modal-body {
    padding: 25px;
    display: flex;
    flex-direction: row;
    gap: 25px;
}

.modal-screenshot {
    width: max-content;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-screenshot img {
    width: 314px;
    display: block;
}

.modal-info-box{
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 411px;
}

.modal-description {
    line-height: 1.7;
    color: #333;
    font-size: 1.05rem;
}

.modal-stats {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    padding: 0 25px 25px;
}

.visit-btn {
    flex: 1;
    padding: 15px;
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.visit-btn:hover {
    background: transparent;
    color: #007bff;
    transform: translateY(-2px);
}

.filter-group-pagination{
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 50px;
}

.filter-group-pagination .filter-page{
    border-radius: 5px;
    padding: 10px 15px 5px 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #007bff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    line-height: normal;
    transform: translateY(0);
    min-width: 45px;
    height: 45px;
    text-align: center;
}

.filter-group-pagination .filter-page:hover{
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.5);
}

.filter-group-pagination .filter-page::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: all 0.3s ease;
}

.filter-group-pagination .filter-page:hover::after{
    width: 100%;
}

.filter-group-pagination .active-page{
    border-radius: 5px;
    padding: 10px 15px 10px 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    line-height: normal;
    background: #007bff;
    transform: translateY(-5px);
    /*margin: 5px;*/
    color: #ffffff;
}

.filter-pagination-dots{
    color: #007bff;
    font-size: 30px;
}

.filter-modal-button{
    display: none;
}

.filter-modal-background-layout{
    display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }

    .filter-modal-button{
        display: block;
        position: fixed;
        bottom: 50px;
        left: 50px;
        z-index: 1000;
        background-color: #ffffff;
        padding: 20px;
        width: 80px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        height: 80px;
        border: 2px solid #007bff;
        border-radius: 10px;
    }

    .filter-modal-button svg{
        width: 30px;
        height: 30px;
        fill: #007bff;
    }

    .filter-modal-background-layout{
        position: fixed;
        left: 0;
        top: 0;
        height: 100dvh;
        width: 100vw;
        z-index: 1001;
        background-color: rgba(0, 0, 0, 0.6);
    }

    .filter-panel{
        width: 75%;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    #desktop-filter-form{
        display: none !important;
    }
}

@media (max-width: 650px) {
    .content-wrapper {
        padding: 50px 70px;
    }
}

@media (max-width: 576px) {
    .websites-grid {
        grid-template-columns: 1fr;
    }

    .modal-stats {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    .content-wrapper {
        padding: 50px 25px;
    }

    .filter-modal-button {
        padding: 10px;
        width: 60px;
        height: 60px;
    }

    .modal-content{
        width: 95%;
    }

    .modal-body{
        flex-direction: column;
    }

    .filter-panel {
        width: 95%;
    }
}