* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #9ca3af;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.subtitle a {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.subtitle a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.subtitle img {
    height: 48px;
    width: auto;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 30px;
    text-align: center;
    min-width: 150px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    overflow-x: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

thead {
    background: rgba(102, 126, 234, 0.2);
}

th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.5);
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

th.sortable:hover {
    background: rgba(102, 126, 234, 0.3);
}

.sort-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

th.sortable:hover .sort-indicator {
    opacity: 1;
}

th.sortable.sort-asc .sort-indicator::after {
    content: '▲';
    opacity: 1;
}

th.sortable.sort-desc .sort-indicator::after {
    content: '▼';
    opacity: 1;
}

td {
    padding: 18px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.01);
}

tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-europe {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-usa {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-japan {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-na {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.rating-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
}

.rating-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-number {
    font-weight: 600;
    color: #e0e0e0;
}

.rating-slash {
    color: #9ca3af;
    margin: 0 2px;
}

.date {
    color: #9ca3af;
    font-family: 'Courier New', monospace;
}

.video-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.kommentit {
    white-space: normal;
    word-wrap: break-word;
    max-width: 400px;
}

.comment-toggle {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 5px;
    cursor: pointer;
}

.comment-toggle:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.avg-rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.avg-rating-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.legend {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 30px;
}

.legend-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-align: center;
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.legend-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.latest-game {
    background: rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    text-align: center;
}

.latest-game-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.latest-game-content {
    font-size: 1.2rem;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.latest-game-item {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-weight: 500;
}

.latest-game-item strong {
    color: #667eea;
    margin-right: 5px;
}

.latest-game-comments {
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
}

.latest-game-item .video-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-left: 5px;
}

.latest-game-item .video-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .table-wrapper {
        padding: 15px;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 12px 8px;
    }

    .kommentit {
        max-width: 200px;
    }

    .latest-game {
        padding: 20px 15px;
    }

    .latest-game-content {
        font-size: 1rem;
        gap: 10px;
    }

    .latest-game-item {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .latest-game-comments {
        width: 100%;
        text-align: center;
    }
}
