/**
 * WinBolo.net Game Log Styles
 * Game Log Tabs, Event Timeline, Comments, Downloads
 */

/* ============================================
   Game Log Container
   ============================================ */
.gamelog-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gamelog-server-card {
    margin-bottom: 0.5rem;
}

/* ============================================
   Game Log Tabs
   ============================================ */
.gamelog-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-white);
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-gray);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.tab-link:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.tab-link.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue-dark);
}

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

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tab-link.active .tab-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   Game Log Content
   ============================================ */
.gamelog-content {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    min-height: 300px;
}

/* ============================================
   Events Section
   ============================================ */
.events-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-orange);
}

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

/* ============================================
   Events Timeline
   ============================================ */
.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #e0e0e0;
    margin-left: 0.5rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    position: relative;
}

.event-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.6rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-icon {
    width: 18px;
    height: 18px;
    background: var(--bg-white);
    border-radius: 50%;
    padding: 2px;
}

.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-time {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.event-description {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.event-description a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.event-description a:hover {
    text-decoration: underline;
}

.event-item:hover .event-content {
    background: var(--bg-gray);
    border-radius: 6px;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 0.5rem;
    margin-top: -0.25rem;
    margin-bottom: -0.25rem;
}

/* ============================================
   Empty States
   ============================================ */
.events-empty,
.comments-empty,
.download-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-icon,
.unavailable-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-message,
.unavailable-message {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-hint,
.unavailable-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   Comments Section
   ============================================ */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-orange);
}

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

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

.comment-card {
    background: var(--bg-gray);
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s;
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-avatar {
    width: 20px;
    height: 20px;
}

.author-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

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

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.comment-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star-rating-small {
    display: flex;
    gap: 1px;
}

.star-img-small {
    width: 10px;
    height: 10px;
}

.rating-value {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.comment-body {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ============================================
   Add Comment Section
   ============================================ */
.add-comment-section {
    background: var(--bg-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 2px dashed #ddd;
}

.add-comment-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.title-icon {
    font-size: 1.2rem;
}

.comment-notice {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form .form-row {
    display: flex;
    gap: 1rem;
}

.comment-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-form label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.rating-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rating-slider {
    width: 200px;
    height: 8px;
    cursor: pointer;
}

.rating-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
}

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

.comment-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.comment-textarea::placeholder {
    color: #aaa;
}

/* ============================================
   Logfile Section
   ============================================ */
.logfile-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.file-info-card {
    background: var(--bg-gray);
    border-radius: 8px;
    overflow: hidden;
}

.file-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.file-icon {
    font-size: 1.2rem;
}

.file-title {
    font-size: 1rem;
}

.file-info-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.file-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.stat-icon {
    font-size: 1.25rem;
}

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

.stat-value {
    margin-left: auto;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

/* ============================================
   Download Section
   ============================================ */
.download-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(51, 102, 204, 0.05) 0%, rgba(37, 74, 158, 0.1) 100%);
    border-radius: 8px;
    border: 2px solid rgba(51, 102, 204, 0.2);
}

.download-info {
    max-width: 400px;
}

.download-description {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.download-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.download-form {
    margin-top: 0.5rem;
}

.download-unavailable {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
}

.unavailable-icon {
    color: #856404;
}

.unavailable-message {
    color: #856404;
}

.unavailable-hint {
    color: #856404;
    opacity: 0.8;
}

/* ============================================
   Dark Theme Overrides
   ============================================ */
[data-theme="dark"] .events-header,
[data-theme="dark"] .comments-header,
[data-theme="dark"] .add-comment-title {
    color: #ffffff;
}

[data-theme="dark"] .events-timeline {
    border-left-color: var(--divider-color);
}

[data-theme="dark"] .event-description a,
[data-theme="dark"] .author-link {
    color: #4d9fff;
}

[data-theme="dark"] .event-description a:hover,
[data-theme="dark"] .author-link:hover {
    color: #7cb8ff;
}

[data-theme="dark"] .download-unavailable {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

[data-theme="dark"] .unavailable-icon,
[data-theme="dark"] .unavailable-message,
[data-theme="dark"] .unavailable-hint {
    color: var(--warning-text);
}

[data-theme="dark"] .add-comment-section {
    border-color: var(--divider-color);
}