.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    align-items: center;
}

.user-search {
    padding:8px;
    height: 40px;
    width: 80%;
    border: 1px solid #ccc;
    box-shadow: 1px 1px 1px #999;
    max-width: 100%;
    line-height: 1.5;
    border-radius: 5px;
}

.btn {
    font-size: 1rem;
}

.backdrop {
    position: relative;
    margin: 20px;
    border-radius: 15px;
    width: 300px;
    height: 275px;
    object-fit: cover;
}

.user-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.card {
    position: relative;
    width: 350px;
    height: 520px;
    box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.2),
    inset -5px -5px 15px rgba(255, 255, 255, 0.1),
    5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 5px;
    transition: 0.5s;
    align-items: center;
    overflow: hidden;
}

.data-header {
    margin: 10px;
    font-size: 1.10rem;
    font-weight: bold;
    color: #222;
}

.data-header-body{
    color: #777;
}

.data-header-body-text{
    color: #777;
}

.hide {
    display: none;
}

/* View Controls */
.view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.view-toggle-btn {
    padding: 10px 20px;
    border: 2px solid #333;
    background-color: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-toggle-btn:hover {
    background-color: #333;
    color: white;
}

.view-toggle-btn.active {
    background-color: #333;
    color: white;
}

/* Grid View Styles (Default - keep existing styles) */
.user-cards.grid-view {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.user-cards.grid-view .card {
    position: relative;
    width: 350px;
    height: 520px;
    box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.2),
    inset -5px -5px 15px rgba(255, 255, 255, 0.1),
    5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 5px;
    transition: 0.5s;
    align-items: center;
    overflow: hidden;
}

/* List View Styles */
.user-cards.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    margin: 20px 0;
    width: 100%;
}

.user-cards.list-view .year-group {
    margin-bottom: 40px;
    width: 100%;
}

.user-cards.list-view .year-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    width: 100%;
}

.user-cards.list-view .year-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    width: 100%;
}

.user-cards.list-view .card {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    box-shadow: none;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    margin: 0;
    overflow: visible;
    background: white;
    transition: all 0.2s ease;
    position: relative;
    box-sizing: border-box;
}

.user-cards.list-view .card:hover {
    background-color: #f8f9fa;
    border-color: #dadce0;
    transform: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Event Image in List View */
.user-cards.list-view .event-image-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.user-cards.list-view .event-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-cards.list-view .card .event-icon {
    display: none;
}

.user-cards.list-view .card .card-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.user-cards.list-view .data-header {
    font-size: 1.05rem;
    font-weight: 600;
    color: #202124;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-cards.list-view .data-header a {
    color: #202124;
    text-decoration: none;
}

.user-cards.list-view .data-header a:hover {
    text-decoration: underline;
}

.user-cards.list-view .data-header-body {
    display: none;
}

.user-cards.list-view .data-header-body-text {
    display: none;
}

.user-cards.list-view .list-info {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #5f6368;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.user-cards.list-view .list-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.user-cards.list-view .list-info-item span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-cards.list-view .list-info-item .icon {
    font-size: 1rem;
    color: #5f6368;
    flex-shrink: 0;
}

.user-cards.list-view [data-result] {
    margin-top: 0;
}

.user-cards.list-view [data-result] a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.user-cards.list-view [data-result] a:hover {
    text-decoration: underline;
}

/* Hide list-view specific elements in grid view */
.user-cards.grid-view .event-icon,
.user-cards.grid-view .event-image-wrapper,
.user-cards.grid-view .list-info {
    display: none;
}

/* Show grid-view specific elements */
.user-cards.grid-view .backdrop {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-cards.grid-view [data-header-image] {
    width: 100%;
    height: 280px;
    flex-shrink: 0;
    overflow: hidden;
}

.user-cards.grid-view [data-header-image] a {
    display: block;
    width: 100%;
    height: 100%;
}

.user-cards.grid-view .data-header-body,
.user-cards.grid-view .data-header-body-text {
    display: block;
}

.user-cards.grid-view .card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.user-cards.grid-view .data-header {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #202124;
    line-height: 1.3;
}

.user-cards.grid-view .data-header-body {
    color: #5f6368;
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.user-cards.grid-view .data-header-body-text {
    color: #5f6368;
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.user-cards.grid-view [data-result] a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.user-cards.grid-view [data-result] a:hover {
    text-decoration: underline;
}

/* Hide backdrop in list view */
.user-cards.list-view .backdrop {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .user-cards.list-view .card {
        gap: 12px;
        padding: 16px;
        flex-wrap: nowrap;
    }

    .user-cards.list-view .event-image-wrapper {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .user-cards.list-view .data-header {
        font-size: 0.95rem;
        white-space: normal;
        line-height: 1.3;
    }

    .user-cards.list-view .list-info {
        font-size: 0.85rem;
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .user-cards.list-view .list-info-item {
        width: 100%;
        max-width: 100%;
    }

    .user-cards.list-view .list-info-item span:last-child {
        white-space: normal;
        word-break: break-word;
    }

    .user-cards.list-view [data-result] {
        width: 100%;
    }

    .user-cards.list-view [data-result] a {
        font-size: 0.85rem;
    }

    .view-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-cards.grid-view .card {
        width: 100%;
        max-width: 350px;
    }

    .user-cards.list-view .year-header {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .user-cards.list-view .card {
        gap: 10px;
        padding: 12px;
    }

    .user-cards.list-view .event-image-wrapper {
        width: 40px;
        height: 40px;
    }

    .user-cards.list-view .data-header {
        font-size: 0.9rem;
    }

    .user-cards.list-view .list-info {
        font-size: 0.8rem;
        gap: 8px;
    }

    .user-cards.list-view .year-header {
        font-size: 1.2rem;
    }

    .view-toggle-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}