/* 个人主页视觉与多选状态。 */
body.profile-page {
    min-height: 100vh;
    color: #193c2c;
    background-color: #f3f8f4;
    background-image: url("/static/common/profile-jiangnan-bg.png");
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

body.profile-page .site-header {
    background: rgba(248, 252, 248, .60) !important;
    border-bottom-color: rgba(31, 91, 66, .10) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.profile-page .site-header .site-login {
    background: linear-gradient(135deg, #26734f, #145035);
}

body.profile-page .profile-container {
    width: min(1600px, calc(100% - 64px));
    max-width: 1600px;
    min-height: calc(100vh - 180px);
    margin: clamp(48px, 6vw, 86px) auto 68px;
    padding: 0;
    gap: 20px;
    align-items: flex-start;
    background: transparent;
}

body.profile-page .profile-sidebar,
body.profile-page .profile-content {
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 18px;
    box-shadow: 0 12px 38px rgba(30, 80, 57, .10);
}

body.profile-page .profile-sidebar {
    flex: 0 0 296px;
    width: 296px;
    margin: 0;
    padding: 24px 20px 20px;
    position: sticky;
    top: 20px;
    background: rgba(255, 255, 255, .62);
}

body.profile-page .user-info {
    margin: 0 0 14px;
    padding: 8px 0 20px;
    border-bottom: 1px solid rgba(43, 102, 72, .12);
}

body.profile-page .user-avatar {
    width: 90px;
    height: 90px;
    margin-bottom: 14px;
    border: 6px solid rgba(236, 247, 240, .95);
    background-color: #2c7651;
    box-shadow: 0 5px 18px rgba(31, 85, 54, .17);
}

body.profile-page .user-info h2 {
    margin-bottom: 4px;
    color: #173c2b;
    font: 700 20px/1.35 "Songti SC", SimSun, serif;
    overflow-wrap: anywhere;
}

body.profile-page .user-info p {
    margin-bottom: 0;
    color: #687971;
    font-size: 13px;
    overflow-wrap: anywhere;
}

body.profile-page .user-stats {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid rgba(43, 102, 72, .10);
}

body.profile-page .stat-item {
    flex: 1;
    gap: 3px;
}

body.profile-page .stat-item + .stat-item {
    border-left: 1px solid rgba(43, 102, 72, .10);
}

body.profile-page .stat-value {
    color: #1a6541;
    font: 700 22px/1.2 "Songti SC", SimSun, serif;
}

body.profile-page .stat-label {
    color: #65776c;
    font-size: 12px;
}

body.profile-page .profile-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

body.profile-page .profile-menu li {
    margin: 0;
    border-radius: 10px;
}

body.profile-page .profile-menu li a,
body.profile-page #logout-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 47px;
    padding: 10px 16px;
    border-radius: 10px;
    color: #30463a;
    font-size: 15px;
    font-weight: 500;
}

body.profile-page .profile-menu li a i,
body.profile-page #logout-btn i {
    width: 19px;
    text-align: center;
    font-size: 17px;
}

body.profile-page .profile-menu li.active {
    background: linear-gradient(90deg, rgba(42, 116, 75, .13), rgba(42, 116, 75, .05));
}

body.profile-page .profile-menu li.active a,
body.profile-page .profile-menu li a:hover {
    color: #175c39;
}

body.profile-page .profile-menu li:not(.active) a:hover {
    background: rgba(42, 116, 75, .06);
}

body.profile-page .profile-menu li.active a::before,
body.profile-page #logout-btn::before {
    content: none;
}

body.profile-page #logout-btn {
    margin-top: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(43, 102, 72, .12);
    color: #c14b48;
}

body.profile-page #logout-btn:hover {
    background: rgba(193, 75, 72, .07);
}

body.profile-page .profile-content {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 660px;
    margin: 0;
    padding: 28px 20px 26px;
    background: rgba(255, 255, 255, .52);
}

body.profile-page .section-title {
    min-height: 66px;
    margin-bottom: 16px;
    padding: 0 5px 14px;
    border-bottom: 1px solid rgba(41, 98, 67, .12);
    gap: 16px;
}

body.profile-page .section-title h3 {
    margin: 0;
    color: #123d2a;
    font: 700 26px/1.25 "Songti SC", SimSun, serif;
}

body.profile-page #favorites-section .section-title h3::before {
    content: "★";
    display: inline-block;
    margin-right: 14px;
    color: #247450;
    font: 25px/1 sans-serif;
    vertical-align: 1px;
}

body.profile-page .section-heading p {
    margin: 5px 0 0 40px;
    color: #71827a;
    font-size: 12px;
    line-height: 1.4;
}

body.profile-page .section-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.profile-page .sort-select,
body.profile-page .section-actions .btn {
    min-height: 40px;
    height: 40px;
    border: 1px solid #d4e2d8;
    border-radius: 9px;
    background: rgba(255, 255, 255, .85);
    color: #305945;
}

body.profile-page .section-actions .btn:hover,
body.profile-page .sort-select:hover {
    border-color: #7db392;
    background: #f5faf5;
}

body.profile-page .favorites-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

body.profile-page .favorite-item {
    min-width: 0;
    min-height: 286px;
    margin: 0;
    padding: 0;
    flex-direction: column;
    border: 1px solid rgba(49, 101, 70, .08);
    border-radius: 11px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 5px 15px rgba(30, 71, 50, .09);
}

body.profile-page .favorite-item:hover {
    box-shadow: 0 11px 24px rgba(30, 71, 50, .15);
    transform: translateY(-3px);
}

body.profile-page .favorite-image {
    width: 100%;
    height: clamp(135px, 11vw, 174px);
    flex: none;
    background-color: #e3eee8;
}

body.profile-page .favorite-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 14px 15px 15px;
}

body.profile-page .favorite-info h4 {
    margin-bottom: 9px;
    color: #1b3629;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

body.profile-page .favorite-info p {
    align-self: flex-start;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 4px 9px;
    border-radius: 6px;
    background: #edf6ef;
    color: #377651;
    font-size: 12px;
    overflow-wrap: anywhere;
}

body.profile-page .favorite-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

body.profile-page .favorite-actions button {
    min-width: 0;
    min-height: 36px;
    padding: 7px 5px;
    border-radius: 7px;
    font-size: 13px;
    white-space: nowrap;
}

body.profile-page .view-btn,
body.profile-page .multi-select-actions .primary-btn,
body.profile-page .primary-btn {
    background: linear-gradient(135deg, #24764e, #15563a);
    color: white;
}

body.profile-page .view-btn:hover,
body.profile-page .multi-select-actions .primary-btn:hover:not(:disabled),
body.profile-page .primary-btn:hover {
    background: #154f35;
}

body.profile-page .remove-btn {
    background: #f1f4f1;
    color: #5d6b62;
}

body.profile-page .remove-btn:hover {
    background: #e6eee8;
    color: #254b35;
}

body.profile-page .favorite-item.multi-select-mode,
body.profile-page .favorite-item.multi-select-mode.selected {
    padding-left: 0;
}

body.profile-page .favorite-item.multi-select-mode {
    cursor: pointer;
    border-color: rgba(37, 114, 72, .25);
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body.profile-page .favorite-item.multi-select-mode:hover,
body.profile-page .favorite-item.multi-select-mode:focus-within {
    border-color: #4c9b69;
    box-shadow: 0 0 0 3px rgba(47, 137, 81, .15), 0 12px 25px rgba(30, 71, 50, .16);
}

body.profile-page .favorite-item.multi-select-mode.selected {
    border: 1px solid #258652;
    background: #f5fbf6;
    box-shadow: 0 0 0 3px rgba(33, 128, 75, .24), 0 12px 25px rgba(30, 71, 50, .16);
}

body.profile-page .favorite-item.multi-select-mode.selected .favorite-image::after {
    content: "已选择";
    position: absolute;
    top: 14px;
    right: 13px;
    padding: 6px 11px;
    border-radius: 99px;
    background: #1d7148;
    color: white;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(14, 67, 39, .24);
}

body.profile-page .favorite-item.multi-select-mode .favorite-actions {
    display: none;
}

body.profile-page .favorite-checkbox {
    top: 13px;
    left: 13px;
    align-items: center;
    gap: 7px;
    min-width: 82px;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid rgba(37, 101, 66, .34);
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 13px rgba(20, 61, 39, .20);
    color: #245f3f;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

body.profile-page .favorite-checkbox input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #23784f;
}

body.profile-page .favorite-checkbox:has(input:checked) {
    border-color: #1d7148;
    background: #e4f5e9;
}

body.profile-page .favorite-checkbox:focus-within {
    outline: 3px solid rgba(45, 131, 79, .30);
    outline-offset: 2px;
}

body.profile-page #multi-select-actions {
    gap: 10px;
    padding: 12px 16px;
    border-color: rgba(42, 119, 73, .22);
    background: rgba(234, 247, 237, .93);
}

body.profile-page .multi-select-hint {
    color: #4a775c;
    font-size: 13px;
}

body.profile-page .selected-count {
    padding: 7px 11px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .80);
    color: #3e7254;
    font-weight: 700;
}

body.profile-page .multi-select-actions.has-selection .selected-count {
    background: #25784d;
    color: white;
}

body.profile-page .multi-select-actions,
body.profile-page .settings-form,
body.profile-page .footballer-form,
body.profile-page .history-scroll-wrapper,
body.profile-page .user-item,
body.profile-page .no-favorites,
body.profile-page .no-history,
body.profile-page .empty-state {
    border: 1px solid rgba(44, 102, 72, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 3px 12px rgba(27, 65, 45, .05);
}

body.profile-page .form-control {
    border-color: #d3e0d6;
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
}

body.profile-page .form-control:focus {
    outline: 2px solid rgba(43, 126, 80, .28);
    border-color: #74ac87;
}

body.profile-page .loading,
body.profile-page .no-favorites {
    grid-column: 1 / -1;
}

body.profile-page footer.site-footer {
    padding: 23px 32px;
    border-top: 1px solid rgba(45, 95, 71, .12);
    background: rgba(245, 251, 246, .60);
    color: #315941;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.profile-page .site-footer .footer-links a,
body.profile-page .site-footer .footer-inner small {
    color: #63796a;
}

@media (max-width: 1400px) {
    body.profile-page .favorites-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    body.profile-page .profile-container {
        width: calc(100% - 40px);
    }
    body.profile-page .profile-sidebar {
        flex-basis: 255px;
        width: 255px;
    }
    body.profile-page .favorites-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body.profile-page .profile-container {
        width: calc(100% - 28px);
        margin: 24px auto 38px;
        padding: 0;
        flex-direction: column;
        gap: 16px;
    }
    body.profile-page .profile-sidebar,
    body.profile-page .profile-content {
        width: 100%;
        margin: 0;
        position: relative;
        top: auto;
    }
    body.profile-page .profile-sidebar {
        flex-basis: auto;
        padding: 18px;
    }
    body.profile-page .profile-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.profile-page .profile-content {
        min-height: 460px;
        padding: 22px 16px;
    }
    body.profile-page .multi-select-hint {
        width: 100%;
        order: 3;
    }
    body.profile-page #logout-btn {
        margin: 0;
        padding-top: 10px;
        border-top: 0;
    }
    body.profile-page .favorites-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body.profile-page .section-title {
        align-items: flex-start;
        flex-direction: column;
    }
    body.profile-page .section-title h3 {
        font-size: 23px;
    }
    body.profile-page .section-actions {
        justify-content: flex-start;
        width: 100%;
    }
    body.profile-page .favorites-container {
        grid-template-columns: 1fr;
    }
    body.profile-page .favorite-image {
        height: 190px;
    }
    body.profile-page .profile-menu li a,
    body.profile-page #logout-btn {
        gap: 9px;
        padding-left: 10px;
        font-size: 14px;
    }
}
