* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: #f5f0e6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Arial', 'PingFang SC', sans-serif;
    overflow: hidden;
    touch-action: manipulation;
}

.game-wrapper {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.game-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 700;
    color: #333;
    letter-spacing: 2px;
}

.back-btn {
    background: linear-gradient(145deg, #d4c4a8, #c4b498);
    border: 1px solid #a89878;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-btn:active {
    transform: scale(0.95);
    background: linear-gradient(145deg, #c4b498, #b4a488);
}

.game-info-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.player-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-player {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.turn-text {
    font-size: 14px;
    color: #999;
}

.info-bar-actions {
    display: flex;
    gap: 8px;
}

.online-btn {
    background: #27ae60;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.online-btn:active {
    transform: scale(0.95);
    background: #1e8449;
}

.restart-btn {
    background: #4a90d9;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.restart-btn:active {
    transform: scale(0.95);
    background: #3a7bc8;
}

.online-players-top,
.online-players-bottom {
    width: 100%;
    display: none;
    margin-bottom: 8px;
}

.online-players-bottom {
    margin-top: 8px;
}

.online-players-top.show,
.online-players-bottom.show {
    display: block;
}

.player-card {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    gap: 10px;
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.player-avatar.default-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.player-avatar.default-avatar::after {
    content: '';
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-username {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.player-spacer {
    flex: 1;
}

.player-symbol-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.player-symbol-badge.black {
    background: radial-gradient(circle at 30% 30%, #555, #111);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.player-symbol-badge.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ccc);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #aaa;
}

.board-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f5f0e6;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

#chess {
    display: block;
    border-radius: 8px;
}

.online-turn-hint {
    display: none;
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(74, 144, 217, 0.1);
    border-radius: 20px;
    font-size: 13px;
    color: #4a90d9;
    font-weight: 600;
}

.online-turn-hint.show {
    display: block;
}

.game-result {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.game-result.show {
    display: flex;
}

.result-text {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.result-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.result-btn {
    background: #4a90d9;
    border: none;
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-btn.secondary {
    background: #95a5a6;
}

.result-btn:active {
    transform: scale(0.95);
    background: #3a7bc8;
}

.result-btn.secondary:active {
    background: #7f8c8d;
}

.rematch-invite-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 250;
}

.rematch-invite-overlay.show {
    display: flex;
}

.rematch-invite-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.rematch-invite-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.rematch-invite-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rematch-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rematch-btn.accept {
    background: #27ae60;
    color: #fff;
}

.rematch-btn.decline {
    background: #e74c3c;
    color: #fff;
}

.rematch-btn:active {
    transform: scale(0.95);
}

.rematch-declined-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 260;
}

.rematch-declined-overlay.show {
    display: flex;
}

.rematch-declined-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 80%;
    max-width: 280px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.rematch-declined-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.rematch-back-btn {
    background: #4a90d9;
    border: none;
    color: #fff;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rematch-back-btn:active {
    background: #3a7bc8;
}

.rematch-waiting-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 270;
}

.rematch-waiting-overlay.show {
    display: flex;
}

.rematch-waiting-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    width: 85%;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.wheel-and-hamster {
    --dur: 1s;
    position: relative;
    width: 12em;
    height: 12em;
    font-size: 10px;
    margin: 0 auto 20px;
}

.wheel,
.hamster,
.hamster div,
.spoke {
    position: absolute;
}

.wheel,
.spoke {
    border-radius: 50%;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wheel {
    background: radial-gradient(100% 100% at center,hsla(0,0%,60%,0) 47.8%,hsl(0,0%,60%) 48%);
    z-index: 2;
}

.hamster {
    animation: hamster var(--dur) ease-in-out infinite;
    top: 50%;
    left: calc(50% - 3.5em);
    width: 7em;
    height: 3.75em;
    transform: rotate(4deg) translate(-0.8em,1.85em);
    transform-origin: 50% 0;
    z-index: 1;
}

.hamster__head {
    animation: hamsterHead var(--dur) ease-in-out infinite;
    background: hsl(30,90%,55%);
    border-radius: 70% 30% 0 100% / 40% 25% 25% 60%;
    box-shadow: 0 -0.25em 0 hsl(30,90%,80%) inset, 0.75em -1.55em 0 hsl(30,90%,90%) inset;
    top: 0;
    left: -2em;
    width: 2.75em;
    height: 2.5em;
    transform-origin: 100% 50%;
}

.hamster__ear {
    animation: hamsterEar var(--dur) ease-in-out infinite;
    background: hsl(0,90%,85%);
    border-radius: 50%;
    box-shadow: -0.25em 0 hsl(30,90%,55%) inset;
    top: -0.25em;
    right: -0.25em;
    width: 0.75em;
    height: 0.75em;
    transform-origin: 50% 75%;
}

.hamster__eye {
    animation: hamsterEye var(--dur) linear infinite;
    background-color: hsl(0,0%,0%);
    border-radius: 50%;
    top: 0.375em;
    left: 1.25em;
    width: 0.5em;
    height: 0.5em;
}

.hamster__nose {
    background: hsl(0,90%,75%);
    border-radius: 35% 65% 85% 15% / 70% 50% 50% 30%;
    top: 0.75em;
    left: 0;
    width: 0.2em;
    height: 0.25em;
}

.hamster__body {
    animation: hamsterBody var(--dur) ease-in-out infinite;
    background: hsl(30,90%,90%);
    border-radius: 50% 30% 50% 30% / 15% 60% 40% 40%;
    box-shadow: 0.1em 0.75em 0 hsl(30,90%,55%) inset, 0.15em -0.5em 0 hsl(30,90%,80%) inset;
    top: 0.25em;
    left: 2em;
    width: 4.5em;
    height: 3em;
    transform-origin: 17% 50%;
    transform-style: preserve-3d;
}

.hamster__limb--fr,
.hamster__limb--fl {
    clip-path: polygon(0 0,100% 0,70% 80%,60% 100%,0% 100%,40% 80%);
    top: 2em;
    left: 0.5em;
    width: 1em;
    height: 1.5em;
    transform-origin: 50% 0;
}

.hamster__limb--fr {
    animation: hamsterFRLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,80%) 80%,hsl(0,90%,75%) 80%);
    transform: rotate(15deg) translateZ(-1px);
}

.hamster__limb--fl {
    animation: hamsterFLLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,90%) 80%,hsl(0,90%,85%) 80%);
    transform: rotate(15deg);
}

.hamster__limb--br,
.hamster__limb--bl {
    border-radius: 0.75em 0.75em 0 0;
    clip-path: polygon(0 0,100% 0,100% 30%,70% 90%,70% 100%,30% 100%,40% 90%,0% 30%);
    top: 1em;
    left: 2.8em;
    width: 1.5em;
    height: 2.5em;
    transform-origin: 50% 30%;
}

.hamster__limb--br {
    animation: hamsterBRLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,80%) 90%,hsl(0,90%,75%) 90%);
    transform: rotate(-25deg) translateZ(-1px);
}

.hamster__limb--bl {
    animation: hamsterBLLimb var(--dur) linear infinite;
    background: linear-gradient(hsl(30,90%,90%) 90%,hsl(0,90%,85%) 90%);
    transform: rotate(-25deg);
}

.hamster__tail {
    animation: hamsterTail var(--dur) linear infinite;
    background: hsl(0,90%,85%);
    border-radius: 0.25em 50% 50% 0.25em;
    box-shadow: 0 -0.2em 0 hsl(0,90%,75%) inset;
    top: 1.5em;
    right: -0.5em;
    width: 1em;
    height: 0.5em;
    transform: rotate(30deg) translateZ(-1px);
    transform-origin: 0.25em 0.25em;
}

.spoke {
    animation: spoke var(--dur) linear infinite;
    background: radial-gradient(100% 100% at center,hsl(0,0%,60%) 4.8%,hsla(0,0%,60%,0) 5%),
        linear-gradient(hsla(0,0%,55%,0) 46.9%,hsl(0,0%,65%) 47% 52.9%,hsla(0,0%,65%,0) 53%) 50% 50% / 99% 99% no-repeat;
}

@keyframes hamster {
    from, to { transform: rotate(4deg) translate(-0.8em,1.85em); }
    50% { transform: rotate(0) translate(-0.8em,1.85em); }
}

@keyframes hamsterHead {
    from, 25%, 50%, 75%, to { transform: rotate(0); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(8deg); }
}

@keyframes hamsterEye {
    from, 90%, to { transform: scaleY(1); }
    95% { transform: scaleY(0); }
}

@keyframes hamsterEar {
    from, 25%, 50%, 75%, to { transform: rotate(0); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(12deg); }
}

@keyframes hamsterBody {
    from, 25%, 50%, 75%, to { transform: rotate(0); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-2deg); }
}

@keyframes hamsterFRLimb {
    from, 25%, 50%, 75%, to { transform: rotate(50deg) translateZ(-1px); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-30deg) translateZ(-1px); }
}

@keyframes hamsterFLLimb {
    from, 25%, 50%, 75%, to { transform: rotate(-30deg); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(50deg); }
}

@keyframes hamsterBRLimb {
    from, 25%, 50%, 75%, to { transform: rotate(-60deg) translateZ(-1px); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(20deg) translateZ(-1px); }
}

@keyframes hamsterBLLimb {
    from, 25%, 50%, 75%, to { transform: rotate(20deg); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-60deg); }
}

@keyframes hamsterTail {
    from, 25%, 50%, 75%, to { transform: rotate(30deg) translateZ(-1px); }
    12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(10deg) translateZ(-1px); }
}

@keyframes spoke {
    from { transform: rotate(0); }
    to { transform: rotate(-1turn); }
}

.rematch-waiting-message {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.rematch-waiting-timer {
    font-size: 24px;
    font-weight: 700;
    color: #4a90d9;
}

.lobby-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.lobby-overlay.show {
    display: flex;
}

.lobby-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.lobby-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.lobby-header h2 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: #333;
}

.lobby-close {
    background: none;
    border: none;
    font-size: 42px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.lobby-close:hover {
    color: #333;
}

.lobby-body {
    display: block;
}

.lobby-section {
    margin-bottom: 20px;
}

.lobby-section h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    text-align: center;
}

.lobby-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-btn {
    background: #27ae60;
    color: #fff;
}

.create-btn:active {
    background: #1e8449;
    transform: scale(0.98);
}

.join-btn {
    background: #4a90d9;
    color: #fff;
}

.join-btn:active {
    background: #3a7bc8;
    transform: scale(0.98);
}

.cancel-btn {
    background: #e74c3c;
    color: #fff;
    margin-top: 16px;
}

.cancel-btn:active {
    background: #c0392b;
    transform: scale(0.98);
}

.lobby-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.lobby-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.lobby-divider span {
    background: #fff;
    padding: 0 16px;
    color: #999;
    font-size: 13px;
    position: relative;
}

.join-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.join-input-group input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.join-input-group input:focus {
    outline: none;
    border-color: #4a90d9;
}

.join-input-group .lobby-btn {
    width: 100%;
    padding: 10px 20px;
}

.lobby-waiting {
    display: none;
    text-align: center;
}

.lobby-waiting.show {
    display: block;
}

.lobby-waiting p {
    margin: 16px 0;
    color: #666;
    font-size: 14px;
}

.room-code-display {
    background: #f5f5f5;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.room-code-display span {
    font-size: 14px;
    color: #666;
}

.room-code-display .room-code {
    font-size: 24px;
    font-weight: 700;
    color: #4a90d9;
    letter-spacing: 4px;
}

.toast-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 300;
}

.toast-overlay.show {
    display: flex;
}

.toast-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.toast-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 16px;
}

.toast-btn {
    background: #4a90d9;
    border: none;
    color: #fff;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.toast-btn:active {
    background: #3a7bc8;
}

.mode-selector {
    margin-bottom: 16px;
}

.mode-select-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.mode-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.mode-select:hover {
    border-color: #4a90d9;
    background-color: #f5f9ff;
}

.mode-select:focus {
    outline: none;
    border-color: #27ae60;
    background-color: #f0fff4;
}

.mode-select option {
    padding: 10px;
    font-size: 14px;
}

.invite-btn {
    background: #4a90d9;
    color: #fff;
    margin-top: 8px;
    margin-bottom: 8px;
}

.invite-btn:active {
    background: #3a7bc8;
    transform: scale(0.98);
}

.invite-friend-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 210;
}

.invite-friend-overlay.show {
    display: flex;
}

.invite-friend-content {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 340px;
    max-height: 70vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.invite-friend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.invite-friend-header h3 {
    font-size: 18px;
    color: #333;
}

.invite-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.invite-close:hover {
    color: #333;
}

.invite-friend-list {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
}

.invite-loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.invite-empty {
    text-align: center;
    color: #999;
    padding: 20px;
}

.invite-friend-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.invite-friend-item:hover {
    background: #e9ecef;
}

.invite-friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
    overflow: hidden;
}

.invite-friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invite-friend-avatar.default-avatar::after {
    content: '';
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.invite-friend-info {
    flex: 1;
}

.invite-friend-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.invite-friend-status {
    font-size: 12px;
    color: #27ae60;
    margin-top: 2px;
}

.invite-friend-btn {
    background: #27ae60;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.invite-friend-btn:active {
    background: #1e8449;
    transform: scale(0.95);
}

.invite-friend-btn.invited {
    background: #95a5a6;
    cursor: default;
}

.game-invite-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 220;
}

.game-invite-overlay.show {
    display: flex;
}

.game-invite-modal {
    background: linear-gradient(135deg, #2d3436 0%, #1a1a2e 100%);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-invite-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-invite-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.game-invite-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.game-invite-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.game-invite-from {
    color: #00d4ff;
    font-weight: 600;
}

.game-invite-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.game-invite-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.game-invite-btn.accept {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #fff;
}

.game-invite-btn.decline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-invite-btn:hover {
    transform: translateY(-2px);
}
