:root {
    --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
    --panel-bg: rgba(255, 255, 255, 0.9);
    --primary: #3b82f6;
    --success: #10b981;
    --text-dark: #1e293b;
    --white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.header-panel {
    background: var(--panel-bg);
    width: 100%;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid #dbeafe;
}

h1 {
    margin: 0;
    font-size: 1.4rem;
    color: #1e3a8a;
    letter-spacing: 0.5px;
}

.role-badge {
    font-size: 0.9rem;
    margin-top: 4px;
    color: #64748b;
    font-weight: 600;
}

.board-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 10px 0;
}

#myBoard {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    border: 6px solid #bfdbfe;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
    background-color: white;
}

.status-panel {
    background: var(--panel-bg);
    width: 100%;
    padding: 14px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #1e3a8a;
    border: 2px solid #dbeafe;
    margin-bottom: 5px;
}

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(224, 242, 254, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay-content {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    max-width: 90%;
    width: 360px;
    border: 3px solid #93c5fd;
}

.overlay-content h2 {
    color: #1e3a8a;
    margin-top: 0;
    font-size: 1.6rem;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

button {
    padding: 16px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.btn-white { background: #f8fafc; color: #1e293b; border: 3px solid #cbd5e1; }
.btn-black { background: #334155; color: var(--white); border: 3px solid #1e293b; }
button:active { transform: scale(0.95); }

/* Özel neşeli tahta renkleri */
.white-1e1a7 { background-color: #f0f9ff !important; }
.black-b7a11 { background-color: #bae6fd !important; }