img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}
* {
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body { 
    font-family: -apple-system, Arial, sans-serif; 
    text-align: center; 
    padding: 20px; 
    background-image: url('/fon.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white; 
    height: 100vh;
    overflow: hidden;
}
button, .menu-item, .color-btn, .bet-btn, .risk-cashout, .craft-btn, .gift-btn, .bonus-btn, .naprstok, .risk-card, .info-btn, .sound-btn, .modal-close, .daily-btn {
    touch-action: manipulation;
}
#page-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

#page-shop {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
}

#page-shop h1 {
    margin-top: 20px;
    margin-bottom: 20px;
}

#page-shop .shop-columns {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#page-games {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
    padding-top: 40px;
}

#page-quests {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
    padding-top: 20px;
}

#page-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-suit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-highlow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-naprstki {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-risk {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-my-cats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

#page-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    gap: 20px;
}

#page-air {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-water {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-fire {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

#page-earth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}
h1 { font-size: 28px; margin-bottom: 10px; }
.menu-item { 
    display: block; 
    margin: 6px auto; 
    padding: 18px; 
    width: 70%; 
    max-width: 350px;
    background-image: url('/button.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    border-radius: 12px; 
    font-size: 18px; 
    font-weight: bold;
    transition: background 0.2s;
    text-align: center;
    color: #fff;
}
#page-games .menu-item {
    background-image: url('/knopkamenu.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 12px;
    width: 90%;
    max-width: 350px;
    margin: 12px auto;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s;
    position: relative;
    display: block;
}

#page-games .menu-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 30px;
    margin-right: 0;
    object-fit: contain;
}

#page-games .menu-text {
    display: block;
    text-align: left;
    padding-left: 70px;
    top: 0;
}



.menu-item:active {
    transform: translateY(3px);    
}

#card { font-size: 72px; margin: 20px 0; }
.btn-group { display: flex; gap: 20px; margin-top: 20px; }
.btn { padding: 15px 40px; font-size: 20px; font-weight: bold; border: none; border-radius: 12px; transition: 0.2s; }
.btn-red { background: #e74c3c; color: white; }
.btn-black { background: #2c3e50; color: white; }
.btn:active { transform: scale(0.95); }
#result { margin-top: 20px; font-size: 18px; }
#balance { margin-top: 10px; font-size: 16px; color: #aaa; }
.cat-corner {
    position: fixed;
    top: 10px;
    right: -10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 10;
}

.cat-animation {
    width: 120px;
    height: auto;
    transform: translateX(30px);
}

.profile-corner {
    position: fixed;
    top: 20px;
    left: 10px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    z-index: 10;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sound-btn {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sound-btn img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.sound-btn:active {
    transform: scale(0.9);
}
.balance-corner {
    position: fixed;
    top: 20px;
    right: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.balance-corner-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
#user-info {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 4px;
}

#profile-balance {
    font-size: 18px;    
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 20px;
}
.balance-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-icon {
    width: 32px;
}

.murchik-icon.balance-icon {
    width: 28px;
}

.balance-number {
    font-size: 20px;
    color: #FFFF00;
}

.balance-label {
    font-size: 12px;
    color: #FFFF00;
}

.toast-message {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 16px;
    z-index: 200;
    animation: toastFade 2.5s ease-out forwards;
    white-space: nowrap;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; }
    100% { opacity: 0; }
}
.info-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    animation: infoPulse 2s ease-in-out infinite;
}

@keyframes infoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.9);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 25px 8px rgba(255, 215, 0, 0.63);
    }
}

.info-btn:active {
    transform: scale(0.95);
}
.info-btn.no-anim {
    animation: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    color: #fff;
    border-radius: 16px;
    padding: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
    font-size: 15px;
    line-height: 1.5;
}
.modal-overlay.craft-anim {
    background: transparent;
    pointer-events: all;
}

.modal-overlay.craft-anim .modal-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    max-width: none;
    max-height: none;
    overflow: visible;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content h2 {
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 20px;
}

.modal-close {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    background: #A52A2A;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
}

.modal-close:active {
    transform: scale(0.97);
}

/* === НИЖНЯЯ ПАНЕЛЬ (ГЛАВНЫЙ ЭКРАН) === */
.bottom-panel {
    position: fixed;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 5;
    pointer-events: none;
}

.main-cat-block {
    position: relative;
    width: 70px;
    height: 70px;
    pointer-events: auto;
}

.main-cat {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #666;
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.main-cat-lock {
    font-size: 32px;
    line-height: 1;
}

.main-cat img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.main-cat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #A52A2A;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.main-cat-badge:active {
    transform: scale(0.9);
}
.not-registered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 100vh;
    padding: 20px;
    text-align: center;
}

.not-registered-text {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.not-registered-bot {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 12px;
    user-select: text;
    -webkit-user-select: text;
}

.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
}
button {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
#page-main .menu-item {
    position: relative;
    display: block;
}

#page-main .menu-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    margin-right: 0;
}

#page-main .menu-text {
    display: block;
    position: relative;
    text-align: center;
    padding-left: 20px;
    top: 0;
}


/* === ХРЮН === */
.pig-me-block {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: url('/knopkamenu.webp') no-repeat center center;
    background-size: cover;
}

.pig-me-block .pig-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pig-me-block .pig-name {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 35vw;
    font-size: 12px;
    text-align: center;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.pig-me-profile {
    position: relative;
    width: 50px;
    height: 50px;
}

.pig-me-block .pig-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pig-me-block .pig-ava {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.pig-balance-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}
.pig-table {
    position: fixed;
    left: 50%;
    top: 45%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
}

#page-pig {
    position: fixed;
    inset: 0;
}

.pig-circle {
    position: absolute;
    inset: 0;
}

.pig-pile {
    position: absolute;
    width: 60px;
    height: 90px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.pig-circle-count {
    position: fixed;
    bottom: 220px;
    left: 15px;
    font-size: 14px;
    color: #fff;
}
.pig-pile-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -30px;
    margin-top: -45px;
    width: 60px;
    height: 90px;
    transform-style: preserve-3d;
}
.pig-pile-back, .pig-pile-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.pig-pile-face { transform: rotateY(180deg); }
.pig-fly-card {
    position: fixed;
    width: 44px;
    height: 66px;
    transform: translate(-50%, -50%);
    border-radius: 3px;
    z-index: 500;
    pointer-events: none;
    transition: transform 0.7s ease-out, opacity 0.4s ease-out;
}
.pig-hand {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 5px;
}

.pig-hand-card {
    width: 75px;
    height: 110px;
    margin: 0 -15px;
    border-radius: 5px;
    object-fit: cover;
    transition: transform 0.15s;
}

.pig-hand-card-selected {
    transform: translateY(-15px);
}
.pig-hand-inner {
    pointer-events: none;
}

.pig-hand-inner > div {
    pointer-events: none;
}

.pig-hand-inner .pig-hand-card {
    pointer-events: auto;
}

.pig-opp-card {
    width: 30px;
    height: 45px;
    margin: 0 -12px;
    border-radius: 3px;
    object-fit: cover;
}

.pig-timer {
    display: none;
}
.pig-stack {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 90px;
}

.pig-stack-img {
    width: 60px;
    height: 90px;
    border-radius: 4px;
    object-fit: cover;
}

.pig-stack-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px #000;
    pointer-events: none;
}
.pig-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 50;
}
.pig-result-btn {
    position: relative;
    width: 200px;
    height: 60px;
}

.pig-result-btn img {
    width: 100%;
    height: 100%;
}

.pig-result-btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}
.pig-wait-text {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px #000;
    padding: 20px;
}
#rooms-list {
    max-height: 50vh;
    overflow-y: auto;
    margin-top: 20px;
}

.pig-create-btn {
    position: relative;
    width: 250px;
    height: 60px;
    margin: 15px auto;
    
}

.pig-create-btn img {
    width: 100%;
    height: 100%;
}

.pig-create-btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
    white-space: nowrap;
}
.rooms-empty {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px #000;
    text-align: center;
    padding: 20px;
}
#bet-amount-mp {
    font-size: 24px;
    font-weight: bold;
    color: #FFFF00;
    min-width: 60px;
    text-align: center;
}
.bet-controls-mp {
    width: fit-content;
    margin: 15px auto;
}
.mp-room-btn {
    position: relative;
    width: 250px;
    height: 50px;
    margin: 10px auto;
    
}

.mp-room-btn img {
    width: 100%;
    height: 100%;
}

.mp-room-bet {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #FFFF00;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}

.mp-room-players {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}
.pig-ava-wrap.pig-opp-turn {
    border-radius: 50%;
}
.pig-ava-wrap {
    position: relative;
}
.pig-opponents .pig-ava-wrap {
    position: relative;
    width: 60px;
    height: 60px;
}
.pig-opponents .pig-ava {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-sizing: border-box;
}

.pig-opponents .pig-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pig-opponents .pig-name {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    white-space: nowrap;
}

.pig-opp-hands .pig-opp-hand {
    width: 0;
    height: 0;
}

.pig-opp-hands .pig-opp-hand-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
}

@keyframes pigTurnGlow {
    0%, 100% { box-shadow: 0 0 10px 3px rgba(255, 215, 0, 0.5); }
    50%      { box-shadow: 0 0 20px 7px rgba(255, 215, 0, 1); }
}
.pig-turn {
    position: fixed;
    bottom: 2vh;
    right: 2vw;
    font-size: 5vh;
    font-weight: bold;
    color: #FFFF00;
    text-shadow: 1px 1px 3px #000;
    z-index: 10;
    animation: pigTurnPulse 1.5s ease-in-out infinite;
}

@keyframes pigTurnPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}
.mp-room-bet .pig-balance-icon {
    width: 20px;
    height: 20px;
}

.pig-emote-picker {
    position: fixed;
    bottom: 100px;
    left: 15px;
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    z-index: 300;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.pig-emote-item {
    width: 65px;
    height: 65px;
    
    object-fit: contain;
    transition: transform 0.15s;
    pointer-events: auto;
}

.pig-emote-item:active {
    transform: scale(0.9);
}

.pig-emote-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.pig-emote-display.show {
    opacity: 1;
    animation: pigEmoteGrow 2s ease-out forwards;
}

@keyframes pigEmoteGrow {
    0%   { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.8); }
}

.pig-emote-slot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}
/* === КОНЕЦ ХРЮН === */


.main-cat-claim-btn {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    background: linear-gradient(135deg, #b46aff 0%, #5a2a8a 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 5;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.main-cat-claim-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* === МОДАЛКА КРАФТА МУРОТВОРЦА === */
.main-cat-craft-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.main-cat-craft-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.main-cat-craft-row.ok {
    border-color: rgba(74, 222, 128, 0.5);
}

.main-cat-craft-row.no {
    border-color: rgba(239, 68, 68, 0.4);
}

.main-cat-craft-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.main-cat-craft-count {
    margin-left: auto;
    font-size: 16px;
    font-weight: bold;
}

.main-cat-craft-row.ok .main-cat-craft-count {
    color: #4ade80;
}

.main-cat-craft-row.no .main-cat-craft-count {
    color: #ef4444;
}
.ava-wrap {
    position: relative;
    width: 70px;
    height: 70px;
}

.ava-accessory {
    position: absolute;
    transform: translate(-50%, -50%) translateZ(0);
    height: auto;
    pointer-events: none;
    z-index: 2;
    will-change: transform;
}
.create-room-sizes {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.create-room-size {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: #4a4a4a;
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, background 0.1s;
}

.create-room-size:active {
    transform: scale(0.92);
    background: #666;
}
.pig-opponents,
.pig-opp-hands {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pig-opponents .pig-opp-profile,
.pig-opp-hands .pig-opp-hand {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.pig-opponents .pig-opp-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.pig-timer-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    pointer-events: none;
    z-index: 5;
}
.pig-timer-ring circle {
    fill: none;
    stroke-width: 4;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}
/* === МОДАЛКА МУРОТВОРЦА В ФИОЛЕТОВОМ СТИЛЕ === */
#main-cat-craft-overlay .modal-content {
    background: linear-gradient(160deg, #2a0a4a 0%, #1a0033 60%, #0a0018 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 24px 20px;
}

#main-cat-craft-overlay .modal-content h2 {
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

#main-cat-craft-overlay .main-cat-craft-row {
    background: linear-gradient(135deg, #3a1a5a 0%, #2a0a4a 100%);
    border: 1px solid rgba(212, 164, 255, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
}

#main-cat-craft-overlay .main-cat-craft-row.ok {
    border-color: rgba(120, 220, 120, 0.6);
}

#main-cat-craft-overlay .main-cat-craft-row.no {
    border-color: rgba(220, 100, 100, 0.5);
}

#main-cat-craft-overlay .modal-close {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    transition: 0.15s;
    margin-top: 10px;
}

#main-cat-craft-overlay .modal-close:active {
    transform: scale(0.96);
}

#main-cat-craft-overlay .modal-close[style*="background:#444"] {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(212, 164, 255, 0.25);
    color: #c4b4d4;
}
/* === ОКНО СОЗДАНИЯ СТОЛА (ХРЮН) === */
#create-room-overlay .modal-content {
    background: linear-gradient(160deg, #2a0a4a 0%, #1a0033 60%, #0a0018 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 24px 20px;
}

#create-room-overlay .modal-content h2 {
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

#create-room-overlay .create-room-size {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    transition: 0.15s;
}

#create-room-overlay .create-room-size:active {
    transform: scale(0.92);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(180, 106, 255, 0.7);
}

#create-room-overlay .modal-close {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    transition: 0.15s;
}

#create-room-overlay .modal-close:active {
    transform: scale(0.96);
    box-shadow: 0 0 20px rgba(180, 106, 255, 0.7);
}
#create-room-overlay .cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 164, 255, 0.25);
    color: #c4b4d4;
}
#report-overlay .modal-content {
    background: linear-gradient(160deg, #2a0a4a 0%, #1a0033 60%, #0a0018 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    border-radius: 20px;
    padding: 24px 20px;
}

#report-overlay .modal-content h2 {
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

#report-overlay .modal-content p {
    color: #d4c4e4;
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}

#report-overlay .modal-close {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    transition: 0.15s;
    margin-top: 10px;
}

#report-overlay .modal-close:active {
    transform: scale(0.96);
}

#report-overlay .modal-close[style*="background:#444"] {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(212, 164, 255, 0.25);
    color: #c4b4d4;
}
.pig-rematch-ready {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 18px;
    font-size: 14px;
    font-weight: bold;
    color: #00ff44;
    text-shadow: 0 0 8px rgba(0, 255, 100, 1), 1px 1px 2px #000;
    pointer-events: none;
    white-space: nowrap;
    animation: pigRematchPulse 1s ease-in-out infinite;
}

@keyframes pigRematchPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pig-rematch-timer {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 18px;
    font-size: 20px;
    font-weight: bold;
    color: #FF0000;
    text-shadow: 0 0 8px rgba(255, 50, 50, 1), 1px 1px 2px #000;
    pointer-events: none;
    white-space: nowrap;
}
.unique-ava {
    position: relative;
    border-radius: 50%;
    animation: uniqueAvaGlow 2s ease-in-out infinite;
}

@keyframes uniqueAvaGlow {
    0%, 100% { box-shadow: 0 0 0 2px #8A2BE2, 0 0 12px rgba(138, 43, 226, 0.6); }
    50%      { box-shadow: 0 0 0 2px #b46aff, 0 0 22px rgba(180, 106, 255, 1); }
}
.pig-reconnect {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    pointer-events: none;
}
.pig-reconnect-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: pigReconnectSpin 0.8s linear infinite;
}
@keyframes pigReconnectSpin {
    to { transform: rotate(360deg); }
}
.pig-reconnect-text {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 3px #000;
}
.pig-offline {
    position: absolute;
    top: 100%;
    z-index: 50;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 18px;
    font-size: 12px;
    font-weight: bold;
    color: #ff3333;
    text-shadow: 0 0 6px rgba(255, 50, 50, 0.9), 1px 1px 2px #000;
    pointer-events: none;
    white-space: nowrap;
}