/* wechatGame.css */
#wechat-game-lobby {
    background: #f5f5f5;
}

#wechat-game-room {
    background: #f5f5f5;
}

.game-board-container {
    width: 100%;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #f5f5f5;
    box-sizing: border-box;
}

.gomoku-board-wrapper {
    background: #e6c280; /* wooden color */
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    position: relative;
    transform: scale(0.85);
    transform-origin: top center;
    margin-top: auto;
    margin-bottom: auto;
}

#gomoku-canvas {
    display: block;
    background: transparent;
}

.game-chat-area {
    flex: 1;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 10px;
}

.game-chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#game-status-text {
    font-size: 12px;
    color: #666;
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.3s;
}

#game-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f5f5f5;
}

.game-chat-input-bar {
    padding: 10px 15px calc(20px + env(safe-area-inset-bottom, 0px));
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

#game-chat-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

#game-chat-input:focus {
    border-color: #666;
}

.game-chat-send-btn {
    flex-shrink: 0;
    white-space: nowrap;
    background: #444;
    color: #fff;
    border: none;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.game-chat-send-btn:active {
    transform: scale(0.95);
}

/* Witch's Potion Game Styles - Gothic */
#witch-potion-container {
    background: linear-gradient(135deg, #1c1924 0%, #0f0d14 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 0 0 1px #3a3245;
    position: relative;
    margin: 0 auto;
    color: #dcd0c0;
    font-family: 'Georgia', serif;
    box-sizing: border-box;
    width: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow-y: auto;
}

.witch-potion-header {
    text-align: center;
    margin-bottom: 8px;
    position: relative;
    flex-shrink: 0;
}

.witch-potion-header::before, .witch-potion-header::after {
    content: '✧';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8a7b99;
    font-size: 16px;
}
.witch-potion-header::before { left: 20px; }
.witch-potion-header::after { right: 20px; }

.witch-potion-title {
    font-size: 18px;
    font-weight: bold;
    color: #c4b5d4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.witch-potion-subtitle {
    font-size: 10px;
    color: #8a7b99;
    letter-spacing: 1px;
    margin-top: 2px;
}

.witch-potion-status-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: rgba(20, 15, 25, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    box-sizing: border-box;
    border: 1px solid #3a3245;
    flex-shrink: 0;
}

.witch-potion-player-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.witch-potion-player-name {
    font-size: 13px;
    font-weight: bold;
    color: #dcd0c0;
    margin-bottom: 4px;
}

.witch-potion-hp-bar {
    width: 100%;
    height: 8px;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
    border: 1px solid #3a3245;
}

.witch-potion-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #5c1a24, #9e2a3b);
    transition: width 0.3s ease;
}

.witch-potion-hp-text {
    font-size: 11px;
    color: #c4b5d4;
}

.witch-potion-vs {
    font-size: 18px;
    font-weight: bold;
    color: #5c1a24;
    font-style: italic;
}

.witch-potion-table {
    width: 100%;
    background: radial-gradient(circle at center, rgba(40, 30, 50, 0.3) 0%, rgba(15, 10, 20, 0.6) 100%);
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 8px;
    border: 1px solid #3a3245;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;
}

.witch-potion-cauldron-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.witch-potion-cauldron {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #333, #0a0a0a);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 5px 10px rgba(0,0,0,0.8);
    border-bottom: 3px solid #000;
    border-top: 1px solid #4a3b52;
}

.witch-potion-cauldron i {
    font-size: 24px;
    color: #9e2a3b;
    animation: pulse 2s infinite;
}

.witch-potion-bubbles {
    position: absolute;
    top: -10px;
    width: 100%;
    height: 20px;
    background: radial-gradient(circle, rgba(158,42,59,0.4) 0%, rgba(158,42,59,0) 70%);
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0px); opacity: 0.6; }
    50% { transform: translateY(-10px); opacity: 1; }
    100% { transform: translateY(0px); opacity: 0.6; }
}

.witch-potion-info-text {
    margin-top: 8px;
    color: #dcd0c0;
    font-size: 12px;
    font-weight: bold;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 10px;
    border: 1px solid #3a3245;
}

.witch-potion-potions-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.witch-potion-item {
    width: 36px;
    height: 48px;
    background: linear-gradient(180deg, #2a2435 0%, #15121a 100%);
    border-radius: 6px 6px 3px 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #8a7b99;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 1px solid #4a3b52;
}

.witch-potion-item::before {
    content: '';
    position: absolute;
    top: -6px;
    width: 12px;
    height: 6px;
    background: #6a5b79;
    border-radius: 3px 3px 0 0;
    border: 1px solid #3a3245;
    border-bottom: none;
}

.witch-potion-item:hover {
    transform: translateY(-3px);
    border-color: #c4b5d4;
}

.witch-potion-item.selected {
    transform: translateY(-5px) scale(1.1);
    border-color: #c4b5d4;
    box-shadow: 0 0 10px rgba(196, 181, 212, 0.3);
}

.witch-potion-item.revealed-poison {
    background: linear-gradient(180deg, #3a151c 0%, #1a0a0d 100%);
    border-color: #9e2a3b;
}

.witch-potion-item.revealed-poison i {
    color: #ff4d4d;
}

.witch-potion-item.revealed-cure {
    background: linear-gradient(180deg, #153a24 0%, #0a1a10 100%);
    border-color: #2a9e5c;
}

.witch-potion-item.revealed-cure i {
    color: #4dff88;
}

.witch-potion-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.witch-potion-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #3a3245;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    color: #8a7b99;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
    pointer-events: none;
    background: rgba(20, 15, 25, 0.8);
    font-family: 'Georgia', serif;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.witch-potion-btn.active {
    opacity: 1;
    pointer-events: auto;
    color: #dcd0c0;
    border-color: #8a7b99;
}

.witch-potion-btn-drink.active {
    background: linear-gradient(135deg, #4a1c26 0%, #2a0f15 100%);
    border-color: #9e2a3b;
    color: #ffb3b3;
    box-shadow: 0 0 10px rgba(158, 42, 59, 0.4), inset 0 0 5px rgba(0,0,0,0.5);
}

.witch-potion-btn-give.active {
    background: linear-gradient(135deg, #1c4a2e 0%, #0f2a1a 100%);
    border-color: #2a9e5c;
    color: #b3ffcc;
    box-shadow: 0 0 10px rgba(42, 158, 92, 0.4), inset 0 0 5px rgba(0,0,0,0.5);
}

.witch-potion-rules {
    background: rgba(20, 15, 25, 0.6);
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #3a3245;
    flex-shrink: 0;
}

.witch-potion-rules-title {
    font-size: 12px;
    font-weight: bold;
    color: #c4b5d4;
    margin-bottom: 4px;
}

.witch-potion-rules-list {
    margin: 0;
    padding-left: 16px;
    font-size: 11px;
    color: #a89cb8;
    line-height: 1.4;
}

/* Roulette Mode Styles */
#witch-potion-roulette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    background: radial-gradient(circle at center, rgba(40, 30, 50, 0.3) 0%, rgba(15, 10, 20, 0.6) 100%);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #3a3245;
    box-sizing: border-box;
}

.witch-potion-roulette-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #2a2435 0%, #15121a 100%);
    border: 1px solid #4a3b52;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    color: #8a7b99;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.witch-potion-roulette-cell::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(138, 123, 153, 0.2);
    border-radius: 6px;
    pointer-events: none;
}

.witch-potion-roulette-cell:hover {
    border-color: #c4b5d4;
    transform: scale(1.05);
}

.witch-potion-roulette-cell.selected-me {
    background: linear-gradient(135deg, #4a1c26 0%, #2a0f15 100%);
    border-color: #9e2a3b;
    box-shadow: inset 0 0 15px rgba(158, 42, 59, 0.5), 0 0 8px rgba(158, 42, 59, 0.3);
}
.witch-potion-roulette-cell.selected-me i {
    color: #ffb3b3;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.5);
}

.witch-potion-roulette-cell.selected-ai {
    background: linear-gradient(135deg, #1c264a 0%, #0f152a 100%);
    border-color: #2a3b9e;
    box-shadow: inset 0 0 15px rgba(42, 59, 158, 0.5), 0 0 8px rgba(42, 59, 158, 0.3);
}

.witch-potion-roulette-cell.revealed-safe {
    background: rgba(15, 12, 20, 0.8);
    border-color: #3a3245;
    cursor: default;
    transform: scale(0.95);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.witch-potion-roulette-cell.revealed-safe i {
    color: #4a3b52;
}

.witch-potion-roulette-cell.revealed-poison {
    background: linear-gradient(135deg, #5c1a24 0%, #2a0a10 100%);
    border-color: #ff4d4d;
    cursor: default;
    animation: shake 0.4s;
    box-shadow: inset 0 0 20px rgba(255, 77, 77, 0.4), 0 0 10px rgba(255, 77, 77, 0.5);
}

.witch-potion-roulette-cell.revealed-poison i {
    color: #ffb3b3;
    text-shadow: 0 0 8px rgba(255, 77, 77, 0.8);
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Guess Word Game Styles */
#guess-word-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 320px;
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transform-origin: top center;
    margin-top: auto;
    margin-bottom: auto;
}

#guess-word-timer {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-shadow: 0 2px 4px rgba(235, 77, 61, 0.2);
}

#guess-word-role {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

#guess-word-target {
    background: linear-gradient(135deg, #f6f6f6 0%, #ffffff 100%);
    padding: 15px 30px;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

#guess-word-skip-btn {
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#guess-word-skip-btn:active {
    transform: scale(0.95);
    background: #e0e0e0;
}

/* Typing Indicator */
.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
