:root {
    --bg-color: #000000;
    --text-color: #e0e0e0;
    --text-header: #ffffff;
    --accent-color: #88b0eb;
    --border-color: #333;
    --border-dim: #222;
    --table-header-bg: #000000;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Computer Modern Serif', 'CMU Serif', 'Georgia', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: #000000;
    padding: 30px 0 0 0;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 2px;
    color: #ffffff;
}

nav {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--border-dim);
    border-bottom: 1px solid var(--border-dim);
    z-index: 1000;
    padding: 12px 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
}

nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: #ffffff;
}

/* Typography */
h2 {
    font-size: 2rem;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 15px;
    font-weight: normal;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-dim);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-color);
    font-size: 0.85rem;
}

th, td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-dim);
}

th {
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    white-space: normal;
    max-width: 100px;
    vertical-align: bottom;
}

td {
    white-space: nowrap;
}

td:first-child {
    text-align: center;
    color: #aaa;
}

.player-name {
    font-weight: bold;
    color: #ffffff;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-profile-pic {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    background-color: #333;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.table-profile-link:hover .table-profile-pic {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.table-profile-link {
    display: flex;
    text-decoration: none;
}

.player-initial-mini {
    width: 30px;
    height: 30px;
    background-color: #444;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.pos {
    color: #4caf50; /* Vibrant Green */
    font-weight: bold;
}

.neg {
    color: #f44336; /* Vibrant Red */
    font-weight: bold;
}

.summary-row {
    background-color: #000000;
    font-weight: bold;
    border-top: 1px solid var(--border-color);
}

tr:hover {
    background-color: #111;
}

/* Form Styles */
.form-card {
    padding: 30px 0;
    max-width: 800px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #ffffff;
}

.form-group input {
    width: 100%;
    padding: 10px;
    background: #000000;
    border: 1px solid var(--border-color);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 4px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Remove arrows from number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

.btn {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn:hover {
    background: #111;
    border-color: #555;
    color: #ffffff;
}

/* Graph Styles */
.graph-container {
    background: #000000;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-dim);
    min-height: 500px;
}

.graph-img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Player Page Styles */
.player-container {
    padding-top: 0;
}

.player-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    margin-bottom: 20px;
}

.player-header .btn {
    grid-column: 3;
    justify-self: end;
}

.player-header h1 {
    font-size: 3.5rem;
    margin: 0;
    font-weight: 300;
}

.rank-tag {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #0a0a0a;
    border: 1px solid var(--border-dim);
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.stat-card:hover {
    border-color: #444;
}

.stat-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    margin: 0;
    font-weight: bold;
}

.stat-sub {
    font-size: 0.9rem;
    color: #555;
    margin-top: 5px;
}

.detailed-stats h2 {
    margin-bottom: 20px;
}

.detailed-stats .table-container {
    max-width: 600px;
}

.player-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.player-link:hover {
    color: var(--accent-color);
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-dim);
    margin-top: 60px;
}

/* Player Profile Styles */
.player-profile-row {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 0;
}

.profile-pic-container {
    width: 200px;
    height: 200px;
    border-radius: 12px; /* Slightly rounded square */
    overflow: hidden;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-dim);
    flex-shrink: 0;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-placeholder {
    font-size: 3rem;
    font-weight: bold;
    color: #888;
}

.player-title-info h1 {
    margin: 0;
}

@media (max-width: 600px) {
    .player-profile-row {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}
