* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    width: 760px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.game-header {
    margin-bottom: 20px;
}

h1 { 
    color: #0f172a; 
    font-size: 26px; 
    font-weight: 800;
}

.version-badge {
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    vertical-align: middle;
    font-weight: 600;
}

.status-banner {
    background: #4f46e5;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 12px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transition: all 0.3s ease;
}

/* --- KART VE LOBİ SEÇİM EKRANI --- */
.selection-screen {
    margin-top: 15px;
}

.settings-box {
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.settings-box label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.select-dropdown {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
}

.selection-screen h2 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 5px;
}

.selection-screen p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 15px;
}

.card-pool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding: 5px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pool-card-item {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.pool-card-item:hover {
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.pool-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

/* Mini Önizleme Izgarası (Lobi İçin) */
.mini-grid {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 4px;
}

.mini-cell {
    background: #ffffff;
    font-size: 7px;
    font-weight: bold;
    color: #475569;
    text-align: center;
    min-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
}

.mini-cell.empty {
    background: #e2e8f0;
    opacity: 0.3;
}

/* --- OYUN İÇİ EKRAN STİLLERİ --- */
.draw-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.draw-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.number-display {
    font-size: 52px;
    font-weight: 800;
    color: #ef4444;
    background: #fee2e2;
    width: 90px;
    height: 90px;
    line-height: 90px;
    margin: 8px 0 14px 0;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn:active { transform: scale(0.97); }

.btn.primary { background-color: #10b981; color: white; }
.btn.primary:hover { background-color: #059669; }

.btn.secondary { background-color: #f59e0b; color: white; }
.btn.secondary:hover { background-color: #d97706; }

.btn.danger { background-color: #ef4444; color: white; }
.btn.danger:hover { background-color: #dc2626; }

.btn.small { padding: 6px 12px; font-size: 12px; background-color: #3b82f6; color: white; }
.btn.small:hover { background-color: #2563eb; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header h3 { font-size: 15px; color: #334155; font-weight: 700; }

/* 3x9 Tombala Kartı Izgarası */
.grid-card {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: repeat(9, 1fr);
    gap: 6px;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 12px;
    border: 2px solid #cbd5e1;
}

.cell {
    background: #ffffff;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cell:hover:not(.empty):not(.marked) {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.cell.empty {
    background: #e2e8f0;
    opacity: 0.3;
    cursor: default;
    box-shadow: none;
}

.cell.marked {
    background-color: #eab308;
    color: #fff;
    text-decoration: line-through;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Rakip Botlar Paneli */
.bots-section {
    margin-top: 20px;
    background: #f8fafc;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.bots-section h3 {
    font-size: 14px;
    color: #475569;
    margin-bottom: 10px;
    font-weight: 700;
}

.bots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bot-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.bot-name { font-weight: 600; color: #334155; }
.bot-status { color: #64748b; font-size: 12px; font-weight: 500; }

.history-section {
    margin-top: 20px;
    text-align: left;
    font-size: 13px;
    max-height: 75px;
    overflow-y: auto;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.history-section h4 {
    margin-bottom: 6px;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}