﻿.search-box {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}

    .search-box input {
        flex: 1;
        padding: 12px 20px;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 14px;
        outline: none;
    }

        .search-box input::placeholder {
            color: #999;
        }

    .search-box .search-button {
        padding: 12px 20px;
        background-color: #CF2228;
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        transition: background-color 0.2s;
    }

        .search-box .search-button:hover {
            background-color: #CF2228;
        }

        .search-box .search-button:active {
            background-color: #CF2228;
        }

        .search-box .search-button svg {
            flex-shrink: 0;
        }

/* Search Results */

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    /* border-top: none; */
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /*margin-top: -10px;*/
}

.search-loading,
.search-no-results,
.search-error {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-error {
    color: #CF2228;
}

.search-results-list {
    padding: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    cursor: pointer;
}

    .search-result-item:hover,
    .search-result-item.selected {
        background-color: #f5f5f5;
    }

    .search-result-item:last-child {
        border-bottom: none;
    }

    .search-result-item .player-photo {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 15px;
        border: 2px solid #f0f0f0;
    }

    .search-result-item .player-info {
        flex: 1;
    }

    .search-result-item .player-name {
        font-size: 15px;
        font-weight: 600;
        color: #1a1a1a;
        margin-bottom: 4px;
    }

    .search-result-item .player-details {
        font-size: 13px;
        color: #666;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

        .search-result-item .player-details span:not(:last-child)::after {
            content: '•';
            margin-left: 10px;
            color: #ccc;
        }

.c-player-synthetic {
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.c-h-player {
    margin-top: 20px;
    background: #CF2228;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.c-h-img {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.c-h-player h2 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Body content */
.c-b-player {
    padding: 0;
}

/* Profile section */
.player-profile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    padding: 35px;
    align-items: center;
    border-bottom: 2px solid #e0e0e0;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f0f0f0;
}

    .profile-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Profile info */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-acronym {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.profile-name {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.profile-info > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
}

.nationality {
    color: #555;
    font-size: 14px;
    margin: 0;
}

/* Profile stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
    min-width: 350px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.stat-label {
    color: #888;
    font-size: 14px;
    white-space: nowrap;
}

.stat-value {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.team-logo {
    width: 20px;
    height: 20px;
}

.club-name {
    margin: 0;
}

/* Transfers section */
.transfers {
    padding: 35px;
}

.section-transfers {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

    .section-transfers::before {
        content: "⇄";
        font-size: 22px;
        color: #555;
    }

/* Transfers table */
.transfers-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #CF2228;
    border-radius: 8px;
    border-collapse: separate;
}

    .transfers-table thead {
        background-color: #fddede;
    }

    .transfers-table th {
        padding: 15px 20px;
        text-align: left;
        font-weight: 600;
        font-size: 13px;
        color: #000;
        border-bottom: 2px solid #e0e0e0;
    }

    .transfers-table td {
        padding: 18px 20px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        color: #333;
    }

    .transfers-table tbody tr:hover {
        background-color: #fafafa;
    }

    .transfers-table thead tr:first-child th:first-child {
        border-top-left-radius: 8px;
    }

    .transfers-table thead tr:first-child th:last-child {
        border-top-right-radius: 8px;
    }

    .transfers-table tbody tr:last-child td:first-child {
        border-bottom-left-radius: 8px;
    }

    .transfers-table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 8px;
    }

/* Club cell */
.club-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

    .club-cell:hover {
        color: #000;
    }

.club-badge {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

/* Time column */
.time {
    color: #666;
}

/* Fee styles */
.fee {
    font-weight: 600;
    color: #1a1a1a;
}

    .fee.free {
        color: #666;
        font-weight: 500;
    }



.c-player-stats {
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Section */
.c-h-stats {
    background: #CF2228;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

    .c-h-stats > div:first-child {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .c-h-stats img {
        width: 28px;
        height: 28px;
        filter: brightness(0) invert(1);
    }

    .c-h-stats h2 {
        font-size: 14px;
        font-weight: 600;
        margin: 0;
        color: #fff;
    }



/* Header Stats (4 boxes) */
.header-stats {
    padding: 40px 100px 20px 100px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-box {
    padding: 28px 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #CF2228;
    transition: all 0.3s ease;
}

    .stat-box:hover {
        border-color: #3d4149;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

.header-stats .stat-number {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #38404D;
    line-height: 1;
}

.header-stats .stat-label {
    color: #38404D;
    font-size: 14px;
    font-weight: 500;
}

/* Body Stats Grid */
.body-stats {
    padding: 0 20px 30px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

    .body-stats > div:nth-child(2) {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

/* Stats Sections */
.overall-stats,
.attack-stats,
.combination-stats,
.defense-stats {
    border-radius: 10px;
    border: 1px solid #CF2228;
}

.overall-stats {
    grid-row: span 2;
}

    /* Section Headers */
    .overall-stats h3,
    .attack-stats h3,
    .combination-stats h3,
    .defense-stats h3 {
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 16px 0;
        padding-bottom: 12px;
        border-bottom: 1px solid #CF2228;
        color: #38404D;
        padding: 15px;
        background-color: #fddede;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }

/* Stat Items */
.c-player-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    border-bottom: 1px solid #ccc;
    font-size: 14px;
}

    .c-player-stats .stat-item:last-child {
        border-bottom: none;
        padding-bottom: 10px;
    }

    .c-player-stats .stat-item:first-of-type {
        padding-top: 0;
    }

    .c-player-stats .stat-item > span:first-child {
        color: #38404D;
        font-weight: 400;
    }

    .c-player-stats .stat-item .stat-value {
        font-weight: 600;
        color: #38404D;
        font-size: 15px;
    }

/* Responsive Design */


@media (max-width: 1200px) {
    .body-stats {
        grid-template-columns: 1fr 1fr;
    }

    .overall-stats {
        grid-row: auto;
    }

    .defense-stats {
        grid-column: span 2;
    }
}

@media (max-width: 1024px) {
    .header-stats {
        padding: 30px 40px 20px 40px;
    }

    /* Filter vẫn nằm cùng dòng */
    .filter {
        display: flex;
        flex-direction: row;
        gap: 12px;
    }
}

/* Responsive cho màn hình < 768px */
@media (max-width: 768px) {
    .c-player-stats {
        padding: 16px;
    }

    .c-h-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filter {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 12px;
    }

    .filter-dropdown {
        width: 100%;
    }

    .btn-filter {
        width: 100%;
        justify-content: space-between;
    }

    /* Stat boxes: 2 cột x 2 hàng */
    .header-stats {
        padding: 20px 16px;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-box {
        padding: 20px 16px;
    }

    .header-stats .stat-number {
        font-size: 32px;
    }

    .body-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .defense-stats {
        grid-column: auto;
    }
}

/* Responsive cho màn hình < 480px */
@media (max-width: 480px) {
    /* Filter: mỗi dòng 1 filter */
    .filter {
        flex-direction: column;
    }

    .filter-dropdown {
        width: 100%;
    }

    /* Stat boxes vẫn giữ 2 cột x 2 hàng */
    .header-stats {
        padding: 16px 12px;
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .stat-box {
        padding: 16px 12px;
    }

    .header-stats .stat-number {
        font-size: 28px;
    }

    .header-stats .stat-label {
        font-size: 13px;
    }

    .c-h-stats h2 {
        font-size: 18px;
    }
}

/* Animation for loading state */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}




/* Desktop lớn */
@media (max-width: 1200px) {
    .profile-stats {
        min-width: 320px;
        gap: 18px 35px;
    }
}

/* Tablet lớn */
@media (max-width: 1024px) {
    .profile-stats {
        min-width: 300px;
        gap: 15px 30px;
    }

    .stat-item {
        gap: 10px;
    }

    .transfers-table th,
    .transfers-table td {
        padding: 14px 16px;
    }
}

/* Tablet */
@media (max-width: 968px) {
    .player-profile {
        grid-template-columns: auto 1fr;
        gap: 25px;
    }

    .profile-stats {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, 1fr);
        min-width: auto;
        margin-top: 15px;
    }

    .transfers {
        padding: 30px 25px;
    }

    .transfers-table th,
    .transfers-table td {
        padding: 12px 15px;
    }
}

/* Mobile lớn */
@media (max-width: 768px) {
    /* Header */
    .c-h-player {
        margin-top: 15px;
        padding: 12px 20px;
    }

        .c-h-player h2 {
            font-size: 13px;
        }

    .c-h-img {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    /* Profile Section */
    .player-profile {
        grid-template-columns: 1fr;
        padding: 25px 20px;
        gap: 20px;
        text-align: center;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
        border: 3px solid #f0f0f0;
    }

    .profile-info {
        align-items: center;
    }

        .profile-info > div {
            justify-content: center;
        }

    .player-acronym {
        font-size: 28px;
    }

    .profile-name {
        font-size: 14px;
    }

    /* Profile Stats */
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 10px;
    }

    .stat-item {
        justify-content: space-between;
        padding: 8px 12px;
        background: #f9f9f9;
        border-radius: 6px;
    }

    /* Transfers Section */
    .transfers {
        padding: 25px 20px;
        overflow-x: auto;
    }

    .section-transfers {
        font-size: 16px;
        margin-bottom: 20px;
    }

        .section-transfers::before {
            font-size: 20px;
        }

    /* Transfers Table */
    .transfers-table {
        min-width: 600px;
    }

        .transfers-table th,
        .transfers-table td {
            padding: 10px 12px;
            font-size: 13px;
        }

        .transfers-table th {
            font-size: 12px;
        }

    .club-cell {
        gap: 8px;
    }

    .club-badge {
        width: 20px;
        height: 20px;
    }
}

/* Mobile trung bình */
@media (max-width: 600px) {
    .transfers-table {
        min-width: 550px;
    }

        .transfers-table th,
        .transfers-table td {
            padding: 8px 10px;
        }
}

/* Mobile nhỏ */
@media (max-width: 480px) {
    /* Container */
    .c-player-synthetic {
        border-radius: 8px;
    }

    /* Header */
    .c-h-player {
        margin-top: 10px;
        padding: 10px 15px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

        .c-h-player h2 {
            font-size: 12px;
        }

    .c-h-img {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }

    /* Profile Section */
    .player-profile {
        padding: 20px 15px;
        gap: 15px;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .player-acronym {
        font-size: 24px;
    }

    .profile-name {
        font-size: 13px;
    }

    .flag {
        width: 20px;
        height: 14px;
    }

    .nationality {
        font-size: 13px;
    }

    /* Profile Stats */
    .stat-item {
        padding: 6px 10px;
    }

    .stat-label,
    .stat-value {
        font-size: 13px;
    }

    .team-logo {
        width: 18px;
        height: 18px;
    }

    /* Transfers Section */
    .transfers {
        padding: 20px 15px;
    }

    .section-transfers {
        font-size: 15px;
        margin-bottom: 15px;
    }

        .section-transfers::before {
            font-size: 18px;
        }

    /* Transfers Table */
    .transfers-table {
        min-width: 500px;
        font-size: 12px;
    }

        .transfers-table th,
        .transfers-table td {
            padding: 8px 8px;
        }

    .club-cell {
        gap: 6px;
        font-size: 12px;
    }

    .club-badge {
        width: 18px;
        height: 18px;
    }

    .fee {
        font-size: 12px;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    /* Profile Section */
    .player-profile {
        padding: 15px 10px;
    }

    .profile-image {
        width: 90px;
        height: 90px;
    }

    .player-acronym {
        font-size: 22px;
    }

    .profile-name {
        font-size: 12px;
    }

    /* Profile Stats */
    .stat-item {
        padding: 6px 8px;
    }

    .stat-label,
    .stat-value {
        font-size: 12px;
    }

    /* Transfers Section */
    .transfers {
        padding: 15px 10px;
    }

    /* Transfers Table */
    .transfers-table {
        min-width: 480px;
    }

        .transfers-table th,
        .transfers-table td {
            padding: 6px 6px;
        }

    .club-cell {
        gap: 5px;
        font-size: 11px;
    }

    .club-badge {
        width: 16px;
        height: 16px;
    }
}
