* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Tahoma', 'Vazir', sans-serif;
    background: linear-gradient(145deg, #1e3c72, #2b4d8c);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-size: 16px;

}
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.auth-box {
    background: rgba(255,255,240,0.95);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    text-align: center;
    width: 350px;
}
.auth-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 25px;
}
.auth-box button {
    background: #e67e22;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
}
.game-container {
    background: rgba(0,0,0,0.4);
    border-radius: 40px;
    padding: 20px;
    width: 100%;
    max-width: 1300px;
    backdrop-filter: blur(5px);
}
.board {
    background: #2c5a2e;
    border-radius: 70px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    min-height: 160px;
    margin-bottom: 30px;
}
.tile {
    background: #fef9e6;
    width: 75px;
    height: 100px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid #8b5a2b;
}
.tile.clickable:hover {
    transform: scale(1.07);
    background: #ffefb9;
}
.player-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.controls {
    text-align: center;
    margin-top: 20px;
}
#turn-indicator {
    font-size: 20px;
    background: gold;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
}
button {
    background: #e67e22;
    border: none;
    padding: 10px 25px;
    color: white;
    font-size: 18px;
    border-radius: 40px;
    margin: 5px;
    cursor: pointer;
}
.dashboard-container {
    background: white;
    border-radius: 30px;
    padding: 30px;
    width: 90%;
    max-width: 1000px;
}
.games-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.games-table th, .games-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.admin-panel {
    background: #f4f4f4;
    padding: 30px;
    border-radius: 20px;
}
.stats-cards {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}
.stats-cards div {
    background: #3498db;
    color: white;
    padding: 15px;
    border-radius: 30px;
    flex: 1;
    text-align: center;
}
/* اصلاحات عمومی برای داشبورد */
.dashboard-container {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    font-family: 'Vazir', Tahoma, sans-serif;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 2px solid #e67e22;
    padding-bottom: 15px;
    margin-bottom: 25px;
}
.user-info span, .user-info a {
    margin-left: 15px;
}
.btn-primary {
    background: #e67e22;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-primary:hover { background: #d35400; }
.btn-small {
    background: #3498db;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
}
.logout-btn, .admin-link {
    background: #2c3e50;
    color: white;
    padding: 6px 15px;
    border-radius: 25px;
    text-decoration: none;
}
.games-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.games-table th, .games-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}
.games-table th {
    background: #e67e22;
    color: white;
}
.create-game-section {
    text-align: center;
    margin: 20px 0;
}
.waiting-section, .games-section {
    margin-top: 30px;
}
.message {
    background: #f39c12;
    color: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}
@media (max-width: 700px) {
    .dashboard-header { flex-direction: column; text-align: center; }
    .user-info { margin-top: 10px; }
    .games-table th, .games-table td { font-size: 12px; padding: 5px; }
}
/* برای موبایل */
@media (max-width: 768px) {
    body {
        font-size: 18px;  /* افزایش فونت پایه */
    }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    .tile {
        width: 70px !important;
        height: 95px !important;
        font-size: 22px !important;
    }
    .dashboard-container, .game-container, .card {
        padding: 15px !important;
    }
    button, .btn, .btn-primary {
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    table, .table {
        font-size: 14px;
    }
    /* در جداول بزرگ، اسکرول افقی داشته باشیم */
    .table-responsive {
        overflow-x: auto;
        display: block;
    }
}