/* ================================
   CALL THE LIAR - PAGE WRAPPER
================================ */
.call-liar-page {
    width: 100%;
    max-width: 920px;
    margin: 14px auto;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #f3f3f3;
}

.call-liar-page * {
    box-sizing: border-box;
}

.call-liar-header,
.call-liar-status-bar,
.call-liar-board,
.call-liar-rules-box,
.call-liar-message-box {
    background: linear-gradient(180deg, rgba(31, 31, 48, 0.98), rgba(18, 18, 29, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

/* ================================
   HEADER
================================ */
.call-liar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
}

.call-liar-header h1 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.05;
    color: #ffffff;
}

.call-liar-subtext {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #d7d7e8;
    max-width: 520px;
}

.call-liar-entry-box {
    min-width: 170px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.04);
    color: #f2f2fb;
}

/* ================================
   STATUS BAR
================================ */
.call-liar-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
}

.status-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #f4f4ff;
}

/* ================================
   BOARD
================================ */
.call-liar-board {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ================================
   OPPONENT ROW
================================ */
.call-liar-opponents {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.opponent-seat {
    padding: 10px 10px;
    border-radius: 14px;
    min-height: 112px;
    text-align: center;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.opponent-seat.active-turn {
    border-color: rgba(255, 215, 120, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 215, 120, 0.12);
}

.opponent-seat.called-out {
    border-color: rgba(255, 130, 130, 0.75);
    box-shadow: 0 0 0 2px rgba(255, 130, 130, 0.12);
}

.opponent-avatar-wrap {
    width: 74px;
    height: 74px;
    margin: 0 auto 6px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.opponent-avatar {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.opponent-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #ffffff;
}

.opponent-meta {
    font-size: 12px;
    line-height: 1.25;
    color: #d7d7e8;
}

/* ================================
   CENTER AREA
================================ */
.call-liar-center {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 12px;
}

.pile-area,
.last-action-box {
    padding: 12px 14px;
    border-radius: 14px;
    min-height: 128px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pile-title,
.last-action-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.pile-visual {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.pile-stack {
    width: 42px;
    height: 62px;
    border-radius: 10px;
    position: relative;
    background: linear-gradient(180deg, #f3f3f8, #cfcfda);
    box-shadow:
        0 8px 14px rgba(0, 0, 0, 0.22),
        -6px 6px 0 rgba(255, 255, 255, 0.07),
        -12px 12px 0 rgba(255, 255, 255, 0.03);
}

.pile-text {
    text-align: center;
    font-size: 13px;
    color: #e5e5f0;
}

#last-action-text {
    font-size: 13px;
    line-height: 1.45;
    color: #d8d8e8;
}

/* ================================
   PLAYER AREA
================================ */
.call-liar-player-area {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: stretch;
}

.player-info-card,
.player-hand-panel {
    background: linear-gradient(180deg, rgba(40, 40, 58, 0.98), rgba(20, 20, 31, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 14px;
    border-radius: 14px;
}

.player-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.player-avatar-wrap {
    width: 82px;
    height: 82px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.player-name {
    font-size: 17px;
    margin-bottom: 4px;
    font-weight: 700;
    color: #ffffff;
}

.player-meta {
    font-size: 12px;
    line-height: 1.3;
    color: #d4d4e6;
    margin-bottom: 3px;
}

.player-hand-header h3 {
    margin: 0 0 3px;
    font-size: 16px;
    color: #ffffff;
}

.player-hand-header p {
    margin: 0 0 10px;
    color: #ccccdd;
    font-size: 12px;
}

/* ================================
   PLAYER HAND
================================ */
.player-hand {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 96px;
    padding: 4px 0 2px;
}

.hand-empty {
    width: 100%;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    text-align: center;
    color: #bfbfd2;
    font-size: 13px;
}

.liar-card {
    width: 68px;
    height: 96px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8f8fc, #ddddea);
    color: #1a1a22;
    padding: 8px;
    position: relative;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.liar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.liar-card.selected {
    transform: translateY(-6px);
    border-color: #ffd778;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
}

.liar-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.liar-card-rank-top,
.liar-card-rank-bottom {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.liar-card-rank-bottom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    transform: rotate(180deg);
}

.liar-card-suit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 700;
}

.liar-card.back {
    background: linear-gradient(180deg, #5d4a8b, #372850);
    color: #f8f5ff;
}

/* ================================
   BUTTONS
================================ */
.player-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.liar-btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 9px 12px;
    min-height: 36px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: #3f4257;
    color: #ffffff;
    transition: transform 0.12s ease, opacity 0.12s ease, filter 0.12s ease;
}

.liar-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.liar-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.liar-btn-primary {
    background: linear-gradient(180deg, #7f68c7, #5d4a9f);
}

.liar-btn-danger {
    background: linear-gradient(180deg, #cb5d6f, #9f3347);
}

.liar-btn-muted {
    background: linear-gradient(180deg, #5f647a, #43485c);
}

/* ================================
   RULES / MESSAGE BOX
================================ */
.call-liar-rules-box {
    padding: 14px 16px;
}

.call-liar-rules-box h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #ffffff;
}

.call-liar-rules-box ul {
    margin: 0;
    padding-left: 18px;
    color: #d6d6e6;
    line-height: 1.55;
    font-size: 13px;
}

.call-liar-rules-box li {
    margin-bottom: 5px;
}

.call-liar-message-box {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #ffffff;
}

.call-liar-message-box.success {
    border-color: rgba(101, 207, 137, 0.45);
    background: rgba(32, 82, 48, 0.92);
}

.call-liar-message-box.error {
    border-color: rgba(230, 103, 103, 0.45);
    background: rgba(96, 32, 32, 0.92);
}

.call-liar-message-box.info {
    border-color: rgba(115, 155, 240, 0.45);
    background: rgba(34, 49, 88, 0.92);
}

/* ================================
   HELPERS / STATE
================================ */
.is-hidden {
    display: none !important;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 980px) {
    .call-liar-center,
    .call-liar-player-area {
        grid-template-columns: 1fr;
    }

    .player-info-card {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        text-align: left;
    }

    .player-avatar-wrap {
        margin-bottom: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 820px) {
    .call-liar-header {
        flex-direction: column;
    }

    .call-liar-entry-box {
        width: 100%;
        min-width: 0;
    }

    .call-liar-opponents {
        grid-template-columns: 1fr;
    }

    .opponent-seat {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .call-liar-page {
        gap: 10px;
        margin: 10px auto;
    }

    .call-liar-header,
    .call-liar-board,
    .call-liar-rules-box {
        padding: 12px;
    }

    .call-liar-header h1 {
        font-size: 21px;
    }

    .player-controls {
        flex-direction: column;
    }

    .liar-btn {
        width: 100%;
    }

    .liar-card {
        width: 60px;
        height: 88px;
    }
}