/**
 * WinBolo.net Games Styles
 * Game Server Cards, Active Games, Filters
 */

/* ============================================
   Games Container
   ============================================ */
.games-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.games-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   Filter Form Container
   ============================================ */
.filter-form-container {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.filter-form {
    margin: 0;
}

.filter-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.filter-table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.filter-table select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--bg-white);
    min-width: 140px;
    cursor: pointer;
}

.filter-table select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(51, 102, 204, 0.1);
}

.filter-table input[type="submit"],
.filter-table input[type="button"] {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-table input[type="submit"]:hover,
.filter-table input[type="button"]:hover {
    background: var(--primary-blue-dark);
}

/* ============================================
   Game List
   ============================================ */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-card {
    margin-bottom: 0;
}

.games-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--bg-white);
    border-radius: 8px;
}

/* ============================================
   Game Server Card
   ============================================ */
.game-server-card {
    background: var(--bg-gray);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-server-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.game-server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 1rem 1.25rem;
}

.game-server-address {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-server-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.game-server-header .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.game-server-header .btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 0.9rem;
}

.game-server-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.time-icon {
    font-size: 1rem;
}

.game-server-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
}

.game-server-info-column,
.game-server-players-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-server-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-value.map-name a {
    color: var(--primary-blue);
    text-decoration: none;
}

.info-value.map-name a:hover {
    text-decoration: underline;
}

/* ============================================
   Game Type Badge
   ============================================ */
.game-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.game-type-open {
    background: #28a745;
    color: white;
}

.game-type-tournament {
    background: var(--accent-orange);
    color: var(--border-color);
}

.game-type-strict-tournament {
    background: #dc3545;
    color: white;
}

/* ============================================
   Version Badge
   ============================================ */
.version-badge {
    display: inline-block;
    background: var(--bg-white);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    border: 1px solid #ddd;
}

/* ============================================
   Game Server Details
   ============================================ */
.game-server-details {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.details-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-orange);
}

.detail-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-gray);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.detail-badge.pills {
    border-left: 3px solid #ff6b6b;
}

.detail-badge.bases {
    border-left: 3px solid #4ecdc4;
}

.detail-icon {
    width: 16px;
    height: 16px;
}

.detail-badge .detail-value {
    font-weight: 700;
    font-size: 1rem;
}

.detail-badge .detail-free {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.detail-item .detail-label {
    font-weight: 500;
    text-transform: none;
    font-size: 0.85rem;
}

.detail-item .detail-value {
    font-size: 0.85rem;
}

.detail-item .detail-value.warning {
    color: #dc3545;
    font-weight: 600;
}

.detail-item .detail-value.locked {
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lock-icon {
    width: 14px;
    height: 14px;
}

/* ============================================
   Game Server Players
   ============================================ */
.game-server-players {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 1rem;
}

.players-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.players-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.player-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.player-tag {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 0.3rem 0.65rem;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.player-tag:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    text-decoration: none;
}

/* ============================================
   Game Server Rating
   ============================================ */
.game-server-rating {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 1rem;
    margin-top: auto;
}

.rating-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rating-icon {
    font-size: 1.1rem;
}

.star-img {
    width: 14px;
    height: 14px;
}

.rating-info {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
}

.rating-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-orange);
}

.rating-max {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.no-rating-icon {
    font-size: 1.2rem;
    opacity: 0.5;
}

/* ============================================
   Dark Theme Overrides
   ============================================ */
[data-theme="dark"] .version-badge {
    background: var(--hover-bg);
    border-color: var(--input-border);
}

[data-theme="dark"] .info-value.map-name a {
    color: #4d9fff;
}

[data-theme="dark"] .info-value.map-name a:hover {
    color: #7cb8ff;
}