/**
 * WinBolo.net Player Styles
 * Player Info, Diary, Teams
 */

/* ============================================
   Player Info
   ============================================ */
.player-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.player-header-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.player-avatar {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar img {
    /* No filter - display tank image normally like signup page */
}

.player-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.player-status {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-in-game {
    background: var(--accent-orange);
    color: var(--border-color);
}

.status-online {
    background: #28a745;
    color: white;
}

.status-offline {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ============================================
   Player Section
   ============================================ */
.player-section {
    background: var(--bg-gray);
    border-radius: 8px;
    padding: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-orange);
}

.section-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ============================================
   Active Games List
   ============================================ */
.active-games-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.active-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.game-server {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

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

/* ============================================
   Team Tags
   ============================================ */
.team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-tag {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.team-tag:hover {
    background: var(--primary-blue-dark);
}

.no-teams {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   Details Grid
   ============================================ */
.details-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, 1fr);
}

.detail-item {
    display: flex;
    grid-template-columns: 150px 1fr;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #e0e0e0;
    justify-content: space-between;
    align-items: center;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-dark);
}

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

.detail-value a:hover {
    text-decoration: underline;
}

.detail-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.private-info {
    color: var(--text-muted);
    font-style: italic;
}

.player-blurb {
    background: var(--bg-white);
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    line-height: 1.6;
}

.no-blurb {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   Player Actions
   ============================================ */
.player-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

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

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

.diary-description strong {
    color: var(--text-dark);
    font-weight: 600;
}

.diary-game-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diary-game-card {
    background: var(--bg-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.diary-game-card:hover {
    box-shadow: var(--shadow);
}

.diary-game-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: 0.75rem 1rem;
}

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

.server-label {
    font-size: 0.8rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-address {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.diary-game-header .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.diary-game-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.diary-game-time {
    font-size: 0.85rem;
    opacity: 0.9;
}

.diary-game-time .time-label {
    margin-right: 0.25rem;
}

.diary-game-body {
    padding: 1rem;
}

.diary-game-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diary-game-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.info-value.map-name {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.diary-game-players {
    background: var(--bg-white);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.players-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}

.tank-icon {
    width: 18px;
    height: 18px;
}

.players-list {
    font-size: 0.9rem;
    line-height: 1.6;
}

.player-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.player-link:hover {
    text-decoration: underline;
}

.non-wbn-players,
.no-players {
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-gray);
    border-radius: 6px;
}

.diary-game-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

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

.star-rating {
    display: flex;
    gap: 1px;
    margin-bottom: 0.5rem;
}

.star-rating img {
    width: 12px;
    height: 12px;
}

.rating-text {
    color: var(--text-dark);
    font-size: 0.85rem;
}

.no-rating {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diary-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.non-wbn-icon,
.no-players-icon {
    font-size: 1rem;
}

/* ============================================
   Dark Theme Overrides
   ============================================ */
[data-theme="dark"] .section-title,
[data-theme="dark"] .details-title,
[data-theme="dark"] .players-header,
[data-theme="dark"] .rating-header {
    color: #ffffff;
}

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

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