:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #0066cc;
    --border-color: #eaeaea;
    --secondary-text: #666666;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Navigation */
.site-header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1rem;
}

.site-header .brand {
    font-size: 1.5rem;
    text-decoration: none;
    margin-right: 0.5rem;
    line-height: 1;
}

.site-header a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.2s;
}

.site-header a:hover {
    color: #000;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1, .page-header h2 {
    margin: 0;
}

/* Typography */
h1, h2, h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
}

h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th {
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #333;
    padding: 0.75rem 0.5rem;
    color: #000;
}

td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

/* Forms */
.form-card {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #000;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn {
    display: inline-block;
    background-color: #111;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #333;
    text-decoration: none;
}

.btn-auto {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.row {
    display: flex;
    gap: 1.5rem;
}

.col {
    flex: 1;
}

@media (max-width: 600px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-header .links {
        width: 100%;
        justify-content: space-between;
    }
}

/* Match Cards (Minimalist) */
.match-list {
    display: flex;
    flex-direction: column;
}

.match-card {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.match-card:first-child {
    padding-top: 0;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.match-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-info.left { text-align: left; }
.player-info.right { text-align: right; }

.player-name {
    font-weight: 600;
    font-size: 1rem;
    color: #000;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-rating {
    font-size: 0.8rem;
    color: var(--secondary-text);
}

.match-score {
    padding: 0 1rem;
    font-size: 1.8rem;
    font-weight: 300; /* Thinner font for score looks elegant */
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-val.winner {
    font-weight: 600; /* Bold the winner */
}

.score-separator {
    color: #ccc;
    font-weight: 300;
}

/* Profile Header */
.profile-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header h1 {
    margin: 0;
    line-height: 1;
}

.profile-header p {
    margin: 0.5rem 0 0 0;
    color: var(--secondary-text);
}

.rating-box {
    text-align: right;
}

.rating-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-gray { color: var(--secondary-text); }
.text-red { color: #d32f2f; }
.text-green { color: #388e3c; }
.font-bold { font-weight: 700; }

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--secondary-text);
}

/* Crush Stamp */
.player-info {
    position: relative;
}

.crush-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    border: 3px solid #d32f2f;
    color: #d32f2f;
    font-size: 1rem;
    font-weight: 900;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    opacity: 0.7;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    letter-spacing: 0.1em;
    mix-blend-mode: multiply;
    animation: stamp-land 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stamp-land {
    0% { transform: translate(-50%, -50%) scale(3) rotate(-20deg); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(-20deg); opacity: 0.7; }
}