.page-guidelines-container {
    display: block;
    padding: 2rem;
    max-width: 90rem;
    margin: 0 auto;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-guidelines-container.expanded {
    max-width: 120rem;
}

.page-guidelines {
    display: grid;
    grid-template-columns: 1fr 0fr 1.5fr;
    grid-template-areas: "board profile requirements";
    gap: 3rem 0;
    /* Vertical gap 3rem, horizontal gap 0 */
    height: 100%;
    transition:
        grid-template-columns 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        gap 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-guidelines.has-selected {
    grid-template-columns: 0.8fr 1.2fr 1.2fr;
    gap: 3rem;
}

.page-guidelines .section {
    background-color: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-surface-border);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 12rem);
    min-width: 0;
    /* Allow grid to shrink item */
}

.page-guidelines .section.mini-board {
    grid-area: board;
    min-width: 20rem;
}

.page-guidelines .section.player-profile {
    grid-area: profile;
    min-width: 30rem;
}

.page-guidelines .section.requirements {
    grid-area: requirements;
    min-width: 30rem;
}

/* Override min-widths during transition to prevent snapping */
.slide-enter-active,
.slide-leave-active,
.slide-enter-from,
.slide-leave-to {
    min-width: 0 !important;
    border-width: 0 !important;
}

.page-guidelines h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-guidelines .mini-board .board {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.page-guidelines .mini-board .rank {
    width: 3rem;
    text-align: right;
    padding-right: 1rem;
    opacity: 0.6;
}

.page-guidelines .mini-board .total {
    width: 6rem;
    text-align: right;
    padding-right: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.page-guidelines .mini-board .user button {
    width: 100%;
    background-color: transparent;
    color: var(--color-on-background);
    border: none;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 1.1rem;
    text-align: start;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-guidelines .mini-board .user button:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.page-guidelines .mini-board .user.active button {
    background: linear-gradient(135deg, var(--color-primary), #ff6b00);
    color: var(--color-on-primary);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.page-guidelines .view-all-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-on-background);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
    margin-top: auto;
    border: 1px solid var(--color-surface-border);
}

.page-guidelines .view-all-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Player Profile Section */
.page-guidelines .player-profile .profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-guidelines .player-profile .close-btn {
    background: transparent;
    border: none;
    color: var(--color-on-background);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.page-guidelines .player-profile .close-btn:hover {
    opacity: 1;
}

.page-guidelines .player-profile .player-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-guidelines .player-profile .player-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0.8;
}

.page-guidelines .player-profile .scores {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-guidelines .player-profile .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.page-guidelines .player-profile .table .rank {
    width: 3rem;
    opacity: 0.6;
}

.page-guidelines .player-profile .table .score {
    text-align: right;
    color: var(--color-primary);
    font-weight: 700;
}

/* Animations */
.slide-enter-active,
.slide-leave-active {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.slide-enter-from,
.slide-leave-to {
    opacity: 0;
    transform: scale(0.98) translateY(5px);
    width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-width: 0 !important;
}

/* Requirements Section Overlay */
.page-guidelines .requirements-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.page-guidelines .requirements-content .group h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px currentColor;
}

.page-guidelines .requirements-content ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-guidelines .requirements-content li {
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
    opacity: 0.9;
}

.page-guidelines .requirements-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

@media (max-width: 1200px) {
    .page-guidelines.has-selected {
        grid-template-columns: 1fr 1fr;
    }

    .page-guidelines.has-selected .requirements {
        display: none;
    }
}

@media (max-width: 900px) {

    .page-guidelines,
    .page-guidelines.has-selected {
        grid-template-columns: 1fr;
    }
}