/* ===== Telemahalle Oyun Stilleri ===== */

:root {
    --game-bg: #1a472a;
    --card-bg: #fff;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.3);
    --table-felt: #2d6a4f;
    --gold: #f4a261;
    --turn-glow: #00ff88;
    --danger: #e74c3c;
    --info: #3498db;
    --success: #27ae60;
}

/* ===== Ortak Oyun Alanı ===== */

.game-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.turn-indicator {
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    font-weight: 600;
}

.turn-indicator.your-turn {
    background: var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.scoreboard {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.score-item {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.score-item.is-me {
    background: rgba(39, 174, 96, 0.3);
    border: 1px solid var(--success);
}

.player-name { font-weight: 600; }
.player-score { color: var(--gold); }

/* ===== Bildirim ===== */

.game-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    z-index: 1000;
    animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ===== Modal ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: #2c3e50;
    padding: 24px;
    border-radius: 16px;
    color: #fff;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin: 0 0 16px;
    font-size: 20px;
}

/* ===== Butonlar ===== */

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--info); color: #fff; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--gold); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 12px 32px; font-size: 18px; }

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
    flex-wrap: wrap;
}

/* ===== BATAK - Kart Stilleri ===== */

.batak-game {
    min-height: 100vh;
    background: var(--game-bg);
    padding: 12px;
}

.card-table {
    background: var(--table-felt);
    border-radius: 50%;
    width: 300px;
    height: 200px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}

.trick-area {
    display: flex;
    gap: 8px;
}

.played-card {
    animation: cardDrop 0.3s ease;
}

@keyframes cardDrop {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hand-area {
    display: flex;
    justify-content: center;
    gap: -15px;
    padding: 16px;
    flex-wrap: wrap;
}

.card-wrapper {
    cursor: pointer;
    transition: transform 0.2s;
    margin: 0 -8px;
}

.card-wrapper:hover { transform: translateY(-10px); z-index: 10; }
.card-wrapper.selected { transform: translateY(-20px); z-index: 20; }
.card-wrapper.playable { cursor: pointer; }

.card {
    width: 60px;
    height: 90px;
    background: var(--card-bg);
    border-radius: 6px;
    box-shadow: var(--card-shadow);
    position: relative;
    font-family: serif;
    user-select: none;
}

.card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    line-height: 1;
}

.card-corner.top-left { top: 3px; left: 4px; }
.card-corner.bottom-right { bottom: 3px; right: 4px; transform: rotate(180deg); }

.card-value { font-weight: 700; font-size: 14px; }
.card-suit { font-size: 12px; }

.card-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
}

/* Koz seçim butonları */
.suit-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.suit-btn {
    padding: 16px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.suit-btn:hover { background: rgba(255,255,255,0.2); border-color: currentColor; }
.suit-icon { font-size: 36px; }
.suit-name { font-size: 14px; color: #ccc; }

/* Taahhüt butonları */
.bid-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.bid-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.bid-btn:hover { background: var(--info); border-color: var(--info); }

/* ===== OKEY - Taş Stilleri ===== */

.okey-game {
    min-height: 100vh;
    background: #1a1a2e;
    padding: 12px;
}

.tile {
    width: 40px;
    height: 56px;
    background: #faf3e0;
    border: 2px solid;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tile-small {
    width: 28px;
    height: 38px;
    font-size: 13px;
}

.tile.is-okey {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    box-shadow: 0 0 8px rgba(253, 203, 110, 0.5);
}

.tile.is-joker {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: #fff !important;
}

.okey-hand {
    gap: 4px !important;
}

.tile-wrapper {
    cursor: pointer;
    transition: transform 0.2s;
}

.tile-wrapper:hover { transform: translateY(-6px); }
.tile-wrapper.selected { transform: translateY(-14px); }

.okey-table {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 20px 0;
}

.draw-pile {
    cursor: pointer;
}

.pile-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #fff;
}

.pile-tile {
    font-size: 40px;
}

.discard-area {
    display: flex;
    gap: 8px;
}

.empty-pile {
    width: 40px;
    height: 56px;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 10px;
}

/* ===== TAVLA - Tahta Stilleri ===== */

.tavla-game {
    min-height: 100vh;
    background: #3a2718;
    padding: 12px;
}

.tavla-board {
    background: #5a3a22;
    border: 4px solid #2c1810;
    border-radius: 12px;
    padding: 12px;
    max-width: 600px;
    margin: 16px auto;
    position: relative;
}

.points-row {
    display: flex;
    gap: 2px;
}

.board-point {
    flex: 1;
    min-height: 100px;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 2px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.board-point:nth-child(odd) { background: #8b4513; }
.board-point:nth-child(even) { background: #654321; }
.board-point.top:nth-child(odd) { background: #654321; }
.board-point.top:nth-child(even) { background: #8b4513; }

.board-point:hover { background: rgba(255,255,255,0.15); }
.board-point.selected { background: rgba(39, 174, 96, 0.4) !important; box-shadow: 0 0 8px var(--success); }
.board-point.valid-target { background: rgba(52, 152, 219, 0.4) !important; }

.point-number {
    font-size: 9px;
    color: rgba(255,255,255,0.4);
    position: absolute;
    top: 1px;
}

.pieces {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 12px;
}

.piece {
    font-size: 18px;
    line-height: 1;
}

.piece-count {
    font-size: 10px;
    color: var(--gold);
    font-weight: 700;
}

.board-bar {
    display: flex;
    justify-content: center;
    padding: 8px;
    background: #2c1810;
    margin: 4px 0;
    border-radius: 4px;
}

.bar-section {
    display: flex;
    gap: 16px;
    font-size: 16px;
}

.home-area {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.dice-display {
    display: flex;
    gap: 8px;
    align-items: center;
}

.die {
    font-size: 28px;
    animation: diceRoll 0.5s ease;
}

@keyframes diceRoll {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
    100% { transform: rotate(360deg); }
}

.moves-left {
    color: var(--gold);
    font-size: 12px;
}

/* ===== WebRTC Medya Paneli ===== */

.media-panel {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
    z-index: 50;
}

.video-container {
    width: 160px;
    height: 120px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-controls {
    display: flex;
    gap: 8px;
}

.media-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.media-btn.active { background: var(--success); color: #fff; }
.media-btn.inactive { background: var(--danger); color: #fff; }

/* ===== Chat Paneli ===== */

.chat-panel {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 300px;
    max-height: 300px;
    background: rgba(0,0,0,0.8);
    border-radius: 12px;
    overflow: hidden;
    z-index: 50;
}

.chat-messages {
    height: 220px;
    overflow-y: auto;
    padding: 12px;
}

.chat-msg {
    margin-bottom: 8px;
    font-size: 13px;
    color: #fff;
}

.chat-msg .msg-author {
    font-weight: 700;
    color: var(--gold);
}

.chat-input-area {
    display: flex;
    padding: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-input-area input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.chat-input-area button {
    background: var(--info);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff;
    margin-left: 8px;
    cursor: pointer;
    font-size: 13px;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .card { width: 48px; height: 72px; }
    .card-center { font-size: 22px; }
    .card-value { font-size: 12px; }
    .card-wrapper { margin: 0 -10px; }
    .card-table { width: 240px; height: 160px; }
    .tile { width: 32px; height: 44px; font-size: 14px; }
    .chat-panel { width: 250px; }
    .video-container { width: 120px; height: 90px; }
    .board-point { min-height: 70px; }
    .piece { font-size: 14px; }
}
