@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Outfit:wght@300;400;500;600;700;800;900&display=swap");@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Press+Start+2P&display=swap');

body.amopi-game-active .amopi-floating-logo {
    display: none !important;
}

/* Main game container styles */

.bombamopi-container {
    position: relative;
    z-index: 1;
    font-family: "Courier New", monospace;
    background-color: #030303;
    color: #00ff41;
    overflow: hidden;
    height: calc(100dvh - 32px);
    min-height: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.bombamopi-container.is-window-expanded {
    position: fixed;
    inset: 0;
    z-index: 10050;
    height: 100dvh;
    border-radius: 0;
    border: none;
}

.bomb-floating {
    filter: none;
    animation: none !important;
}

.bomba-lobby-bomb-wrap,
.bomba-game-bomb-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.bomba-lobby-bomb-wrap {
    width: 330px;
    height: 260px;
}

.bomba-game-bomb-wrap {
    width: 210px;
    height: 210px;
}

.bomba-turn-orbit {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: 999px;
}

.bomba-turn-orbit-cue {
    position: absolute;
    left: 50%;
    top: -22px;
    width: 36px;
    height: 52px;
    transform: translateX(-50%);
    clip-path: polygon(
        50% 0%,
        100% 38%,
        68% 38%,
        68% 100%,
        32% 100%,
        32% 38%,
        0% 38%
    );
    background: linear-gradient(180deg, rgba(255, 241, 118, 0.98), rgba(250, 204, 21, 0.92) 45%, rgba(245, 158, 11, 0));
    box-shadow:
        0 0 18px rgba(250, 204, 21, 0.52),
        0 0 34px rgba(245, 158, 11, 0.18);
    opacity: 0.94;
    animation: bombaOrbitCueFlow 1.8s ease-in-out infinite;
}

.bomba-turn-orbit-cue::before {
    content: none;
}

.bomba-real-bomb {
    position: relative;
    width: 250px;
    height: 250px;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
    overflow: visible;
}

.bomba-bomb-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

.bomba-real-bomb::before,
.bomba-real-bomb::after {
    content: none;
}

.bomba-real-bomb-shine {
    display: none;
}

.bomba-real-bomb-ring {
    display: none;
}

.bomba-game-bomb {
    width: 170px;
    height: 170px;
    z-index: 2;
}

.bomba-game-bomb.is-critical {
    animation: bombaCriticalShake 0.18s infinite;
    background: transparent;
    box-shadow: none;
}

.bomba-game-bomb .bomba-bomb-image {
    filter:
        sepia(calc(var(--danger-ratio, 0) * 0.8))
        saturate(calc(1 + var(--danger-ratio, 0) * 2.4))
        hue-rotate(calc(var(--danger-ratio, 0) * -28deg))
        brightness(calc(1 + var(--danger-ratio, 0) * 0.12));
    transition: filter 0.2s linear;
}

.bomba-game-bomb.is-critical .bomba-bomb-image {
    filter:
        sepia(0.95)
        saturate(3.8)
        hue-rotate(-36deg)
        brightness(1.14)
        drop-shadow(0 0 18px rgba(239, 68, 68, 0.55));
}

.bomba-bomb-syllable {
    position: absolute;
    left: 46%;
    top: 55%;
    width: 54%;
    height: 34%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #42fff0;
    font-size: 1.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.72);
    z-index: 8;
    pointer-events: none;
}

.bomba-timer-pill {
    margin-top: 12px;
    min-width: 64px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(4, 14, 25, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.bomba-timer-pill.is-critical {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.38);
    background: rgba(127, 29, 29, 0.35);
    animation: bombaTimerPulse 0.45s infinite;
}

.bomba-hidden-pressure-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #42fff0;
    box-shadow: 0 0 12px rgba(66, 255, 240, 0.62);
    animation: bombaPressurePulse 1.1s ease-in-out infinite;
}

.bomba-hidden-pressure-dot.is-critical {
    background: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.78);
    animation-duration: 0.32s;
}

.bomb-fuse-animated {
    position: absolute;
    top: 13%;
    right: 21%;
    width: 96px;
    height: 92px;
    z-index: 12;
    pointer-events: none;
    overflow: visible;
    transform: none;
}

.bomba-game-bomb-wrap .bomb-fuse-animated {
    top: 13.5%;
    right: 14%;
    width: 82px;
    height: 80px;
}

.bomb-fuse-cord {
    display: none;
}

.bomb-fuse-spark {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 42px;
    transform-origin: 50% 50%;
    background: #f59e0b;
    clip-path: polygon(
        50% 0%,
        59% 31%,
        88% 14%,
        69% 43%,
        100% 50%,
        69% 57%,
        88% 86%,
        59% 69%,
        50% 100%,
        41% 69%,
        12% 86%,
        31% 57%,
        0% 50%,
        31% 43%,
        12% 14%,
        41% 31%
    );
    box-shadow:
        0 0 12px rgba(245, 158, 11, 0.45);
    animation: fuseStarSpark var(--fuse-speed, 0.42s) infinite steps(2, end);
}

.bomb-fuse-spark-core {
    position: absolute;
    left: 15px;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff8c7;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.75);
}

@keyframes fuseStarSpark {
    0% {
        transform: rotate(-16deg) scale(0.9);
        filter: brightness(0.9);
    }
    50% {
        transform: rotate(13deg) scale(1.2);
        filter: brightness(1.28);
    }
    100% {
        transform: rotate(-7deg) scale(1);
        filter: brightness(1);
    }
}

.bomba-main {
    background: radial-gradient(circle at center, #1a1a1a 0%, #030303 100%);
}

.bomba-tab-button.is-active {
    background: #00ff41 !important;
    color: #000 !important;
    font-weight: 900;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4) !important;
}

.bombamopi-container-full {
    overflow: hidden;
    height: calc(100dvh - 32px);
    min-height: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.bomba-main {
    min-width: 0;
    max-width: 100%;
}

/* Bomb Logo */

.bomb-logo-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bomb-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 214, 201, 0.3));
}

@keyframes bomb-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.bombamopi-container header {
    min-height: 86px;
}

.bombamopi-container main {
    min-height: 0;
}

.bomba-tabs {
    background: rgba(3, 8, 18, 0.78) !important;
}

.bomba-tab-button {
    min-height: 38px;
    padding: 9px 7px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.88) !important;
    text-shadow: none !important;
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-size: 8.5px !important;
    min-width: 0;
}

.bomba-tab-button svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.bomba-tab-button.is-active {
    background: linear-gradient(180deg, #42fff0, #00d6c9) !important;
    color: #03131f !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 8px 18px rgba(0, 214, 201, 0.24) !important;
}

.bomba-side-panel {
    width: 380px !important;
    flex: 0 0 380px !important;
    background: rgba(5, 13, 26, 0.92) !important;
}

.bomba-header-spacer {
    width: 148px;
    flex: 0 0 148px;
}

.bomba-header-back-button {
    min-height: 42px;
    padding: 0 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
        rgba(4, 14, 25, 0.86);
    color: rgba(255, 255, 255, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 950;
    white-space: nowrap;
}

.bomba-header-back-button:hover {
    color: #ffffff;
    border-color: rgba(0, 214, 201, 0.42);
    background:
        linear-gradient(180deg, rgba(0, 214, 201, 0.18), rgba(0, 214, 201, 0.06)),
        rgba(4, 14, 25, 0.96);
}

.bombamopi-container input {
    background: rgba(3, 8, 18, 0.82) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

.bombamopi-container input::placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
}

.bomba-header-tool {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
        rgba(4, 14, 25, 0.86);
    color: rgba(255, 255, 255, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 8px 18px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background-color 0.16s ease,
        color 0.16s ease;
}

.bomba-header-tool:hover {
    transform: translateY(-1px);
    color: #ffffff;
    border-color: rgba(0, 214, 201, 0.42);
    background:
        linear-gradient(180deg, rgba(0, 214, 201, 0.18), rgba(0, 214, 201, 0.06)),
        rgba(4, 14, 25, 0.96);
}

.bombamopi-container button:not(:disabled) {
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

.bombamopi-container button:not(:disabled):hover {
    transform: translateY(-1px);
}

.bombamopi-container button:not(:disabled):active,
.button-pressable:not(:disabled):active {
    animation: bombaButtonPress 0.2s ease-out;
}

.bomba-title-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 214, 201, 0.5));
}

.bomba-room-count {
    margin-top: -10px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bomba-room-live-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(250, 204, 21, 0.22);
    background: rgba(250, 204, 21, 0.08);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
}

.bomba-room-live-status.is-compact {
    max-width: 330px;
    margin-top: 2px;
}

.bomba-room-live-status strong,
.bomba-room-live-status span {
    display: block;
}

.bomba-room-live-status strong {
    color: #fde047;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bomba-room-live-status span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.66rem;
    font-weight: 800;
}

.bomba-room-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #facc15;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.72);
    animation: bombaLiveDot 1.35s ease-in-out infinite;
    flex-shrink: 0;
}

.bomba-leave-btn {
    margin-top: -8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.bomba-leave-btn:hover {
    color: #ffffff;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
}

.game-join-btn.is-waiting {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-join-btn.is-primary-join {
    min-width: 290px;
    min-height: 58px;
    border: 1px solid rgba(135, 255, 247, 0.62) !important;
    border-radius: 16px !important;
    color: #04131f !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(130, 223, 232, 0.96) 48%, rgba(38, 177, 180, 0.98) 100%) !important;
    box-shadow:
        0 7px 0 rgba(0, 87, 91, 0.95),
        0 18px 34px rgba(0, 214, 201, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -10px 18px rgba(0, 64, 76, 0.18) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42) !important;
    letter-spacing: 0.12em !important;
}

.game-join-btn.is-primary-join::before {
    content: "";
    position: absolute;
    inset: 5px 7px auto 7px;
    height: 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.game-join-btn.is-primary-join:hover {
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow:
        0 8px 0 rgba(0, 87, 91, 0.95),
        0 22px 42px rgba(0, 214, 201, 0.26),
        0 0 0 4px rgba(0, 214, 201, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -10px 18px rgba(0, 64, 76, 0.18) !important;
}

.game-join-btn.is-primary-join:active {
    box-shadow:
        0 3px 0 rgba(0, 87, 91, 0.95),
        0 10px 24px rgba(0, 214, 201, 0.18),
        inset 0 2px 8px rgba(0, 64, 76, 0.2) !important;
}

.game-join-icon {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #051522;
    background: rgba(3, 19, 31, 0.12);
    border: none;
}

.game-join-btn.is-primary-join > :not(.game-join-icon) {
    position: relative;
    z-index: 1;
}

.game-join-btn.is-waiting::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    transform: translateX(-120%);
    animation: bombaWaitingSheen 2.4s ease-in-out infinite;
    pointer-events: none;
}

.bomba-player-node {
    min-width: 132px;
    padding: 8px 10px 9px;
    border-radius: 18px;
    background: rgba(4, 12, 24, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.bomba-player-node.is-active {
    border-color: rgba(250, 204, 21, 0.62);
    background:
        linear-gradient(180deg, rgba(250, 204, 21, 0.12), rgba(4, 12, 24, 0.72));
    box-shadow:
        0 0 0 2px rgba(250, 204, 21, 0.16),
        0 0 24px rgba(250, 204, 21, 0.22),
        0 16px 28px rgba(0, 0, 0, 0.26);
}

.bomba-player-node.is-eliminated {
    opacity: 1;
    border-color: rgba(239, 68, 68, 0.9);
    box-shadow:
        0 0 0 2px rgba(239, 68, 68, 0.28),
        0 0 26px rgba(239, 68, 68, 0.22),
        0 16px 28px rgba(0, 0, 0, 0.3);
}

.bomba-player-node.is-eliminated .bomba-player-avatar,
.bomba-player-node.is-eliminated .bomba-player-name,
.bomba-player-node.is-eliminated .bomba-player-lives {
    filter: blur(1.6px) grayscale(1) brightness(0.62);
}

.bomba-player-node.is-eliminated .bomba-player-visual::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 18px;
    background: rgba(127, 29, 29, 0.22);
    z-index: 3;
    pointer-events: none;
}

.bomba-player-node.is-eliminated .bomba-player-avatar {
    border-color: rgba(239, 68, 68, 0.86);
    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.18),
        0 0 22px rgba(239, 68, 68, 0.24);
}

.bomba-player-ko-mark {
    position: absolute;
    inset: -10px;
    z-index: 8;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #fecaca;
    background: rgba(185, 28, 28, 0.82);
    border: 2px solid rgba(254, 202, 202, 0.72);
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.18),
        0 0 28px rgba(239, 68, 68, 0.45);
    backdrop-filter: blur(3px);
}

.bomba-player-node.is-hit-shaking {
    animation: bombaPlayerHitShake 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: rgba(239, 68, 68, 0.72);
    box-shadow:
        0 0 0 2px rgba(239, 68, 68, 0.24),
        0 0 28px rgba(239, 68, 68, 0.35),
        0 16px 28px rgba(0, 0, 0, 0.26);
}

.bomba-player-avatar {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 0 0 3px rgba(0, 214, 201, 0.12),
        0 10px 18px rgba(0, 0, 0, 0.24);
}

.bomba-player-node.is-active .bomba-player-avatar {
    border-color: #fff7ad;
    box-shadow:
        0 0 0 4px rgba(250, 204, 21, 0.22),
        0 12px 20px rgba(0, 0, 0, 0.28);
}

.bomba-player-name {
    width: 100%;
    max-width: 150px;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.58);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 9px;
    font-weight: 950;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.bomba-live-word {
    max-width: 132px;
    margin-top: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0, 214, 201, 0.18);
    border: 1px solid rgba(66, 255, 240, 0.34);
    color: #42fff0;
    font-family: "Courier New", monospace;
    font-size: 0.64rem;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 0 14px rgba(0, 214, 201, 0.2);
}

.bomba-live-word.is-invalid {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.46);
    color: #ff5f5f;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.2);
}

.bomba-player-node.is-active .bomba-player-name {
    background: #facc15;
    color: #1f1600;
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.26);
}

.bomba-player-lives {
    gap: 5px;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.44);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bomba-player-lives svg {
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.35));
}

.bomba-chat-score-split {
    display: grid;
    grid-template-rows: 1fr 1fr;
    min-height: 0;
}

.bomba-chat-only {
    display: flex;
    min-height: 0;
}

.bomba-score-half,
.bomba-history-panel,
.bomba-history-half,
.bomba-chat-half {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.bomba-score-half {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bomba-chat-only .bomba-chat-half {
    flex: 1;
}

.bomba-panel-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.7rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bomba-panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bomba-chat-half.is-chat-content .bomba-panel-scroll {
    justify-content: flex-end;
}

.bomba-system-message {
    max-width: 94%;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.62rem;
    font-weight: 800;
    font-style: italic;
    line-height: 1.25;
    text-align: center;
}

.bomba-system-message.is-danger {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.38);
    border-color: rgba(239, 68, 68, 0.38);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.14);
}

.bomba-system-message.is-start {
    color: #bffcff;
    background: rgba(0, 214, 201, 0.14);
    border-color: rgba(66, 255, 240, 0.34);
    box-shadow: 0 0 18px rgba(0, 214, 201, 0.12);
}

.bomba-poat-panel {
    display: flex;
    min-height: 0;
}

.bomba-poat-panel .bomba-panel-scroll {
    justify-content: flex-start;
}

.bomba-poat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bomba-poat-hero {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr 0.92fr;
    align-items: end;
    gap: 7px;
    padding: 8px 2px 2px;
}

.bomba-poat-card {
    position: relative;
    min-width: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 58%),
        rgba(255, 255, 255, 0.055);
    padding: 23px 7px 10px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bomba-poat-card.is-first {
    min-height: 168px;
    border-color: rgba(250, 204, 21, 0.52);
    background:
        radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.34), transparent 60%),
        linear-gradient(180deg, rgba(250, 204, 21, 0.16), rgba(0, 214, 201, 0.05)),
        rgba(255, 255, 255, 0.055);
    box-shadow: 0 0 24px rgba(250, 204, 21, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.bomba-poat-card.is-second {
    min-height: 145px;
    border-color: rgba(203, 213, 225, 0.42);
}

.bomba-poat-card.is-third {
    min-height: 135px;
    border-color: rgba(251, 146, 60, 0.42);
}

.bomba-poat-medal {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(7, 15, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.92rem;
}

.bomba-poat-card-avatar {
    width: 46px;
    height: 46px;
    margin: 0 auto 7px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(7, 27, 47, 0.9);
}

.bomba-poat-card.is-first .bomba-poat-card-avatar {
    width: 58px;
    height: 58px;
    border-color: rgba(250, 204, 21, 0.75);
}

.bomba-poat-card-rank {
    color: #42fff0;
    font-size: 0.66rem;
    font-weight: 950;
    line-height: 1;
}

.bomba-poat-card-name {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1.08;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bomba-poat-card-wins {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.55rem;
    font-weight: 900;
}

.bomba-poat-card-stats {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 7px;
}

.bomba-poat-card-stats span {
    border-radius: 999px;
    padding: 3px 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.48rem;
    font-weight: 950;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.25);
}

.bomba-poat-rest {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bomba-poat-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.045);
}

.bomba-poat-row.is-medal {
    background:
        linear-gradient(180deg, rgba(250, 204, 21, 0.08), rgba(255, 255, 255, 0.04)),
        rgba(255, 255, 255, 0.045);
}

.bomba-poat-rank {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 950;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.28);
}

.bomba-poat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(7, 27, 47, 0.9);
    flex-shrink: 0;
}

.bomba-poat-main {
    min-width: 0;
    flex: 1;
}

.bomba-poat-name {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.75rem;
    font-weight: 950;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bomba-poat-meta {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.2;
}

.bomba-poat-stat {
    width: 42px;
    text-align: right;
    flex-shrink: 0;
}

.bomba-poat-stat span,
.bomba-poat-stat small {
    display: block;
}

.bomba-poat-stat span {
    color: #42fff0;
    font-size: 0.78rem;
    font-weight: 950;
}

.bomba-poat-stat small {
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.5rem;
    font-weight: 900;
    text-transform: uppercase;
}

.bomba-chat-form {
    position: relative;
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.bomba-emoji-wrap {
    position: relative;
}

.bomba-emoji-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bomba-emoji-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: 280px;
    max-width: calc(100vw - 32px);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 31, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
    z-index: 30;
}

.bomba-emoji-search {
    width: 100%;
    border-radius: 10px !important;
    padding: 8px 10px !important;
    font-size: 0.76rem !important;
    margin-bottom: 8px;
}

.bomba-emoji-cats {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    margin-bottom: 8px;
}

.bomba-emoji-cats button {
    white-space: nowrap;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.65rem;
    font-weight: 800;
}

.bomba-emoji-cats button.is-active {
    background: rgba(0, 214, 201, 0.18);
    color: #42fff0;
    border-color: rgba(0, 214, 201, 0.32);
}

.bomba-emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-height: 158px;
    overflow-y: auto;
}

.bomba-emoji-grid button {
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 1.25rem;
}

.bomba-emoji-grid button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bomba-emoji-empty {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.36);
    font-size: 0.75rem;
    text-align: center;
    padding: 18px 0;
}

@keyframes bombaButtonPress {
    0% { transform: translateY(-1px) scale(1); }
    45% { transform: translateY(2px) scale(0.96); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes bombaArrowBounce {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(90deg); opacity: 0.72; }
    50% { transform: translateX(-50%) translateY(-7px) rotate(90deg); opacity: 1; }
}

@keyframes bombaActiveMarkerPulse {
    0%, 100% {
        opacity: 0.72;
        filter:
            drop-shadow(0 5px 0 rgba(0, 0, 0, 0.28))
            drop-shadow(0 0 12px rgba(250, 204, 21, 0.48));
    }
    50% {
        opacity: 1;
        filter:
            drop-shadow(0 5px 0 rgba(0, 0, 0, 0.34))
            drop-shadow(0 0 22px rgba(250, 204, 21, 0.86));
    }
}

@keyframes bombaOrbitCueFlow {
    0%, 100% {
        opacity: 0.68;
    }
    50% {
        opacity: 1;
    }
}

@keyframes bombaCriticalShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
}

@keyframes bombaTimerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes bombaPressurePulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.58;
    }
    50% {
        transform: scale(1.18);
        opacity: 1;
    }
}

@keyframes bombaWaitingSheen {
    0%, 45% { transform: translateX(-120%); }
    75%, 100% { transform: translateX(120%); }
}

.bomba-header-tool:active {
    transform: translateY(1px);
}

.bomba-header-tool.is-active {
    color: #00d6c9;
    border-color: rgba(0, 214, 201, 0.36);
}

.bomba-header-tool.is-muted {
    color: #fb7185;
    border-color: rgba(251, 113, 133, 0.3);
}

.bombamopi-container.is-mobile {
    height: calc(100dvh - 108px);
    border-radius: 16px;
    flex-direction: column;
    touch-action: manipulation;
}

.bombamopi-container.is-mobile.is-window-expanded {
    height: 100dvh;
    border-radius: 0;
}

.bombamopi-container.is-mobile header {
    min-height: 58px;
    padding: 8px 10px !important;
    gap: 8px;
}

.bombamopi-container.is-mobile .bomba-header-back-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0 10px !important;
    font-size: 0;
}

.bombamopi-container.is-mobile .bomba-header-back-button svg {
    width: 18px;
    height: 18px;
}

.bombamopi-container.is-mobile .bomba-header-spacer {
    width: 42px;
    flex-basis: 42px;
}

.bombamopi-container.is-mobile h1 {
    font-size: 1rem !important;
    line-height: 1;
}

.bombamopi-container.is-mobile .bomba-title-logo {
    width: 18px;
    height: 18px;
}

.bombamopi-container.is-mobile .bomba-header-tool {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.bombamopi-container.is-mobile header .w-10.h-10 {
    display: none;
}

.bombamopi-container.is-mobile .bomba-main {
    min-height: 0;
    flex: 1 1 auto;
    width: 100%;
}

.bombamopi-container.is-mobile main {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.bombamopi-container.is-mobile .bomba-play-layout {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    gap: 8px;
}

.bombamopi-container.is-mobile .bomba-board-stage {
    min-height: 310px;
    align-items: center;
    overflow: visible;
}

.bombamopi-container.is-mobile .bomba-board {
    width: min(100%, 340px);
    max-width: 340px !important;
    margin-top: 6px;
}

.bombamopi-container.is-mobile .bomba-game-bomb-wrap {
    width: 132px;
    height: 132px;
}

.bombamopi-container.is-mobile .bomba-game-bomb {
    width: 112px;
    height: 112px;
}

.bombamopi-container.is-mobile .bomba-bomb-syllable {
    font-size: 1.08rem;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
}

.bombamopi-container.is-mobile .bomba-game-bomb-wrap .bomb-fuse-animated {
    top: 12%;
    right: 12%;
    width: 52px;
    height: 52px;
}

.bombamopi-container.is-mobile .bomb-fuse-spark {
    width: 28px;
    height: 28px;
}

.bombamopi-container.is-mobile .bomb-fuse-spark-core {
    left: 10px;
    top: 10px;
    width: 8px;
    height: 8px;
}

.bombamopi-container.is-mobile .bomba-turn-orbit-cue {
    top: -16px;
    width: 26px;
    height: 38px;
}

.bombamopi-container.is-mobile .bomba-player-node {
    min-width: 72px;
    max-width: 88px;
    padding: 5px 5px 6px;
    border-radius: 12px;
}

.bombamopi-container.is-mobile .bomba-player-avatar {
    width: 38px;
    height: 38px;
    border-width: 2px;
}

.bombamopi-container.is-mobile .bomba-player-name {
    max-width: 78px;
    margin-top: 4px;
    padding: 3px 5px;
    border-radius: 8px;
    font-size: 7px;
    line-height: 1.05;
}

.bombamopi-container.is-mobile .bomba-player-lives {
    gap: 1px;
    margin-top: 4px;
    padding: 3px 4px;
}

.bombamopi-container.is-mobile .bomba-player-lives svg {
    width: 10px;
    height: 10px;
}

.bombamopi-container.is-mobile .bomba-live-word {
    max-width: 82px;
    margin-top: 4px;
    padding: 3px 6px;
    font-size: 0.5rem;
}

.bombamopi-container.is-mobile .bomba-word-entry {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.bombamopi-container.is-mobile .bomba-word-entry input {
    min-height: 54px;
    padding: 12px 44px 12px 14px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
    letter-spacing: 0.06em !important;
}

.bombamopi-container.is-mobile .bomba-word-entry input::placeholder {
    font-size: 0.76rem !important;
}

.bombamopi-container.is-mobile .bomba-side-panel {
    width: 100% !important;
    height: 190px !important;
    flex: 0 0 190px;
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bombamopi-container.is-mobile .bomba-tabs {
    padding: 6px !important;
}

.bombamopi-container.is-mobile .bomba-tab-button {
    min-height: 34px;
    font-size: 8px !important;
}

.bombamopi-container.is-mobile .bomba-score-half,
.bombamopi-container.is-mobile .bomba-history-panel,
.bombamopi-container.is-mobile .bomba-history-half,
.bombamopi-container.is-mobile .bomba-chat-half {
    padding: 8px;
}

.bombamopi-container.is-mobile .bomba-chat-score-split {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.bombamopi-container.is-mobile .bomba-score-half {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.bombamopi-container.is-mobile .bomba-panel-section-title {
    margin-bottom: 6px;
    font-size: 0.58rem;
}

.bombamopi-container.is-mobile .bomba-panel-scroll {
    gap: 6px;
}

.bombamopi-container.is-mobile .bomba-chat-form {
    gap: 6px;
    margin-top: 6px;
}

.bombamopi-container.is-mobile .bomba-chat-form input {
    min-height: 38px;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
}

.bombamopi-container.is-mobile .bomba-emoji-btn,
.bombamopi-container.is-mobile .bomba-chat-form button[type="submit"] {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    flex-shrink: 0;
}

.bombamopi-container.is-mobile .bomba-emoji-picker {
    left: 0;
    bottom: calc(100% + 8px);
    width: min(320px, calc(100vw - 24px));
}

.bombamopi-container.is-mobile .game-join-btn.is-primary-join {
    min-width: 0;
    width: min(100%, 310px);
    min-height: 54px;
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 0.72rem !important;
}

@media (max-width: 430px) {
    .bombamopi-container.is-mobile .bomba-board-stage {
        min-height: 286px;
    }

    .bombamopi-container.is-mobile .bomba-board {
        width: min(100%, 310px);
        max-width: 310px !important;
    }

    .bombamopi-container.is-mobile .bomba-side-panel {
        height: 170px !important;
        flex-basis: 170px;
    }
}

.bomba-connection-loader {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(0, 214, 201, 0.18);
    box-shadow:
        inset 0 0 16px rgba(0, 214, 201, 0.08),
        0 0 22px rgba(0, 214, 201, 0.12);
}

.bomba-connection-loader::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #00d6c9;
    border-right-color: rgba(0, 214, 201, 0.48);
    animation: bombaConnectionSpin 0.8s linear infinite;
}

.bomba-connection-loader span:first-child {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: #00d6c9;
    box-shadow: 0 0 12px rgba(0, 214, 201, 0.72);
    animation: bombaConnectionPulse 1s ease-in-out infinite;
}

.bomba-connection-loader span:last-child {
    position: absolute;
    left: 50%;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.82);
    transform: translateX(-50%);
    animation: bombaConnectionOrbit 0.8s linear infinite;
}

.bomba-loading-dots::after {
    content: "";
    display: inline-block;
    width: 1.5em;
    text-align: left;
    animation: bombaLoadingDots 1.1s steps(4, end) infinite;
}

@keyframes bombaConnectionSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bombaConnectionPulse {
    0%,
    100% {
        transform: scale(0.82);
        opacity: 0.68;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bombaConnectionOrbit {
    to {
        transform: translateX(-50%) rotate(360deg);
        transform-origin: 4px 32px;
    }
}

@keyframes bombaLoadingDots {
    0% {
        content: "";
    }
    25% {
        content: ".";
    }
    50% {
        content: "..";
    }
    75%,
    100% {
        content: "...";
    }
}

/* Scoped utility shim: this project does not ship Tailwind, while this game
   component uses Tailwind-like class names extensively. Keep the shim local. */

.bombamopi-container .fixed {
    position: fixed;
}

.bombamopi-container .absolute {
    position: absolute;
}

.bombamopi-container .relative {
    position: relative;
}

.bombamopi-container .inset-0 {
    inset: 0;
}

.bombamopi-container .top-1\/2 {
    top: 50%;
}

.bombamopi-container .left-1\/2 {
    left: 50%;
}

.bombamopi-container .right-2 {
    right: 0.5rem;
}

.bombamopi-container .right-4 {
    right: 1rem;
}

.bombamopi-container .right-5 {
    right: 1.25rem;
}

.bombamopi-container .top-2 {
    top: 0.5rem;
}

.bombamopi-container .top-4 {
    top: 1rem;
}

.bombamopi-container .top-16 {
    top: 4rem;
}

.bombamopi-container .bottom-2 {
    bottom: 0.5rem;
}

.bombamopi-container .z-0 {
    z-index: 0;
}

.bombamopi-container .z-10 {
    z-index: 10;
}

.bombamopi-container .z-20 {
    z-index: 20;
}

.bombamopi-container .flex {
    display: flex;
}

.bombamopi-container .grid {
    display: grid;
}

.bombamopi-container .hidden {
    display: none;
}

.bombamopi-container .flex-1 {
    flex: 1 1 0%;
    min-width: 0;
}

.bombamopi-container .flex-col {
    flex-direction: column;
}

.bombamopi-container .items-center {
    align-items: center;
}

.bombamopi-container .items-start {
    align-items: flex-start;
}

.bombamopi-container .items-stretch {
    align-items: stretch;
}

.bombamopi-container .justify-center {
    justify-content: center;
}

.bombamopi-container .justify-between {
    justify-content: space-between;
}

.bombamopi-container .justify-end {
    justify-content: flex-end;
}

.bombamopi-container .gap-0\.5 {
    gap: 0.125rem;
}

.bombamopi-container .gap-1 {
    gap: 0.25rem;
}

.bombamopi-container .gap-1\.5 {
    gap: 0.375rem;
}

.bombamopi-container .gap-2 {
    gap: 0.5rem;
}

.bombamopi-container .gap-3 {
    gap: 0.75rem;
}

.bombamopi-container .gap-4 {
    gap: 1rem;
}

.bombamopi-container .gap-6 {
    gap: 1.5rem;
}

.bombamopi-container .gap-8 {
    gap: 2rem;
}

.bombamopi-container .w-full {
    width: 100%;
}

.bombamopi-container .h-full {
    height: 100%;
}

.bombamopi-container .min-h-full {
    min-height: 100%;
}

.bombamopi-container .w-6 {
    width: 1.5rem;
}

.bombamopi-container .h-6 {
    height: 1.5rem;
}

.bombamopi-container .w-8 {
    width: 2rem;
}

.bombamopi-container .h-8 {
    height: 2rem;
}

.bombamopi-container .w-10 {
    width: 2.5rem;
}

.bombamopi-container .h-10 {
    height: 2.5rem;
}

.bombamopi-container .w-14 {
    width: 3.5rem;
}

.bombamopi-container .h-14 {
    height: 3.5rem;
}

.bombamopi-container .w-16 {
    width: 4rem;
}

.bombamopi-container .h-16 {
    height: 4rem;
}

.bombamopi-container .w-20 {
    width: 5rem;
}

.bombamopi-container .h-20 {
    height: 5rem;
}

.bombamopi-container .w-24 {
    width: 6rem;
}

.bombamopi-container .h-24 {
    height: 6rem;
}

.bombamopi-container .w-36 {
    width: 9rem;
}

.bombamopi-container .h-36 {
    height: 9rem;
}

.bombamopi-container .w-80 {
    width: 20rem;
}

.bombamopi-container .max-w-md {
    max-width: 28rem;
}

.bombamopi-container .max-w-xl {
    max-width: 36rem;
}

.bombamopi-container .max-w-\[460px\] {
    max-width: 460px;
}

.bombamopi-container .aspect-square {
    aspect-ratio: 1 / 1;
}

.bombamopi-container .overflow-hidden {
    overflow: hidden;
}

.bombamopi-container .overflow-y-auto {
    overflow-y: auto;
}

.bombamopi-container .overflow-x-auto {
    overflow-x: auto;
}

.bombamopi-container .pointer-events-none {
    pointer-events: none;
}

.bombamopi-container .flex-shrink-0 {
    flex-shrink: 0;
}

.bombamopi-container .object-cover {
    object-fit: cover;
}

.bombamopi-container .object-contain {
    object-fit: contain;
}

.bombamopi-container img.object-cover,
.bombamopi-container img.object-contain {
    display: block;
    width: 100%;
    height: 100%;
}

.bombamopi-container .rounded-full {
    border-radius: 9999px;
}

.bombamopi-container .rounded-lg {
    border-radius: 0.5rem;
}

.bombamopi-container .rounded-xl {
    border-radius: 0.75rem;
}

.bombamopi-container .rounded-2xl {
    border-radius: 1rem;
}

.bombamopi-container .rounded-3xl {
    border-radius: 1.5rem;
}

.bombamopi-container .rounded-tl-none {
    border-top-left-radius: 0;
}

.bombamopi-container .border {
    border-width: 1px;
    border-style: solid;
}

.bombamopi-container .border-2 {
    border-width: 2px;
    border-style: solid;
}

.bombamopi-container .border-b {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bombamopi-container .border-l {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.bombamopi-container .border-white\/5 {
    border-color: rgba(255, 255, 255, 0.05);
}

.bombamopi-container .border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.bombamopi-container .border-white\/15 {
    border-color: rgba(255, 255, 255, 0.15);
}

.bombamopi-container .border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.bombamopi-container .bg-black\/10 {
    background-color: rgba(0, 0, 0, 0.1);
}

.bombamopi-container .bg-black\/20 {
    background-color: rgba(0, 0, 0, 0.2);
}

.bombamopi-container .bg-black\/30 {
    background-color: rgba(0, 0, 0, 0.3);
}

.bombamopi-container .bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.4);
}

.bombamopi-container .bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.05);
}

.bombamopi-container .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.bombamopi-container .bg-\[\#071b2f\] {
    background-color: #071b2f;
}

.bombamopi-container .bg-\[\#071b2f\]\/50 {
    background-color: rgba(7, 27, 47, 0.5);
}

.bombamopi-container .bg-\[\#071b2f\]\/80 {
    background-color: rgba(7, 27, 47, 0.8);
}

.bombamopi-container .bg-\[\#071b2f\]\/90 {
    background-color: rgba(7, 27, 47, 0.9);
}

.bombamopi-container .bg-\[\#071b2f\]\/95 {
    background-color: rgba(7, 27, 47, 0.95);
}

.bombamopi-container .bg-\[\#0b1020\]\/90 {
    background-color: rgba(11, 16, 32, 0.9);
}

.bombamopi-container .bg-red-600 {
    background-color: #dc2626;
}

.bombamopi-container .text-white {
    color: white;
}

.bombamopi-container .text-black {
    color: black;
}

.bombamopi-container .text-white\/20 {
    color: rgba(255, 255, 255, 0.2);
}

.bombamopi-container .text-white\/30 {
    color: rgba(255, 255, 255, 0.3);
}

.bombamopi-container .text-white\/40 {
    color: rgba(255, 255, 255, 0.4);
}

.bombamopi-container .text-white\/50 {
    color: rgba(255, 255, 255, 0.5);
}

.bombamopi-container .text-white\/60 {
    color: rgba(255, 255, 255, 0.6);
}

.bombamopi-container .text-white\/70 {
    color: rgba(255, 255, 255, 0.7);
}

.bombamopi-container .text-white\/90 {
    color: rgba(255, 255, 255, 0.9);
}

.bombamopi-container .text-red-500 {
    color: #ef4444;
}

.bombamopi-container .text-yellow-400 {
    color: #facc15;
}

.bombamopi-container .text-emerald-500 {
    color: #10b981;
}

.bombamopi-container .text-center {
    text-align: center;
}

.bombamopi-container .text-right {
    text-align: right;
}

.bombamopi-container .text-\[8px\] {
    font-size: 8px;
}

.bombamopi-container .text-\[9px\] {
    font-size: 9px;
}

.bombamopi-container .text-\[10px\] {
    font-size: 10px;
}

.bombamopi-container .text-xs {
    font-size: 0.75rem;
}

.bombamopi-container .text-sm {
    font-size: 0.875rem;
}

.bombamopi-container .text-lg {
    font-size: 1.125rem;
}

.bombamopi-container .text-xl {
    font-size: 1.25rem;
}

.bombamopi-container .text-2xl {
    font-size: 1.5rem;
}

.bombamopi-container .text-3xl {
    font-size: 1.875rem;
}

.bombamopi-container .text-4xl {
    font-size: 2.25rem;
}

.bombamopi-container .text-5xl {
    font-size: 3rem;
}

.bombamopi-container .text-7xl {
    font-size: 4.5rem;
}

.bombamopi-container .font-mono {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bombamopi-container .font-semibold {
    font-weight: 600;
}

.bombamopi-container .font-bold {
    font-weight: 700;
}

.bombamopi-container .font-black {
    font-weight: 900;
}

.bombamopi-container .italic {
    font-style: italic;
}

.bombamopi-container .uppercase {
    text-transform: uppercase;
}

.bombamopi-container .tracking-wide {
    letter-spacing: 0.025em;
}

.bombamopi-container .tracking-wider {
    letter-spacing: 0.05em;
}

.bombamopi-container .tracking-widest {
    letter-spacing: 0.1em;
}

.bombamopi-container .tracking-\[0\.2em\] {
    letter-spacing: 0.2em;
}

.bombamopi-container .tracking-\[0\.25em\] {
    letter-spacing: 0.25em;
}

.bombamopi-container .tracking-\[0\.3em\] {
    letter-spacing: 0.3em;
}

.bombamopi-container .tracking-tighter {
    letter-spacing: -0.04em;
}

.bombamopi-container .leading-tight {
    line-height: 1.1;
}

.bombamopi-container .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bombamopi-container .whitespace-nowrap {
    white-space: nowrap;
}

.bombamopi-container .p-1 {
    padding: 0.25rem;
}

.bombamopi-container .p-2 {
    padding: 0.5rem;
}

.bombamopi-container .p-2\.5 {
    padding: 0.625rem;
}

.bombamopi-container .p-3 {
    padding: 0.75rem;
}

.bombamopi-container .p-4 {
    padding: 1rem;
}

.bombamopi-container .p-6 {
    padding: 1.5rem;
}

.bombamopi-container .px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.bombamopi-container .px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.bombamopi-container .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.bombamopi-container .px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.bombamopi-container .px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.bombamopi-container .py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.bombamopi-container .py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.bombamopi-container .py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.bombamopi-container .py-2\.5 {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.bombamopi-container .py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.bombamopi-container .py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.bombamopi-container .py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.bombamopi-container .py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.bombamopi-container .pl-5 {
    padding-left: 1.25rem;
}

.bombamopi-container .pr-1 {
    padding-right: 0.25rem;
}

.bombamopi-container .pr-28 {
    padding-right: 7rem;
}

.bombamopi-container .mt-0\.5 {
    margin-top: 0.125rem;
}

.bombamopi-container .mt-1 {
    margin-top: 0.25rem;
}

.bombamopi-container .mt-2 {
    margin-top: 0.5rem;
}

.bombamopi-container .mt-3 {
    margin-top: 0.75rem;
}

.bombamopi-container .mt-4 {
    margin-top: 1rem;
}

.bombamopi-container .mt-6 {
    margin-top: 1.5rem;
}

.bombamopi-container .mb-0\.5 {
    margin-bottom: 0.125rem;
}

.bombamopi-container .mb-3 {
    margin-bottom: 0.75rem;
}

.bombamopi-container .mb-6 {
    margin-bottom: 1.5rem;
}

.bombamopi-container .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.bombamopi-container .mt-auto {
    margin-top: auto;
}

.bombamopi-container .min-w-0 {
    min-width: 0;
}

.bombamopi-container .shadow-lg {
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.bombamopi-container .shadow-xl {
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
}

.bombamopi-container .shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
}

.bombamopi-container .backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.bombamopi-container .backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.bombamopi-container .cursor-not-allowed {
    cursor: not-allowed;
}

.bombamopi-container .cursor-pointer {
    cursor: pointer;
}

.bombamopi-container .transition-all {
    transition: all 0.2s ease;
}

.bombamopi-container .transition-colors {
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.bombamopi-container .duration-300 {
    transition-duration: 0.3s;
}

.bombamopi-container .transform {
    transform: var(--tw-transform, none);
}

.bombamopi-container .-translate-x-1\/2 {
    --tw-translate-x: -50%;
    transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0))
        scale(var(--tw-scale-x, 1), var(--tw-scale-y, 1));
}

.bombamopi-container .-translate-y-1\/2 {
    --tw-translate-y: -50%;
    transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0))
        scale(var(--tw-scale-x, 1), var(--tw-scale-y, 1));
}

.bombamopi-container .scale-110 {
    --tw-scale-x: 1.1;
    --tw-scale-y: 1.1;
    transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0))
        scale(var(--tw-scale-x, 1), var(--tw-scale-y, 1));
}

.bombamopi-container .-rotate-90 {
    transform: rotate(-90deg);
}

.bombamopi-container input,
.bombamopi-container button,
.bombamopi-container select {
    font: inherit;
}

.bombamopi-container input,
.bombamopi-container select {
    color: white;
}

.bombamopi-container button {
    cursor: pointer;
}

.bombamopi-container button:disabled,
.bombamopi-container input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .bombamopi-container .md\:p-6 {
        padding: 1.5rem;
    }
    .bombamopi-container .md\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .bombamopi-container .md\:text-2xl {
        font-size: 1.5rem;
    }
    .bombamopi-container .md\:text-5xl {
        font-size: 3rem;
    }
    .bombamopi-container .md\:text-\[9px\] {
        font-size: 9px;
    }
}

@media (min-width: 1024px) {
    .bombamopi-container .lg\:flex-row {
        flex-direction: row;
    }
    .bombamopi-container .lg\:w-96 {
        width: 24rem;
    }
    .bombamopi-container .lg\:max-h-none {
        max-height: none;
    }
}

/* Typography styles */

.gaming-font-arcade {
    font-family: "Press Start 2P", monospace;
    font-size: 1.5rem;
}

.gaming-title {
    font-family: "Outfit", sans-serif;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* Neon Glows */

.text-neon-teal {
    color: #00d6c9;
    text-shadow:
        0 0 10px rgba(0, 214, 201, 0.4),
        0 0 20px rgba(0, 214, 201, 0.2);
}

.text-neon-blue {
    color: #0095ff;
    text-shadow:
        0 0 10px rgba(0, 149, 255, 0.4),
        0 0 20px rgba(0, 149, 255, 0.2);
}

.border-neon-teal {
    border-color: #00d6c9;
    box-shadow: 0 0 15px rgba(0, 214, 201, 0.25);
}

.border-neon-blue {
    border-color: #0095ff;
    box-shadow: 0 0 15px rgba(0, 149, 255, 0.25);
}

/* Custom scrollbars */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 214, 201, 0.3);
}

/* Shaking animation when bomb explodes or times out */

@keyframes shake {
    10%,
    90% {
        transform: translate3d(-2px, 0, 0);
    }
    20%,
    80% {
        transform: translate3d(4px, 0, 0);
    }
    30%,
    50%,
    70% {
        transform: translate3d(-6px, 0, 0);
    }
    40%,
    60% {
        transform: translate3d(6px, 0, 0);
    }
}

.shake-screen {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes bombaPlayerHitShake {
    10%, 90% {
        transform: translate(-50%, -50%) translate3d(-2px, 0, 0) rotate(-1deg);
    }
    20%, 80% {
        transform: translate(-50%, -50%) translate3d(4px, 0, 0) rotate(1deg);
    }
    30%, 50%, 70% {
        transform: translate(-50%, -50%) translate3d(-7px, 0, 0) rotate(-2deg);
    }
    40%, 60% {
        transform: translate(-50%, -50%) translate3d(7px, 0, 0) rotate(2deg);
    }
}

/* Glow animation for active player */

@keyframes activePulse {
    0%,
    100% {
        box-shadow: 0 0 15px rgba(0, 214, 201, 0.4);
        border-color: #00d6c9;
    }
    50% {
        box-shadow:
            0 0 30px rgba(0, 214, 201, 0.8),
            0 0 10px rgba(0, 214, 201, 0.4);
        border-color: #ffffff;
    }
}

.active-pulse {
    animation: activePulse 1.5s infinite;
}

/* Floating animation for center bomb */

@keyframes bombFloat {
    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

.bomb-floating {
    animation: none !important;
}

/* Spark particle animation */

@keyframes sparkFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0.2);
        opacity: 0;
    }
}

.spark-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #facc15;
    border-radius: 50%;
    box-shadow: 0 0 8px #eab308;
    pointer-events: none;
    animation: sparkFly 0.6s ease-out forwards;
}

/* Keyboard hint buttons styling */

.kbd-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Guest lobby setup page */

.guest-setup-box {
    background: rgba(7, 27, 47, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
}

/* Lobby Settings UI */

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.setting-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.setting-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    outline: none;
}

.setting-input:focus {
    border-color: #00d6c9;
}

/* Syllable bubble highlight */

.syllable-highlight {
    background: linear-gradient(
        135deg,
        rgba(0, 214, 201, 0.15) 0%,
        rgba(0, 149, 255, 0.15) 100%
    );
    border: 1px solid rgba(0, 214, 201, 0.3);
    box-shadow: 0 0 15px rgba(0, 214, 201, 0.1) inset;
}

/* Circular player layout coordinates container */

.game-circle-area {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Arcade-style join button */

.game-join-btn {
    cursor: pointer;
    min-height: 58px;
    padding: 18px 48px !important;
    font-size: 16px !important;
    line-height: 1.1;
    box-shadow:
        0 7px 0 #004d47,
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.game-join-btn:hover {
    filter: brightness(1.1);
    box-shadow:
        0 6px 0 #004d47,
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.game-join-btn:active {
    box-shadow:
        0 2px 0 #004d47,
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}


:root {
  --font-main: 'Outfit', sans-serif;
  --app-bg-gradient: radial-gradient(circle at top right, #0c756e, #0f172a);

  /* Colors */
  --bg-dark: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.9);
  --border-glass: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-primary: #11A298;
  --accent-secondary: #3b82f6;

  /* Planning Status Colors */
  --color-deplacement: #15803d;
  /* Green */
  --color-conges: #3b82f6;
  /* Blue */
  --color-recup: #ca8a04;
  /* Yellow */
  --color-arret: #ef4444;
  /* Red */
  --color-off: #1e293b;
  /* Grey */

  /* Astreinte Colors */
  --color-a1: #047857;
  /* Emerald */
  --color-a2: #6d28d9;
  /* Violet (Same as AST) */
  --color-a3: #0891b2;
  /* Cyan */
  --color-a4: #d97706;
  /* Amber */

  /* Shadows */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

  /* Sizes */
  --sidebar-width: 260px;
}

@keyframes breath {

  0%,
  100% {
    filter: drop-shadow(0 0 3px rgba(17, 162, 152, 0.05));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 8px rgba(17, 162, 152, 0.15));
    transform: scale(1.01);
  }
}

.logo-animated {
  animation: breath 4s ease-in-out infinite;
}

@keyframes avatarPopupIn {
  from { opacity: 0; transform: scale(0.82) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes avatarPopupOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.82) translateY(16px); }
}

@keyframes timerPopupIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.94); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes timerPopupOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.94); }
}

@keyframes logoPopupIn {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalBackdropOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes bounce-balance {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.animate-bounce-balance {
  animation: bounce-balance 0.3s ease-out;
}

@keyframes modalCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalCardOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(12px) scale(0.97); }
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

button,
input,
select,
textarea {
  font-family: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-main);
  background: var(--app-bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body.amopi-game-mode {
  --font-main: 'Outfit', sans-serif;
  --app-bg-gradient:
    radial-gradient(circle at 18% 12%, rgba(0, 214, 201, 0.28), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(168, 85, 247, 0.28), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(239, 68, 68, 0.18), transparent 35%),
    linear-gradient(135deg, #05000f 0%, #08051f 44%, #03040b 100%);
  --bg-card: rgba(8, 8, 30, 0.9);
  --border-glass: rgba(0, 214, 201, 0.24);
  --text-primary: #f8fbff;
  --text-secondary: #aab4ff;
  --accent-primary: #00d6c9;
  --accent-secondary: #a855f7;
  --arcade-yellow: #facc15;
  --arcade-red: #ff3864;
  --arcade-green: #22ff88;
}

body.amopi-game-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 50%, rgba(0, 0, 0, 0.035) 50%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.32));
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.42;
}

body.amopi-game-mode::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(0, 214, 201, 0.32) 1px, transparent 1px),
    radial-gradient(circle, rgba(250, 204, 21, 0.22) 1px, transparent 1px);
  background-size: 72px 72px, 118px 118px;
  background-position: 0 0, 34px 28px;
  animation: arcadePixelsDrift 18s linear infinite;
  opacity: 0.18;
}

@keyframes arcadePixelsDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-72px, 72px, 0); }
}

body.amopi-game-mode .app-container,
body.amopi-game-mode #root {
  background: var(--app-bg-gradient);
}

body.amopi-game-mode .app-container > aside.glass-card,
body.amopi-game-mode .glass-card,
body.amopi-game-mode .profile-menu-panel,
body.amopi-game-mode .mobile-nav-sheet {
  background:
    linear-gradient(180deg, rgba(18, 7, 44, 0.96), rgba(4, 10, 28, 0.94)) !important;
  border-color: rgba(0, 214, 201, 0.34) !important;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.18),
    0 0 28px rgba(0, 214, 201, 0.12),
    0 22px 58px rgba(0, 0, 0, 0.45) !important;
}

body.amopi-game-mode button,
body.amopi-game-mode .nav-button {
  text-transform: none;
}

body.amopi-game-mode .nav-button,
body.amopi-game-mode button[title="Réglages"],
body.amopi-game-mode button[title="Réduire en icônes"],
body.amopi-game-mode button[title="Afficher les titres"],
body.amopi-game-mode #notifications-toggle-button {
  border: 1px solid rgba(0, 214, 201, 0.26) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.amopi-game-mode .nav-button.active,
body.amopi-game-mode button[title="Réglages"]:hover,
body.amopi-game-mode button[title="Réduire en icônes"]:hover,
body.amopi-game-mode button[title="Afficher les titres"]:hover {
  background: linear-gradient(135deg, #00d6c9, #a855f7) !important;
  color: #05000f !important;
  box-shadow: 0 0 18px rgba(0, 214, 201, 0.32) !important;
}

body.amopi-game-mode .profile-card {
  border-color: rgba(250, 204, 21, 0.28) !important;
}

body.amopi-game-mode input,
body.amopi-game-mode select,
body.amopi-game-mode textarea {
  background: rgba(5, 0, 18, 0.72) !important;
  border-color: rgba(0, 214, 201, 0.28) !important;
  color: #f8fbff !important;
}

body.amopi-game-mode .home-root {
  position: relative;
  isolation: isolate;
}

body.amopi-game-mode .home-root::before {
  content: "AMOPI GAMES";
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  color: rgba(0, 214, 201, 0.08);
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: clamp(2rem, 7vw, 7rem);
  line-height: 1;
  white-space: nowrap;
  z-index: -1;
  text-shadow: 0 0 34px rgba(168, 85, 247, 0.2);
}

body.amopi-game-mode .home-title {
  font-family: "Press Start 2P", "Outfit", sans-serif !important;
  color: #facc15 !important;
  font-size: clamp(1.6rem, 4vw, 3.2rem) !important;
  text-shadow:
    0 0 10px rgba(250, 204, 21, 0.52),
    0 0 28px rgba(239, 68, 68, 0.34),
    4px 4px 0 rgba(168, 85, 247, 0.35);
}

.arcade-insert-coin {
  font-family: "Press Start 2P", "Outfit", sans-serif;
  color: #22ff88;
  font-size: clamp(0.58rem, 1.2vw, 0.78rem);
  letter-spacing: 0;
  text-shadow: 0 0 12px rgba(34, 255, 136, 0.8);
  animation: arcadeBlink 1.2s steps(2, end) infinite;
}

@keyframes arcadeBlink {
  50% { opacity: 0.28; }
}

body.amopi-game-mode .home-subtitle {
  color: #c7d2fe !important;
  font-weight: 800;
}

body.amopi-game-mode .home-cards-grid {
  align-items: stretch;
}

body.amopi-game-mode .home-card {
  position: relative;
  min-height: 310px;
  padding: 92px 24px 28px !important;
  border-radius: 18px 18px 28px 28px !important;
  background:
    linear-gradient(180deg, rgba(20, 12, 56, 0.96) 0 34%, rgba(4, 8, 24, 0.96) 34% 100%) !important;
  border: 2px solid rgba(0, 214, 201, 0.36) !important;
  box-shadow:
    inset 0 18px 0 rgba(255, 255, 255, 0.04),
    inset 0 -12px 0 rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(168, 85, 247, 0.26),
    0 26px 50px rgba(0, 0, 0, 0.38) !important;
  overflow: hidden;
}

body.amopi-game-mode .home-card::before {
  content: attr(data-arcade-title);
  position: absolute;
  left: 18px;
  right: 18px;
  top: 16px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  color: #05000f;
  background: linear-gradient(90deg, #facc15, #ff3864, #a855f7, #00d6c9);
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: 0.56rem;
  line-height: 1.45;
  text-align: center;
  text-shadow: none;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.24);
}

body.amopi-game-mode .home-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 50%, #ff3864 0 8px, transparent 9px),
    radial-gradient(circle at 38% 50%, #facc15 0 8px, transparent 9px),
    linear-gradient(90deg, rgba(0, 214, 201, 0.28), rgba(168, 85, 247, 0.28));
  opacity: 0.72;
}

body.amopi-game-mode .home-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  border-color: rgba(250, 204, 21, 0.82) !important;
  box-shadow:
    0 0 28px rgba(0, 214, 201, 0.28),
    0 0 52px rgba(168, 85, 247, 0.22),
    0 28px 58px rgba(0, 0, 0, 0.46) !important;
}

body.amopi-game-mode .home-card-icon {
  width: 76px !important;
  height: 76px !important;
  border-radius: 999px !important;
  background: radial-gradient(circle, #00d6c9, #12224f 70%) !important;
  box-shadow:
    0 0 24px rgba(0, 214, 201, 0.42),
    inset 0 0 16px rgba(255, 255, 255, 0.16) !important;
}

body.amopi-game-mode .home-card-title {
  color: #ffffff !important;
  font-weight: 950 !important;
  text-shadow: 0 0 10px rgba(0, 214, 201, 0.42);
}

body.amopi-game-mode .home-card-description {
  color: rgba(226, 232, 255, 0.68) !important;
}

.arcade-play-label {
  display: inline-flex;
  margin-top: 14px;
  color: #22ff88;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.amopi-games-home {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100%;
  padding: clamp(22px, 3vw, 42px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 44px);
  overflow: hidden;
}

.amopi-games-home::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(0, 214, 201, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(168, 85, 247, 0.1) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 18%, #000 0 34%, transparent 72%);
  opacity: 0.48;
}

.amopi-games-hero {
  position: relative;
  min-height: clamp(230px, 28vw, 330px);
  border-radius: 26px;
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border: 2px solid rgba(0, 214, 201, 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.22), transparent 28%),
    radial-gradient(circle at 18% 35%, rgba(0, 214, 201, 0.22), transparent 30%),
    radial-gradient(circle at 82% 38%, rgba(168, 85, 247, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(10, 4, 33, 0.92), rgba(4, 8, 24, 0.88));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 40px rgba(0, 214, 201, 0.14),
    0 26px 70px rgba(0, 0, 0, 0.38);
}

.amopi-games-hero::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 22px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00d6c9, #facc15, #ff3864, #a855f7, #00d6c9);
  filter: blur(0.2px);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.3);
}

.amopi-games-hero::after {
  content: "READY PLAYER";
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(34, 255, 136, 0.18);
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: clamp(0.5rem, 1vw, 0.8rem);
}

.amopi-games-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(34, 255, 136, 0.36);
  background: rgba(34, 255, 136, 0.08);
  color: #22ff88;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.amopi-games-hero h1 {
  margin: 22px 0 12px;
  color: #facc15;
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: clamp(1.8rem, 5vw, 4.8rem);
  line-height: 1.08;
  text-shadow:
    0 0 12px rgba(250, 204, 21, 0.72),
    0 0 32px rgba(255, 56, 100, 0.45),
    5px 5px 0 rgba(168, 85, 247, 0.36);
}

.amopi-games-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(237, 242, 255, 0.78);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  font-weight: 800;
  line-height: 1.45;
}

.amopi-games-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.amopi-games-statusbar span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  color: #f8fbff;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(0, 214, 201, 0.24);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.arcade-cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: clamp(18px, 2.4vw, 32px);
}

.arcade-cabinet {
  --cabinet-accent: #00d6c9;
  position: relative;
  min-height: 470px;
  border: 0;
  border-radius: 24px 24px 34px 34px;
  padding: 16px 16px 24px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--cabinet-accent) 14%, transparent), transparent 34%),
    linear-gradient(180deg, #130728 0 72%, #080314 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 -18px 0 rgba(0, 0, 0, 0.34),
    0 24px 54px rgba(0, 0, 0, 0.46),
    0 0 28px color-mix(in srgb, var(--cabinet-accent) 28%, transparent);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.arcade-cabinet:hover {
  transform: translateY(-12px) scale(1.015);
  filter: saturate(1.14);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    inset 0 -18px 0 rgba(0, 0, 0, 0.34),
    0 30px 68px rgba(0, 0, 0, 0.54),
    0 0 40px color-mix(in srgb, var(--cabinet-accent) 44%, transparent);
}

.arcade-cabinet:active {
  transform: translateY(-4px) scale(0.995);
}

.arcade-cabinet::before,
.arcade-cabinet::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.arcade-cabinet::before {
  inset: 8px;
  border-radius: 18px 18px 28px 28px;
  border: 1px solid color-mix(in srgb, var(--cabinet-accent) 48%, transparent);
}

.arcade-cabinet::after {
  left: 16%;
  right: 16%;
  bottom: 7px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(8px);
}

.arcade-cabinet-marquee {
  position: relative;
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px 16px 10px 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.24), transparent 55%),
    linear-gradient(90deg, var(--cabinet-accent), #facc15, #ff3864);
  box-shadow: 0 0 22px color-mix(in srgb, var(--cabinet-accent) 42%, transparent);
}

.arcade-cabinet-marquee span {
  color: #070214;
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: clamp(0.68rem, 1.05vw, 0.94rem);
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.arcade-cabinet-screen {
  position: relative;
  aspect-ratio: 1 / 0.82;
  margin: 18px 8px 0;
  border-radius: 18px;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.42),
    0 0 18px color-mix(in srgb, var(--cabinet-accent) 18%, transparent);
}

.arcade-cabinet-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.arcade-cabinet:hover .arcade-cabinet-screen img {
  transform: scale(1.1);
}

.arcade-screen-glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.2), transparent 32%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.arcade-cabinet-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 10px 0;
}

.arcade-cabinet-panel strong {
  display: block;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.15;
}

.arcade-cabinet-panel p {
  margin: 7px 0 0;
  color: rgba(226, 232, 255, 0.68);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.42;
}

.arcade-cabinet-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.arcade-cabinet-meta span {
  min-width: 0;
  border-radius: 8px;
  padding: 6px 5px;
  color: #f8fbff;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid color-mix(in srgb, var(--cabinet-accent) 34%, transparent);
  font-size: 0.58rem;
  font-weight: 950;
  text-align: center;
}

.arcade-cabinet-number {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: color-mix(in srgb, var(--cabinet-accent) 76%, white);
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: 0.68rem;
  opacity: 0.72;
}

body.amopi-game-mode .arcade-game-page {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 40px);
  padding: 88px 20px 76px;
  border-radius: 30px;
  border: 2px solid rgba(0, 214, 201, 0.34);
  background:
    radial-gradient(circle at 50% 2%, rgba(250, 204, 21, 0.18), transparent 30%),
    radial-gradient(circle at 8% 24%, rgba(0, 214, 201, 0.16), transparent 28%),
    radial-gradient(circle at 92% 22%, rgba(168, 85, 247, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(11, 5, 31, 0.97), rgba(2, 6, 18, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 18px 42px rgba(255, 255, 255, 0.04),
    inset 0 -24px 54px rgba(0, 0, 0, 0.58),
    0 26px 74px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(0, 214, 201, 0.14);
  overflow: hidden;
}

body.amopi-game-mode .arcade-game-page::before {
  content: attr(data-game-title);
  position: absolute;
  z-index: 0;
  top: 18px;
  left: max(18px, 4%);
  right: max(18px, 4%);
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #facc15;
  font-family: "Press Start 2P", "Outfit", sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.7rem);
  line-height: 1.2;
  text-align: center;
  text-shadow:
    0 0 12px rgba(250, 204, 21, 0.72),
    4px 4px 0 rgba(255, 56, 100, 0.28);
  background:
    linear-gradient(90deg, rgba(0, 214, 201, 0.38), rgba(250, 204, 21, 0.2), rgba(255, 56, 100, 0.32), rgba(168, 85, 247, 0.36)),
    rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(0, 214, 201, 0.2);
}

body.amopi-game-mode .arcade-game-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 5%;
  right: 5%;
  bottom: 18px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32px 50%, #0f172a 0 13px, #020617 14px 18px, transparent 19px),
    radial-gradient(circle at calc(100% - 104px) 50%, #ff3864 0 9px, transparent 10px),
    radial-gradient(circle at calc(100% - 70px) 50%, #facc15 0 9px, transparent 10px),
    radial-gradient(circle at calc(100% - 36px) 50%, #22ff88 0 9px, transparent 10px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    0 0 22px rgba(0, 214, 201, 0.12);
  pointer-events: none;
}

body.amopi-game-mode .arcade-game-page > * {
  position: relative;
  z-index: 1;
}

body.amopi-game-mode .arcade-game-page #flamopi-game-container,
body.amopi-game-mode .arcade-game-page #plinkamopi-game-container,
body.amopi-game-mode .arcade-game-page .bombamopi-container,
body.amopi-game-mode .arcade-game-page > div:not(.bombamopi-container) {
  border-radius: 22px;
  border: 1px solid rgba(0, 214, 201, 0.22);
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.58)),
    radial-gradient(circle at 50% 0%, rgba(0, 214, 201, 0.12), transparent 42%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 18px 44px rgba(0, 0, 0, 0.34);
}

body.amopi-game-mode .arcade-game-page[data-game-title="BOMBAMOPI"] {
  padding: 76px 12px 16px;
}

body.amopi-game-mode .arcade-game-page[data-game-title="BOMBAMOPI"]::after {
  display: none;
}

body.amopi-game-mode .arcade-game-page[data-game-title="BOMBAMOPI"] .bombamopi-container {
  height: calc(100dvh - 124px);
  min-height: 560px;
}

@media (max-width: 767px) {
  .amopi-games-home {
    padding: 16px 10px 110px;
    gap: 18px;
  }

  .amopi-games-hero {
    min-height: 240px;
    padding: 26px 16px;
  }

  .amopi-games-kicker {
    font-size: 0.58rem;
  }

  .amopi-games-statusbar span {
    font-size: 0.58rem;
  }

  .arcade-cabinet-grid {
    grid-template-columns: 1fr;
  }

  .arcade-cabinet {
    min-height: 430px;
  }

  body.amopi-game-mode .arcade-game-page {
    min-height: calc(100dvh - 18px);
    padding: 70px 10px 62px;
    border-radius: 22px;
  }

  body.amopi-game-mode .arcade-game-page::before {
    top: 12px;
    left: 10px;
    right: 10px;
    min-height: 42px;
    border-radius: 12px;
    font-size: 0.72rem;
  }

  body.amopi-game-mode .arcade-game-page::after {
    left: 10px;
    right: 10px;
    bottom: 12px;
    height: 28px;
    background:
      radial-gradient(circle at 24px 50%, #0f172a 0 10px, #020617 11px 14px, transparent 15px),
      radial-gradient(circle at calc(100% - 78px) 50%, #ff3864 0 7px, transparent 8px),
      radial-gradient(circle at calc(100% - 52px) 50%, #facc15 0 7px, transparent 8px),
      radial-gradient(circle at calc(100% - 26px) 50%, #22ff88 0 7px, transparent 8px),
      linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.95));
  }

  body.amopi-game-mode .arcade-game-page[data-game-title="BOMBAMOPI"] {
    padding: 62px 6px 8px;
  }

  body.amopi-game-mode .arcade-game-page[data-game-title="BOMBAMOPI"] .bombamopi-container {
    height: calc(100dvh - 78px);
    min-height: 0;
  }
}

@media (max-width: 767px) {
  body.amopi-game-mode .home-card {
    min-height: 250px;
    padding-top: 82px !important;
  }
}

html,
body {
  width: 100%;
  height: 100%;
}

#root {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  background: var(--app-bg-gradient);
}

.app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  overflow-x: hidden;
  background: var(--app-bg-gradient);
}

.app-main-content {
  background: transparent;
}

.page-transition {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.app-main-content {
  overflow-x: hidden;
  overflow-y: visible;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .page-transition {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

@keyframes mobileNavBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.mobile-nav-sheet {
  animation: mobileNavSheetIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mobileNavSheetIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Glassmorphism Card */

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 46px;
  height: 46px;
  cursor: pointer;
  background: none;
  padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  border-radius: 16px;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

/* Planning Grid Styles */

.planning-grid-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid var(--border-glass);
  padding: 8px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

td:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

button:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Pastilles Style */

.pastille {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  position: relative;
}

.pastille:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.shift-tag {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  position: relative;
  display: inline-flex;
}

/* Zoom sur tout le legend-item (badge + texte) */

.legend-item {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.legend-item:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* Hover Plus/Half visibility */

.hover-plus,
.hover-half {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.planning-cell:hover .hover-plus,
.planning-cell:hover .hover-half,
.oncall-cell:hover .hover-plus,
.split-half:hover .hover-half {
  opacity: 1;
}

/* --- PRINT STYLES --- */

@media print {
  @page {
    size: A4 landscape;
    margin: 4mm 5mm;
  }

  /* Force exact color reproduction */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Base reset */
  html, body {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    color: black !important;
    font-size: 9px !important;
    overflow: visible !important;
  }

  /* Hide everything except #root */
  body > *:not(#root) {
    display: none !important;
  }

  #root {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
  }

  /* ========== HIDE UI ELEMENTS ========== */
  nav, aside, .logo-animated, .no-print,
  .dashboard-header,
  [class*="popup"], [class*="modal"], [class*="overlay"],
  .avatar-container, .grip-vertical,
  .hover-plus, .hover-half,
  [class*="tooltip"], [class*="Tooltip"],
  select, .col-resize-handle,
  header.glass-card {
    display: none !important;
  }

  /* Hide buttons EXCEPT inside print-legend */
  button:not(.print-legend-item) {
    display: none !important;
  }

  /* Hide images sauf avatars dans les cellules employés */
  img {
    display: none !important;
  }

  /* Autoriser les avatars dans la colonne employés */
  td:first-child img {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
  }

  /* Conteneur de l'avatar dans la cellule */
  td:first-child > div > div:has(> img) {
    display: inline-flex !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }

  /* ========== PRINT HEADER ========== */
  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    padding: 3px 8px;
    border-bottom: 2px solid #333;
    color: black !important;
    letter-spacing: 0.02em;
  }

  .print-header-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .print-header-date {
    font-size: 13px;
    font-weight: 600;
    color: #444 !important;
  }

  /* ========== PRINT LEGEND ========== */
  .print-legend {
    display: flex !important;
    flex-wrap: wrap;
    gap: 3px 8px;
    margin: 0 0 5px 0;
    padding: 3px 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fafafa !important;
    align-items: center;
  }

  .print-legend-group {
    display: flex !important;
    align-items: center;
    gap: 2px;
    font-size: 6.5px;
    color: black !important;
  }

  .print-legend-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 11px;
    border-radius: 2px;
    color: white !important;
    font-weight: 700;
    font-size: 5.5px;
    text-transform: uppercase;
    flex-shrink: 0;
  }

  .print-legend-label {
    color: #333 !important;
    font-weight: 500;
    white-space: nowrap;
  }

  .print-legend-sep {
    width: 1px;
    height: 10px;
    background: #ccc !important;
    margin: 0 3px;
  }

  /* ========== LAYOUT ========== */
  .dashboard-root {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  .dashboard-container {
    display: block !important;
    width: 100% !important;
  }

  /* Remove glass-card styling */
  .glass-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  /* ========== SECTIONS ========== */
  .planning-grid-container,
  #astreintes-section,
  .oncall-section {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    background: white !important;
    border: none !important;
    page-break-inside: avoid !important;
    overflow: visible !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Section titles */
  .section-title {
    display: block !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-align: left !important;
    margin: 2px 0 1px 0 !important;
    padding: 2px 4px !important;
    color: black !important;
    text-transform: uppercase !important;
    border-bottom: 1.5px solid #333 !important;
    letter-spacing: 0.08em !important;
  }

  /* Hide interactive legend/header areas inside glass-card sections */
  /* This targets the header divs with HORAIRES/ASTREINTES titles and interactive legends */
  /* Note: in planning-grid-container, h2 is first child so div:first-child won't match table-container */
  .glass-card > div:first-child {
    display: none !important;
  }

  /* Ensure planning-grid-container itself stays visible */
  .planning-grid-container {
    display: block !important;
  }

  /* ========== TABLES ========== */
  .table-container {
    display: block !important;
    overflow: visible !important;
    width: 100% !important;
    background: white !important;
    border: none !important;
    border-radius: 0 !important;
  }

  table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 7px !important;
    background: white !important;
    border-spacing: 0 !important;
    min-width: 0 !important;
  }

  /* ========== CELLS ========== */
  th, td {
    border: 0.5px solid #aaa !important;
    padding: 0px 1px !important;
    color: black !important;
    text-align: center !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    position: static !important;
    overflow: hidden !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    transition: none !important;
  }

  /* thead headers: force white (overridden by more specific rules below) */
  thead th {
    background: white !important;
  }

  /* tbody cells: white by default — inline rgba backgrounds from getPlanningBgColor
     and getAstreinteBackgroundColor can override since no !important here */
  tbody td {
    background: white;
  }

  /* Weekend/saturday cells with no assignment: remove gray tint in print */
  tbody td[data-weekend] {
    background: white !important;
  }

  /* Name column - ONLY employee header (first row of thead) and employee body cells.
     NOTE: th:first-child would wrongly match day-name cells in thead rows 2/3
     because the employee th has rowspan=3, so rows 2-3 start directly with day cells. */
  thead tr:first-child th:first-child,
  tbody td:first-child {
    width: 115px !important;
    min-width: 115px !important;
    max-width: 115px !important;
    text-align: left !important;
    padding: 1px 3px !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow: hidden !important;
    font-weight: 700 !important;
    font-size: 6.5px !important;
    background: #f8f8f8 !important;
    line-height: 1.2 !important;
  }

  /* Name cell content - stay on one line, truncate if needed */
  tbody td:first-child > div {
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    gap: 2px !important;
    align-items: center !important;
  }

  tbody td:first-child > div > span:last-child {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  /* Header cells */
  thead th {
    font-weight: 700 !important;
    font-size: 6px !important;
    padding: 1px !important;
    background: #f0f0f0 !important;
    color: #333 !important;
  }

  /* Week header row */
  thead tr:first-child th {
    font-size: 7px !important;
    font-weight: 800 !important;
    background: #e8e8e8 !important;
    padding: 2px !important;
    border-bottom: 1px solid #888 !important;
  }

  /* Today highlight - remove in print */
  thead th[style*="rgba(17, 162, 152"] {
    background: #f0f0f0 !important;
  }

  /* Holiday cells in header */
  thead th[style*="rgba(239, 68, 68"] {
    background: #fecaca !important;
    color: #dc2626 !important;
  }

  /* Weekend cells - subtle grey */
  td[style*="rgba(100, 116, 139"] {
    background: #f5f5f5 !important;
  }

  /* Holiday cells in body */
  td[style*="rgba(239, 68, 68"] {
    background: #fee2e2 !important;
  }

  /* ========== PASTILLES - CRITICAL ========== */
  /* DO NOT set any background on .pastille - let inline styles work */
  .pastille {
    color: white !important;
    font-weight: 800 !important;
    font-size: 6px !important;
    text-align: center !important;
    padding: 1px 2px !important;
    border-radius: 2px !important;
    min-width: 14px !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    border: 0.3px solid rgba(0,0,0,0.15) !important;
    /* background is NOT overridden - inline style preserved */
  }

  /* Pastille container - do NOT force display, respect inline display:none for empty cells */
  .pastille-container {
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    cursor: default !important;
  }

  /* ========== SPLIT HALF-DAY CELLS ========== */
  /* The parent flex container for split cells */
  td > div[style*="flex-direction: column"] {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .split-half {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    min-height: 0 !important;
    background: transparent !important;
  }

  /* Separator between AM/PM */
  .split-half:first-child {
    border-bottom: 0.5px solid #ccc !important;
  }

  .split-half .pastille {
    font-size: 5px !important;
    min-width: 10px !important;
    padding: 0px 1px !important;
  }

  /* Planning cells need relative positioning for split cells */
  td.planning-cell {
    position: relative !important;
    overflow: hidden !important;
    height: 16px !important;
  }

  /* ========== ONCALL SECTION ========== */
  .oncall-section,
  .oncall-section * {
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Override the gap:24px on the oncall content wrapper */
  .oncall-section > div:nth-child(2) {
    gap: 1px !important;
    display: block !important;
  }

  /* Add spacing between HORAIRES and ASTREINTES sections */
  #astreintes-section {
    margin-top: 8px !important;
  }

  /* OnCall cells */
  .oncall-cell {
    height: 16px !important;
    position: relative !important;
  }

  /* Ensure oncall table-container stays visible and full-width */
  .oncall-section .table-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  /* Force oncall table to fit page (override minWidth:1000px inline) */
  .oncall-section table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }

  /* ========== SELECTION BARS - HIDE ========== */
  /* Hide any selection/action bars at bottom of tables */
  div[style*="rgba(17, 162, 152, 0.1)"] {
    display: none !important;
  }

  /* ========== PAGE MANAGEMENT ========== */
  /* Ensure both tables fit on one page */
  .planning-grid-container {
    page-break-after: avoid !important;
  }

  #astreintes-section {
    page-break-before: avoid !important;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
