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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.main-menu {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.main-menu h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 40px;
    font-size: 2.5em;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.menu-section input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border 0.3s;
}

.menu-section input:focus {
    outline: none;
    border-color: #667eea;
}

.menu-section button, button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.menu-section button:hover, button:hover {
    transform: scale(1.05);
}

.divider {
    text-align: center;
    color: #999;
    margin: 30px 0;
    font-weight: bold;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
}

.message.error {
    background: #ffebee;
    color: #c62828;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* OYUN EKRANI */
.game-body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.top-players {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.game-middle {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.left-player, .right-player {
    width: 150px;
}

.player-info {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.player-info.active {
    background: #ffd700;
    box-shadow: 0 0 20px #ffd700;
}

.player-info h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.player-cards-count {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}

.mini-card {
    width: 20px;
    height: 28px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 3px;
}

.table-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.table-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Deste - sağ üst köşe */
.deck-corner {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 150px;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 100;
}

.deck-corner:hover {
    transform: scale(1.1);
}

.card-back {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 15px;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.deck-count {
    color: white;
    font-size: 2em;
    font-weight: bold;
}

.deck-label {
    text-align: center;
    color: white;
    font-weight: bold;
    margin-top: 5px;
    font-size: 0.9em;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.table-card {
    width: 120px;
    height: 180px;
}

.card {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-10px);
}

.card.red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.card.blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.card.green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.card.yellow { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.card.wild { 
    background: linear-gradient(135deg, #e74c3c 0%, #3498db 25%, #2ecc71 50%, #f1c40f 75%, #e74c3c 100%);
}

.card-value {
    font-size: 0.8em;
}

.game-info {
    text-align: center;
    color: white;
    font-size: 1.2em;
    margin-top: 10px;
}

/* Chat container */
.chat-container {
    position: fixed;
    bottom: 200px;
    left: 20px;
    width: 300px;
    height: 400px;
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s ease;
}

.chat-container.minimized {
    height: 60px;
}

.chat-container.minimized .chat-messages,
.chat-container.minimized .chat-input-container {
    display: none;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    font-weight: bold;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-toggle {
    position: absolute;
    right: 10px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.9em;
}

.chat-message.me {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.chat-message.other {
    background: #f0f0f0;
    color: #333;
    align-self: flex-start;
}

.chat-message.bot {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    align-self: flex-start;
}

.chat-sender {
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 3px;
    opacity: 0.8;
}

.chat-input-container {
    display: flex;
    padding: 10px;
    gap: 10px;
    border-top: 2px solid #e0e0e0;
}

.chat-input-container input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-container button {
    width: 50px;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-input-container button:hover {
    transform: scale(1.1);
}

.my-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    min-height: 100px;
}

.my-cards .card {
    width: 100px;
    height: 150px;
    font-size: 2em;
}

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

.waiting-screen h2 {
    color: white;
    margin-bottom: 30px;
}

#waiting-players {
    color: white;
    font-size: 1.2em;
    margin-bottom: 30px;
}

#start-btn, #bot-btn {
    width: 300px;
    margin: 10px 0;
}

#bot-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.color-picker-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 2000;
}

.color-picker-modal h3 {
    text-align: center;
    margin-bottom: 20px;
}

.color-options {
    display: flex;
    gap: 20px;
}

.color-option {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.color-option:hover {
    transform: scale(1.2);
}

.color-option.red { background: #e74c3c; }
.color-option.blue { background: #3498db; }
.color-option.green { background: #2ecc71; }
.color-option.yellow { background: #f1c40f; }

.winner-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 2000;
    text-align: center;
}

.winner-modal h1 {
    color: #f1c40f;
    font-size: 3em;
    margin-bottom: 20px;
}

.winner-modal h2 {
    color: #333;
    margin-bottom: 30px;
}

.winner-modal button {
    width: 300px;
}

@media (max-width: 768px) {
    .my-cards .card {
        width: 70px;
        height: 105px;
        font-size: 1.5em;
    }
    
    .game-middle {
        flex-direction: column;
    }
    
    .left-player, .right-player {
        width: 100%;
    }
    
    .chat-container {
        width: 250px;
        height: 300px;
        bottom: 150px;
        left: 10px;
    }
    
    .deck-corner {
        width: 80px;
        height: 120px;
        top: 10px;
        right: 10px;
    }
}

