/*
Theme Name: Court Game
Theme URI: http://localhost/court
Author: Court Dev
Description: Mahkeme salonu temalı rol bazlı oyun - WordPress teması
Version: 1.0
Text Domain: court-game
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-input: #16213e;
    --primary: #e94560;
    --primary-hover: #ff6b81;
    --secondary: #533483;
    --accent: #0f3460;
    --gold: #f5c518;
    --green: #00d474;
    --red: #e94560;
    --text: #eee;
    --text-muted: #8892b0;
    --border: #2a2a4a;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ===== LAYOUT ===== */
.court-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.court-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent) 100%);
    border-bottom: 3px solid var(--primary);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.court-header .logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.court-header .logo span {
    color: var(--primary);
}

.court-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.court-header .user-info .username {
    color: var(--text);
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233,69,96,0.4);
}

.btn-secondary {
    background: var(--accent);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #00a65a);
    color: #fff;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,212,116,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #c0392b);
    color: #fff;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a3e 50%, var(--bg-dark) 100%);
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-box h1 {
    text-align: center;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 8px;
}

.auth-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.15);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238892b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ===== LOBBY LIST ===== */
.lobby-section {
    padding: 40px 0;
}

.lobby-section h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--gold);
}

.lobby-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.lobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.lobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}

.lobby-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.lobby-card .lobby-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lobby-card .lobby-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.lobby-card .lobby-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lobby-card .lobby-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.status-waiting { background: rgba(245,197,24,0.15); color: var(--gold); }
.status-playing { background: rgba(233,69,96,0.15); color: var(--primary); }
.status-finished { background: rgba(0,212,116,0.15); color: var(--green); }

.lobby-card .lobby-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* ===== CREATE LOBBY MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-box h2 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.modal-box .modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
}
.modal-box .modal-close:hover { color: var(--primary); }

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ===== GAME ROOM ===== */
.game-room {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.game-phase-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 30px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 8px;
    border: 1px solid var(--border);
}

.phase-step {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    transition: all 0.3s;
    text-transform: uppercase;
}

.phase-step.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.phase-step.done {
    background: rgba(0,212,116,0.15);
    color: var(--green);
}

/* ===== CRIME CARD ===== */
.crime-card {
    background: linear-gradient(135deg, var(--bg-card), var(--accent));
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.crime-card::before {
    content: 'DAVA';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--bg-dark);
    padding: 2px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.crime-card .crime-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
}

/* ===== ROLE DISPLAY ===== */
.role-display {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
}

.role-display h3 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.role-defendant {
    background: rgba(233,69,96,0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.role-lawyer {
    background: rgba(83,52,131,0.2);
    color: #a78bfa;
    border: 1px solid #a78bfa;
}

.role-jury {
    background: rgba(245,197,24,0.1);
    color: var(--gold);
    border: 1px solid var(--gold);
}

/* ===== TIMER ===== */
.timer-container {
    text-align: center;
    margin-bottom: 25px;
}

.timer-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    position: relative;
    background: var(--bg-card);
}

.timer-circle.warning { border-color: var(--gold); color: var(--gold); }
.timer-circle.danger { border-color: var(--red); color: var(--red); animation: pulse 0.5s infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-label {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== DEFENSE AREA ===== */
.defense-area {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
}

.defense-area h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.defense-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.defense-area textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.defense-messages {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.defense-msg {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--bg-input);
    border-left: 3px solid var(--primary);
}

.defense-msg .msg-author {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.defense-msg.lawyer-msg {
    border-left-color: #a78bfa;
}
.defense-msg.lawyer-msg .msg-author {
    color: #a78bfa;
}

/* ===== VOTING ===== */
.voting-area {
    text-align: center;
    padding: 30px;
}

.vote-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.vote-btn {
    padding: 20px 40px;
    border-radius: var(--radius);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    min-width: 150px;
}

.vote-btn.guilty {
    background: rgba(233,69,96,0.1);
    color: var(--red);
    border-color: var(--red);
}
.vote-btn.guilty:hover, .vote-btn.guilty.selected {
    background: var(--red);
    color: #fff;
    transform: scale(1.05);
}

.vote-btn.innocent {
    background: rgba(0,212,116,0.1);
    color: var(--green);
    border-color: var(--green);
}
.vote-btn.innocent:hover, .vote-btn.innocent.selected {
    background: var(--green);
    color: #fff;
    transform: scale(1.05);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== RESULT ===== */
.result-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    animation: modalIn 0.5s ease;
}

.result-card.guilty-result { border-color: var(--red); }
.result-card.innocent-result { border-color: var(--green); }
.result-card.hung-result { border-color: var(--gold); }

.result-card .result-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.result-card .result-text {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.result-card .vote-breakdown {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 10px;
}

/* ===== PLAYERS LIST ===== */
.players-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.players-sidebar h3 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background 0.2s;
}

.player-item:hover { background: var(--bg-card-hover); }

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text);
}

.player-name { font-weight: 500; font-size: 0.9rem; }

.player-role-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===== GAME LAYOUT ===== */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}

.game-main { min-width: 0; }

/* ===== ALERT ===== */
.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.alert-error {
    background: rgba(233,69,96,0.15);
    color: var(--red);
    border: 1px solid rgba(233,69,96,0.3);
}
.alert-success {
    background: rgba(0,212,116,0.15);
    color: var(--green);
    border: 1px solid rgba(0,212,116,0.3);
}
.alert-info {
    background: rgba(15,52,96,0.3);
    color: #64b5f6;
    border: 1px solid rgba(100,181,246,0.3);
}

/* ===== WAITING ROOM ===== */
.waiting-room {
    text-align: center;
    padding: 40px 20px;
}

.waiting-room .waiting-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.waiting-room h2 {
    color: var(--gold);
    margin-bottom: 10px;
}

.waiting-room .player-count {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    .settings-row {
        grid-template-columns: 1fr;
    }
    .lobby-grid {
        grid-template-columns: 1fr;
    }
    .court-header {
        padding: 12px 15px;
    }
    .court-header .logo { font-size: 1.3rem; }
    .vote-buttons { flex-direction: column; align-items: center; }
}
