* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --bg-color: #1a202c;
    --card-bg: #2d3748;
    --text-color: #e2e8f0;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #2d3748 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.screen {
    display: none;
    width: 100%;
    animation: fadeIn 0.3s ease-in;
    will-change: opacity, transform;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titlePulse 2s ease-in-out infinite;
}

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

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-accent {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
    color: white;
}

.btn-large {
    padding: 20px 30px;
    font-size: 1.2rem;
    margin: 10px 0;
}

.welcome {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.menu-buttons {
    max-width: 400px;
    margin: 0 auto;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 10px;
    accent-color: var(--primary-color);
}

#matchCountValue {
    display: inline-block;
    width: 40px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

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

.radio-label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--primary-color);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
}

.button-group .btn {
    flex: 1;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 2rem auto;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.searching-text {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* Game Screen */
.game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 20px;
}

.player-info,
.opponent-info {
    flex: 1;
    text-align: center;
}

.player-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.player-symbol {
    font-size: 2rem;
    font-weight: bold;
}

.game-status {
    flex: 1;
    text-align: center;
}

.turn-indicator {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--card-bg);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.turn-indicator.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.match-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.score-board.hidden {
    display: none;
}

.score-item {
    text-align: center;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    background: var(--bg-color);
    padding: 10px;
    border-radius: 15px;
}

.cell {
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@media (hover: hover) and (pointer: fine) {
    .cell:hover:not(.filled) {
        background: var(--border-color);
        transform: scale(1.05);
    }
}

.cell.filled {
    cursor: not-allowed;
}

.cell.winner {
    animation: winnerCell 0.6s ease-in-out;
    background: linear-gradient(135deg, var(--success-color), #38a169);
    will-change: transform;
}

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

.cell-content {
    animation: symbolPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    will-change: transform, opacity;
}

@keyframes symbolPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.cell-content.x {
    color: var(--danger-color);
    text-shadow: 0 0 10px rgba(245, 101, 101, 0.5);
}

.cell-content.o {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

#leaveGameBtn {
    display: block;
    margin: 0 auto;
}

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

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.series-scores {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.series-scores.hidden {
    display: none;
}

.series-scores h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.series-scores p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

/* Lobby Screen Styles */
.info-text {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.lobby-opponent {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
}

.lobby-opponent span {
    color: var(--primary-color);
    font-weight: bold;
}

.settings-notice {
    padding: 10px;
    background: var(--warning-color);
    color: white;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
    animation: slideIn 0.3s ease-out;
}

.settings-notice.hidden {
    display: none;
}

.settings-notice span {
    font-weight: bold;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ready-status {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.ready-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 8px;
}

.ready-player span:first-child {
    font-weight: 600;
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.ready {
    background: var(--success-color);
    color: white;
}

.status-badge.not-ready {
    background: var(--border-color);
    color: var(--text-secondary);
}

/* Game End Overlay */
.game-end-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.game-end-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.game-end-content {
    text-align: center;
    padding: 3rem;
    animation: zoomIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    will-change: transform, opacity;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-end-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 1s ease-in-out;
    will-change: filter;
}

@keyframes textGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.5);
    }
}

.game-end-title.winner {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-end-title.draw {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-end-subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.button-group-overlay {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-group-overlay .btn {
    min-width: 200px;
}

/* Parkour Game Styles */
.parkour-container {
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.parkour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 15px;
}

.parkour-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.parkour-info span {
    color: var(--primary-color);
}

.parkour-separator {
    color: var(--text-secondary) !important;
    font-size: 1.5rem;
}

.parkour-stats {
    display: flex;
    gap: 20px;
    font-size: 1rem;
}

.parkour-stats span {
    color: var(--text-secondary);
}

.parkour-stats span span {
    color: var(--primary-color);
    font-weight: bold;
}

#parkourCanvas {
    flex: 1;
    background: var(--card-bg);
    border-radius: 10px;
    display: block;
    max-height: calc(100vh - 200px);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.parkour-controls {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.control-info p {
    margin: 0;
}

/* Touch Controls */
.parkour-touch-controls {
    display: none;
    margin: 20px 0;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

.touch-btn {
    width: 80px;
    height: 80px;
    border: 3px solid var(--primary-color);
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary-color);
    font-size: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    touch-action: none;
}

.touch-btn:active {
    background: rgba(102, 126, 234, 0.4);
    transform: scale(0.95);
}

.touch-jump {
    background: rgba(72, 187, 120, 0.2);
    border-color: #48bb78;
    color: #48bb78;
}

.touch-jump:active {
    background: rgba(72, 187, 120, 0.4);
}

.touch-rope {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #f59e0b;
}

.touch-rope:active {
    background: rgba(245, 158, 11, 0.4);
}

.touch-down {
    background: rgba(160, 174, 192, 0.2);
    border-color: #a0aec0;
    color: #a0aec0;
}

.touch-down:active {
    background: rgba(160, 174, 192, 0.4);
}

/* Show touch controls on tablets and mobile */
@media (max-width: 1024px) {
    .parkour-touch-controls {
        display: flex;
    }
    
    .control-info {
        display: none;
    }
}

/* Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    /* iPad Landscape und Portrait */
    .title {
        font-size: 2.5rem;
    }

    .board {
        grid-template-columns: repeat(3, 110px);
        grid-template-rows: repeat(3, 110px);
        gap: 12px;
    }

    .cell {
        font-size: 3rem;
        border-radius: 12px;
    }

    .container {
        max-width: 700px;
    }

    .game-end-title {
        font-size: 3.5rem;
    }

    .btn-large {
        padding: 18px 28px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .menu-buttons {
        padding: 0 10px;
    }
    
    .btn-large {
        padding: 18px 25px;
        font-size: 1.1rem;
        margin: 8px 0;
        width: 100%;
    }

    .board {
        grid-template-columns: repeat(3, 90px);
        grid-template-rows: repeat(3, 90px);
        gap: 8px;
    }

    .cell {
        font-size: 2rem;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
    }

    .game-end-title {
        font-size: 2.5rem;
    }

    .button-group-overlay {
        flex-direction: column;
    }

    .button-group-overlay .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-large {
        padding: 16px 20px;
        font-size: 1rem;
        margin: 6px 0;
    }
    
    .card {
        padding: 1.5rem;
    }

    .board {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(3, 70px);
        gap: 6px;
    }

    .cell {
        font-size: 1.5rem;
    }

    .game-end-title {
        font-size: 2rem;
    }

    .game-end-subtitle {
        font-size: 1.2rem;
    }
}

/* Touch-Verbesserungen für Tablets */
@media (hover: none) and (pointer: coarse) {
    .cell {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 48px; /* Better touch target size */
    }
    
    .btn-large {
        min-height: 56px;
    }

    .cell:active {
        transform: scale(0.95);
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* ============ CHESS STYLES ============ */

.btn-chess {
    background: linear-gradient(135deg, #2c3e50, #4a5568);
    color: white;
}

.btn-chat {
    background: linear-gradient(135deg, #38a169, #48bb78);
    color: white;
}

.chess-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.chess-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.chess-player-info {
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 10px;
}

.chess-player-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.chess-status-container {
    text-align: center;
}

.chess-turn {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.chess-turn.your-turn {
    background: var(--success-color);
    animation: pulse 1.5s infinite;
}

.chess-game-status {
    margin-top: 8px;
    font-weight: bold;
    color: var(--warning-color);
}

.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    max-width: 560px;
    margin: 0 auto 20px auto;
    border: 4px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.chess-square {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.chess-square.light {
    background: #f0d9b5;
}

.chess-square.dark {
    background: #b58863;
}

.chess-square:hover {
    filter: brightness(1.1);
}

.chess-square.selected {
    background: #7cb342 !important;
}

.chess-square.valid-move {
    position: relative;
}

.chess-square.valid-move::after {
    content: '';
    position: absolute;
    width: 30%;
    height: 30%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

.chess-square.valid-move:hover {
    background: #aed581 !important;
}

.chess-piece {
    font-size: 2.5rem;
    user-select: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.chess-piece.white {
    color: #fff;
    text-shadow: 0 0 3px #000, 0 0 6px #000;
}

.chess-piece.black {
    color: #000;
}

.coord-label {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    opacity: 0.7;
}

.row-label {
    top: 2px;
    left: 4px;
}

.col-label {
    bottom: 2px;
    right: 4px;
}

.chess-square.light .coord-label {
    color: #b58863;
}

.chess-square.dark .coord-label {
    color: #f0d9b5;
}

.chess-controls {
    margin-top: 20px;
}

/* ============ CHAT STYLES ============ */

.chat-container {
    max-width: 800px;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

#chatScreen.screen.active {
    display: flex;
    justify-content: center;
    align-self: stretch;
    position: fixed;
    inset: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.chat-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-color);
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    word-wrap: break-word;
}

.chat-message.own {
    align-self: flex-end;
    background: var(--primary-color);
    border-bottom-right-radius: 4px;
}

.chat-message.other {
    align-self: flex-start;
    background: var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.chat-message-username {
    font-weight: bold;
}

.chat-message-time {
    opacity: 0.7;
}

.chat-message-content {
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-message-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.chat-input-container input {
    flex: 1;
    min-height: 44px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    width: auto;
    margin-bottom: 0;
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-icon {
    padding: 12px 16px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.chat-system-message {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 5px;
}

/* Chess responsive */
@media (max-width: 600px) {
    .chess-board {
        max-width: 320px;
    }
    
    .chess-piece {
        font-size: 1.8rem;
    }
    
    .chess-header {
        flex-direction: column;
    }
}

/* Chat responsive */
@media (max-width: 600px) {
    .chat-message {
        max-width: 90%;
    }
}

/* Chat responsive */
@media (max-width: 600px) {
    .chat-message {
        max-width: 90%;
    }
}

