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

button,
input,
select {
    touch-action: manipulation;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.hidden {
    display: none !important;
}

.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#join-screen {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.join-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.join-box h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.join-box p {
    margin-bottom: 30px;
    color: #aaa;
}

.join-box input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

.join-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.join-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.btn-primary {
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 10px 25px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-leave {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.btn-leave:hover {
    background: rgba(255, 107, 107, 0.2);
}

.lobby-content {
    text-align: center;
}

.lobby-welcome {
    padding: 20px;
}

.lobby-welcome h2 {
    margin-bottom: 15px;
    color: #ffd700;
}

.lobby-welcome p {
    margin-bottom: 20px;
    font-size: 18px;
}

.lobby-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.lobby-buttons button {
    min-width: 250px;
}

.table-selector {
    margin-bottom: 20px;
    text-align: left;
}

.table-selector label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 14px;
}

.table-selector select {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    margin-bottom: 15px;
}

.table-selector select option {
    background: #1a1a2e;
    color: #fff;
}

.new-table-input {
    margin-bottom: 20px;
}

.new-table-input input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-align: left;
}

.new-table-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.new-table-input input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.table-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #ffd700;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    border-radius: 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 20px;
    text-align: center;
}

.table-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.table-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.table-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.table-item.current {
    border: 2px solid #00e676;
}

.current-badge {
    background: #00e676;
    color: #000;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    justify-content: center;
}

#game-screen {
    justify-content: flex-start;
    padding: 20px;
}

.header {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-bottom: 20px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.chip-icon {
    font-size: 24px;
}

.game-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.timer {
    background: #ff5722;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
}

.table {
    width: 100%;
    max-width: 900px;
    min-height: 450px;
    background: linear-gradient(145deg, #0d5c2e 0%, #0a4a24 50%, #0d5c2e 100%);
    border-radius: 200px;
    border: 15px solid #4a2c0a;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3), 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.dealer-area {
    text-align: center;
    padding: 20px;
}

.dealer-area h3 {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 15px;
}

.hand {
    display: flex;
    justify-content: center;
    gap: 10px;
    min-height: 100px;
    flex-wrap: wrap;
}

.card {
    width: 70px;
    height: 100px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.3s;
}

.card.red {
    color: #d32f2f;
}

.card.black {
    color: #1a1a1a;
}

.card .value {
    font-size: 22px;
}

.card .suit {
    font-size: 28px;
}

.card .corner {
    position: absolute;
    font-size: 12px;
    line-height: 1;
}

.card .corner.top-left {
    top: 5px;
    left: 5px;
}

.card .corner.bottom-right {
    bottom: 5px;
    right: 5px;
    transform: rotate(180deg);
}

.card-back {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    border: 3px solid #fff;
}

.card-back::after {
    content: '♠';
    font-size: 30px;
    color: rgba(255, 255, 255, 0.3);
}

.score {
    margin-top: 10px;
    font-size: 20px;
    font-weight: bold;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    display: inline-block;
}

.players-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.player-seat {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 15px;
    min-width: 150px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.player-seat.me {
    border-color: #00e676;
    background: rgba(0, 230, 118, 0.1);
}

.player-seat .seat-name {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.player-seat .seat-hand {
    min-height: 70px;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.player-seat .seat-hand .card {
    width: 40px;
    height: 60px;
    font-size: 14px;
}

.player-seat .seat-hand .card .suit {
    font-size: 16px;
}

.player-seat .seat-hand .card .corner {
    font-size: 8px;
}

.player-seat .seat-bet {
    margin-top: 8px;
    font-size: 14px;
    color: #ffd700;
}

.player-seat .seat-score {
    margin-top: 5px;
    font-size: 18px;
    font-weight: bold;
}

.player-seat .seat-status {
    margin-top: 5px;
    font-size: 12px;
    color: #aaa;
}

.message-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.game-message {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    animation: fadeIn 0.3s ease;
}

.controls {
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.betting-area {
    text-align: center;
}

.bet-display {
    font-size: 20px;
    margin-bottom: 20px;
}

.bet-display span {
    color: #ffd700;
    font-weight: bold;
    font-size: 28px;
}

.chip-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chip {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px dashed rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.chip[data-value="10"] {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.chip[data-value="25"] {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.chip[data-value="50"] {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.chip[data-value="100"] {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: #ffd700;
}

.chip[data-value="250"] {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.chip[data-value="500"] {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.chip:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bet-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.action-area {
    text-align: center;
}

.your-hand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 20px;
}

.your-hand span:last-child {
    font-size: 32px;
    font-weight: bold;
    color: #00e676;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-action {
    padding: 15px 40px;
    font-size: 20px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

#hit-btn {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
}

#hit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}

#stand-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
}

#stand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
}

#double-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: #fff;
}

#double-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.4);
}

#double-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#split-btn {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: #fff;
}

#split-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.4);
}

#split-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hands-area {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

#my-hands-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.my-hand {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 160px;
    transition: all 0.3s;
}

.my-hand.active {
    border-color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.1);
}

.my-hand.done {
    opacity: 0.85;
}

.my-hand .hand-header {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.my-hand .hand-cards {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.my-hand .hand-cards .card {
    width: 50px;
    height: 72px;
    font-size: 18px;
}

.my-hand .hand-cards .card .value {
    font-size: 16px;
}

.my-hand .hand-cards .card .suit {
    font-size: 20px;
}

.my-hand .hand-cards .card .corner {
    font-size: 9px;
}

.my-hand .hand-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.my-hand .hand-score {
    font-size: 22px;
    font-weight: bold;
    color: #00e676;
}

.my-hand .hand-bet {
    color: #ffd700;
    font-weight: bold;
}

.my-hand .hand-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: bold;
}

.my-hand .hand-status.win {
    background: rgba(0, 230, 118, 0.3);
    color: #00e676;
}

.my-hand .hand-status.lose {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.my-hand .hand-status.blackjack {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.my-hand .hand-status.push {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.result-area {
    text-align: center;
}

.result-message {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 15px;
}

.result-message.win {
    background: rgba(0, 230, 118, 0.2);
    color: #00e676;
}

.result-message.lose {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.result-message.push {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.result-message.blackjack {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 193, 7, 0.3) 100%);
    color: #ffd700;
    animation: glow 1s ease infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cardSlide {
    from {
        transform: translateX(-100px) rotate(-10deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
}

@keyframes cardFlip {
    0% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.card-slide {
    animation: cardSlide 0.5s ease forwards;
}

.card-flip {
    animation: cardFlip 0.5s ease forwards;
}

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

.chip-place {
    animation: chipPlace 0.3s ease forwards;
}

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

.pulse {
    animation: pulse 0.5s ease;
}

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

.shake {
    animation: shake 0.3s ease;
}

@media (max-width: 576px) {
    body {
        overflow: hidden;
    }

    .join-box {
        padding: 15px;
        margin: 10px;
    }

    .join-box h1 {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .join-box p {
        margin-bottom: 15px;
        font-size: 14px;
    }

    .join-box input,
    .table-selector select,
    .new-table-input input {
        padding: 10px 12px;
        font-size: 14px;
        margin-bottom: 12px;
    }

    .table-selector label {
        font-size: 12px;
    }

    #join-screen {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        padding: 10px;
    }

    .lobby-welcome h2 {
        font-size: 18px;
    }

    .lobby-welcome p {
        font-size: 14px;
    }

    .lobby-buttons {
        gap: 8px;
    }

    .lobby-buttons button {
        min-width: 200px;
        font-size: 14px;
        padding: 12px 20px;
    }

    #game-screen {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 6px;
    }

    .header {
        flex-shrink: 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
        padding: 6px 8px;
        margin-bottom: 4px;
        min-height: 40px;
    }

    .player-info {
        font-size: 12px;
        order: 1;
    }

    .chip-icon {
        font-size: 14px;
    }

    .player-info span:first-child {
        display: none;
    }

    .table-info {
        font-size: 11px;
        order: 2;
        gap: 4px;
    }

    .table-info span {
        font-size: 11px;
    }

    .table-info button {
        padding: 3px 6px;
        font-size: 10px;
    }

    .game-status {
        font-size: 11px;
        order: 3;
        background: rgba(0, 0, 0, 0.4);
        padding: 3px 8px;
        border-radius: 6px;
        flex-basis: 100%;
        text-align: center;
    }

    .timer {
        padding: 2px 6px;
        font-size: 11px;
    }

    .table {
        flex: 1;
        min-height: 0;
        border-radius: 20px;
        padding: 8px;
        border-width: 6px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .dealer-area {
        flex-shrink: 0;
        padding: 4px;
    }

    .dealer-area h3 {
        font-size: 11px;
        margin-bottom: 4px;
        color: #aaa;
    }

    .dealer-area h3:empty {
        display: none;
    }

    .hand {
        gap: 4px;
        min-height: 40px;
    }

    .card {
        width: 45px;
        height: 68px;
    }

    .card .value {
        font-size: 14px;
    }

    .card .suit {
        font-size: 18px;
    }

    .card .corner {
        font-size: 9px;
        display: block;
    }

    .card-back::after {
        font-size: 22px;
    }

    .score {
        display: none;
    }

    .players-area {
        flex: 1;
        min-height: 0;
        padding: 6px;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
        overflow-x: auto;
    }

    .player-seat {
        min-width: 100px;
        max-width: 120px;
        padding: 6px;
        flex-shrink: 0;
    }

    .player-seat .seat-name {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .player-seat .seat-hand {
        min-height: 40px;
        gap: 3px;
    }

    .player-seat .seat-hand .card {
        width: 40px;
        height: 60px;
    }

    .player-seat .seat-hand .card .value {
        font-size: 10px;
    }

    .player-seat .seat-hand .card .suit {
        font-size: 14px;
    }

    .player-seat .seat-hand .card .corner {
        display: block;
        font-size: 7px;
    }

    .player-seat .seat-bet,
    .player-seat .seat-score {
        font-size: 10px;
        margin-top: 2px;
    }

    .player-seat .seat-status {
        font-size: 9px;
    }

    .message-area {
        position: absolute;
    }

    .game-message {
        font-size: 14px;
        padding: 8px 12px;
    }

    .controls {
        flex-shrink: 0;
        padding: 8px;
        margin-top: 4px;
    }

    .betting-area,
    .action-area,
    .result-area {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bet-display {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .bet-display span {
        font-size: 16px;
    }

    .chip-selector {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
        margin-bottom: 6px;
        width: 100%;
        max-width: 280px;
    }

    .chip {
        width: 45px;
        height: 45px;
        font-size: 11px;
        border-width: 3px;
    }

    .bet-actions {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        max-width: 280px;
    }

    .bet-actions button {
        flex: 1;
        padding: 8px 12px;
        font-size: 12px;
    }

    .your-hand {
        font-size: 12px;
        margin-bottom: 4px;
        gap: 8px;
    }

    .your-hand span:last-child {
        font-size: 18px;
    }

    .action-buttons {
        flex-direction: row;
        gap: 6px;
        width: 100%;
        max-width: 280px;
    }

    .btn-action {
        flex: 1;
        padding: 10px 8px;
        font-size: 13px;
        min-height: 36px;
    }

    .result-message {
        font-size: 14px;
        padding: 8px;
        margin-bottom: 6px;
    }

    .result-area button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .modal-content {
        min-width: auto;
        max-width: calc(100% - 16px);
        padding: 12px;
        margin: 8px;
    }

    .modal-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .table-list {
        max-height: 150px;
    }

    .table-item {
        padding: 8px;
        font-size: 12px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-small {
        min-height: 36px;
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .join-box h1 {
        font-size: 20px;
    }

    .card {
        width: 36px;
        height: 54px;
    }

    .card .value {
        font-size: 11px;
    }

    .card .suit {
        font-size: 14px;
    }

    .card .corner {
        font-size: 7px;
    }

    .chip {
        width: 36px;
        height: 36px;
        font-size: 9px;
    }

    .chip[data-value="500"],
    .chip[data-value="250"] {
        display: none;
    }

    .player-seat {
        min-width: 70px;
        max-width: 90px;
    }

    .player-seat .seat-hand .card {
        width: 32px;
        height: 48px;
    }

    .player-seat .seat-hand .card .value {
        font-size: 8px;
    }

    .player-seat .seat-hand .card .suit {
        font-size: 12px;
    }

    .player-seat .seat-hand .card .corner {
        display: block;
        font-size: 6px;
    }

    .btn-action {
        font-size: 12px;
        padding: 8px 6px;
    }

    .header {
        padding: 4px 6px;
    }

    .player-info {
        font-size: 11px;
    }

    .table-info {
        font-size: 10px;
    }

    .game-status {
        font-size: 10px;
    }
}

.footer-link {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 100;
}

.footer-link a {
    color: #58a6ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link a:hover {
    color: #79b8ff;
}
