﻿/* oyunlar.css */

:root {
  --bg-app: #e8e4d9; 
  --panel-bg: #fdfcf9; 
  --ink: #1a1815; 
  --muted: #736b60; 
  --gold: #d4af37;
  --gold-muted: rgba(212, 175, 55, 0.5);
  --border-light: rgba(0,0,0,0.06);
  --c-9:   #8E523A; 
}

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

body { 
  background-color: var(--bg-app); 
  background-image: radial-gradient(circle at top center, #f5f3ee 0%, #e8e4d9 100%);
  color: var(--ink); 
  font-family: 'Inter', sans-serif; 
  -webkit-user-select: none; user-select: none;
  min-height: 100vh;
}

.header { padding: 24px 20px 16px; text-align: center; }
.ph-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; letter-spacing: 0.25em; color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 8px; font-weight: 700;}
.ph-title { font-family: 'Playfair Display', serif; font-size: 2.1rem; font-weight: 900; line-height: 1.1; color: var(--ink); }

.nav-bar { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.nav-btn { background: var(--panel-bg); border: 1px solid var(--border-light); padding: 10px 20px; border-radius: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s; color: var(--ink); text-decoration: none;}
.nav-btn:hover { background: var(--c-9); color: white; border-color: var(--c-9); }
.nav-btn.active { background: var(--c-9); color: white; border-color: var(--c-9); }

.game-container { max-width: 600px; margin: 0 auto; padding: 20px; background: var(--panel-bg); border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid var(--border-light); margin-bottom: 30px; display: none;}
.game-container.active { display: block; }

.game-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.score-box { background: rgba(0,0,0,0.05); padding: 10px 15px; border-radius: 8px; text-align: center; }
.score-title { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; font-family: 'IBM Plex Mono', monospace; font-weight: 700; margin-bottom: 4px; }
.score-value { font-size: 1.2rem; font-weight: 700; font-family: 'Playfair Display', serif; }

.controls { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.action-btn { background: var(--ink); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: transform 0.1s; }
.action-btn:active { transform: scale(0.95); }

/* Data Management Box */
.data-box { max-width: 600px; margin: 0 auto 40px; padding: 15px; background: rgba(142, 82, 58, 0.1); border: 1px dashed var(--c-9); border-radius: 12px; display: flex; justify-content: space-between; align-items: center; }
.data-text { font-size: 0.8rem; color: var(--c-9); font-weight: 600; }
.data-actions { display: flex; gap: 10px; }
.data-btn { background: var(--c-9); color: white; border: none; padding: 8px 12px; border-radius: 6px; font-size: 0.7rem; cursor: pointer; font-family: 'IBM Plex Mono', monospace; font-weight: 700; }
.data-btn:hover { opacity: 0.9; }

/* 2048 Board */
.grid-2048 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; background: #bbada0; padding: 10px; border-radius: 8px; max-width: 400px; margin: 0 auto; aspect-ratio: 1/1; position: relative; }
.grid-cell { background: rgba(238, 228, 218, 0.35); border-radius: 4px; }
.tile { position: absolute; display: flex; justify-content: center; align-items: center; font-weight: 700; border-radius: 4px; transition: transform 0.15s ease-in-out; text-align: center; padding: 5px; font-size: 0.9rem; font-family: 'Playfair Display', serif; }

.tile-2 { background: #eee4da; color: #776e65; }
.tile-4 { background: #ede0c8; color: #776e65; }
.tile-8 { background: #f2b179; color: #f9f6f2; }
.tile-16 { background: #f59563; color: #f9f6f2; }
.tile-32 { background: #f67c5f; color: #f9f6f2; }
.tile-64 { background: #f65e3b; color: #f9f6f2; }
.tile-128 { background: #edcf72; color: #f9f6f2; font-size: 0.8rem; }
.tile-256 { background: #edcc61; color: #f9f6f2; font-size: 0.8rem; }
.tile-512 { background: #edc850; color: #f9f6f2; font-size: 0.8rem; }
.tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 0.7rem; }
.tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 0.7rem; box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.33); }

/* Memory Board */
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 500px; margin: 0 auto; }
.memory-card { aspect-ratio: 3/4; perspective: 1000px; cursor: pointer; }
.memory-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; }
.memory-card.flipped .memory-card-inner { transform: rotateY(180deg); }
.memory-card-front, .memory-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 8px; display: flex; justify-content: center; align-items: center; padding: 10px; font-size: 0.85rem; font-weight: 600; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.memory-card-front { background: var(--c-9); color: white; font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.memory-card-back { background: var(--panel-bg); color: var(--ink); transform: rotateY(180deg); border: 2px solid var(--c-9); }
.memory-card.matched .memory-card-inner { transform: rotateY(180deg) scale(0.95); opacity: 0.7; }

/* Hangman */
.hangman-word { display: flex; justify-content: center; gap: 8px; margin-bottom: 25px; flex-wrap: wrap;}
.hangman-letter { width: 35px; height: 45px; border-bottom: 3px solid var(--ink); display: flex; justify-content: center; align-items: flex-end; font-size: 1.5rem; font-family: 'IBM Plex Mono', monospace; font-weight: 700; text-transform: uppercase; padding-bottom: 5px;}
.hangman-keyboard { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 450px; margin: 0 auto; }
.key-btn { background: var(--panel-bg); border: 1px solid var(--border-light); border-radius: 6px; width: 35px; height: 40px; font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.1s; }
.key-btn:active { transform: scale(0.9); }
.key-btn.correct { background: #295F4E; color: white; border-color: #295F4E; pointer-events: none; }
.key-btn.wrong { background: #9B1C1C; color: white; border-color: #9B1C1C; pointer-events: none; opacity: 0.6;}

/* Sudoku */
.sudoku-board { display: grid; grid-template-columns: repeat(9, 1fr); max-width: 400px; margin: 0 auto 20px; border: 2px solid var(--ink); aspect-ratio: 1/1; background: var(--panel-bg);}
.sudoku-cell { border: 1px solid var(--border-light); display: flex; justify-content: center; align-items: center; font-size: 1.2rem; font-family: 'Playfair Display', serif; font-weight: 700; cursor: pointer; transition: background 0.2s;}
.sudoku-cell:nth-child(3n) { border-right: 2px solid var(--ink); }
.sudoku-cell:nth-child(9n) { border-right: none; }
.sudoku-row:nth-child(3n) .sudoku-cell { border-bottom: 2px solid var(--ink); }
.sudoku-cell.selected { background: rgba(212, 175, 55, 0.3); }
.sudoku-cell.initial { color: var(--ink); }
.sudoku-cell.user-input { color: #295F4E; font-family: 'IBM Plex Mono', monospace;}
.sudoku-cell.error { color: #9B1C1C; background: rgba(155, 28, 28, 0.1); }
.sudoku-numpad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.sudoku-numpad button { padding: 12px 0; font-size: 1.2rem; font-weight: 700; font-family: 'IBM Plex Mono', monospace; background: var(--ink); color: white; border: none; border-radius: 8px; cursor: pointer; transition: transform 0.1s; }
.sudoku-numpad button:active { transform: scale(0.95); }

/* Strategy Games */
.category-title { text-transform: uppercase; letter-spacing: 2px; }
.reigns-bars { background: var(--panel-bg); border: 1px solid var(--border-light); padding: 15px; border-radius: 8px; }
.reigns-bar-container { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 1.2rem; color: var(--muted); height: 100px; width: 40px; background: rgba(0,0,0,0.05); border-radius: 20px; padding: 5px; position: relative; }
.reigns-bar-fill { position: absolute; bottom: 5px; left: 5px; width: 30px; background: var(--c-9); border-radius: 15px; transition: height 0.3s; }
.reigns-card { background: var(--panel-bg); border: 1px solid var(--border-light); border-radius: 12px; padding: 30px 20px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.reigns-character { font-size: 4rem; margin-bottom: 20px; }
.reigns-text { font-size: 1.1rem; line-height: 1.5; font-family: 'Playfair Display', serif; }

.sr-item { display: flex; justify-content: space-between; margin-bottom: 5px; font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; }
.crisis-box p { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.crisis-options button { text-align: left; padding: 15px; border-radius: 8px; font-size: 0.95rem; font-family: 'Inter', sans-serif; cursor: pointer; transition: background 0.2s; }
.crisis-options button:hover { background: rgba(0,0,0,0.05) !important; }

/* Master Categories & UI Elements */
.master-categories { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.master-btn { background: var(--panel-bg); border: 2px solid var(--ink); padding: 15px 30px; border-radius: 12px; font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: all 0.2s; color: var(--ink); box-shadow: 4px 4px 0px var(--ink); }
.master-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px var(--ink); }
.master-btn:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px var(--ink); }
.category-section { display: none; }
.category-section.active { display: block; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Floating Action Button */
.fab-btn { position: fixed; bottom: 30px; right: 30px; background: rgba(142, 82, 58, 0.85); color: white; border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: all 0.2s; backdrop-filter: blur(5px); z-index: 100;}
.fab-btn:hover { transform: scale(1.1); background: rgba(142, 82, 58, 1); }

/* Unified Game Log Box */
.game-log { background: var(--panel-bg); border: 1px solid var(--border-light); padding: 15px; border-radius: 8px; font-size: 0.85rem; line-height: 1.5; height: 120px; overflow-y: auto; margin-bottom: 20px; font-family: 'IBM Plex Mono', monospace; }

/* Siege / Strategy Action Boxes */
.siege-action-box { flex: 1; text-align: center; background: rgba(0,0,0,0.03); padding: 15px 10px; border-radius: 8px; }
.sa-icon { font-size: 1.8rem; margin-bottom: 8px; }
.sa-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 5px; }
.sa-cost { font-size: 0.75rem; color: var(--muted); margin-bottom: 12px; }

/* Modal Styles */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 1000; opacity: 0; transition: opacity 0.3s; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-overlay .modal-content { background: var(--panel-bg); padding: 30px; border-radius: 12px; max-width: 90%; width: 400px; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.2); transform: translateY(20px); transition: transform 0.3s; text-align: center; border: 1px solid var(--border-light);}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); transition: color 0.2s; }
.modal-close:hover { color: #9B1C1C; }

/* Historical Chess Styles */
.chess-board { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border: 6px solid #5d4037; border-radius: 4px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.chess-square { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; cursor: pointer; position: relative; }
.chess-square.light { background-color: #e3c193; }
.chess-square.dark { background-color: #8c5b3f; }
.chess-square.selected { background-color: rgba(255, 255, 0, 0.4); }
.chess-square.valid-move::after { content: ''; display: block; width: 25%; height: 25%; background: rgba(0,0,0,0.3); border-radius: 50%; position: absolute; }
.chess-piece { font-size: 6vw; user-select: none; transition: transform 0.2s; }
@media(min-width: 500px) { .chess-piece { font-size: 32px; } }
.chess-piece:active { transform: scale(1.2); }
.chess-promo-btn { font-size: 2rem; cursor: pointer; padding: 5px; background: #eee; border-radius: 5px; transition: background 0.2s; }
.chess-promo-btn:hover { background: #ddd; }
/* ==========================================
   YEN� E�LENCE ODAKLI OYUNLAR (T�M �N�TELER ORTAK)
   ========================================== */
.oyun-tam-ekran {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* D��ar� ta�malar� engeller */
}

.oyun-ust-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: white;
    border-bottom: 3px solid rgba(0,0,0,0.2);
}

.oyun-kapat-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}
.oyun-tam-ekran.hidden {
    display: none !important;
}

