/* --- Sivun yleinen kortti --- */
.page-card {
    max-width: 1200px;
    margin: 30px auto;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 6px var(--card-shadow);
}

/* --- Otsikot --- */
.page-card-title {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text);
}

/* --- Profiiligridi --- */
.player-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 800px) {
    .player-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Oma profiilikortti --- */
.profile-card {
    background: var(--card-top-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--header-border);
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--header-border);
}

/* --- ELO värit --- */
.elo-master { color: #d40000; font-weight: bold; }
.elo-expert { color: #ff8c00; font-weight: bold; }
.elo-intermediate { color: #0077ff; font-weight: bold; }
.elo-beginner { color: #555; }

/* --- Vertailukortti --- */
.compare-card {
    background: var(--card-top-bg);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--header-border);
}

.compare-card h2 {
    margin-top: 0;
    color: var(--text);
}

/* --- Hakukenttä --- */
.search-box input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--header-border);
    background: var(--card-bg);
    color: var(--text);
}

.search-box button,
.compare-form button {
    padding: 10px 15px;
    background: #0077ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

.search-box button:hover,
.compare-form button:hover {
    background: #005fcc;
}

/* --- Vertailulista --- */
.compare-form {
    margin-top: 15px;
}

.compare-form select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--header-border);
    background: var(--card-bg);
    color: var(--text);
}

/* --- Vertailutaulukko --- */
.compare-result {
    margin-top: 20px;
}

.compare-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 10px;
    border-bottom: 1px solid var(--header-border);
    text-align: center;
    color: var(--text);
}

.compare-table th {
    background: var(--card-top-bg);
}

/* --- Pelaajalista --- */
.player-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.player-list th {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 12px;
    text-align: left;
}

.player-list td {
    padding: 12px;
    border-bottom: 1px solid var(--header-border);
    color: var(--text);
}

.player-list tr:hover {
    background: var(--card-top-bg);
}

/* --- Pienet kuvat --- */
.profile-photo-small {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--header-border);
}

/* --- Napit --- */
.btn-challenge-small {
    background: #28a745;
    padding: 6px 10px;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.btn-challenge-small:hover {
    background: #1e7e34;
}

.btn-delete {
    background: #d40000;
    padding: 6px 10px;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.btn-delete:hover {
    background: #a80000;
}

/* --- Sivun pääkortti (toinen määritelmä) --- */
.page-card {
    max-width: 1100px;
    margin: 30px auto;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 10px;
}

/* Profiiligridi */
.player-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .player-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Profiilikortti */
.profile-card {
    background: var(--card-top-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--header-border);
    max-width: 400px;
    margin: 0 auto;
}

.skill-tag {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 6px;
    background: var(--card-top-bg);
    border: 1px solid var(--header-border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
}

/* Tilastotaulukko */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.stats-table th,
.stats-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--header-border);
    color: var(--text);
}

.stats-table th {
    background: var(--card-top-bg);
    text-align: left;
}

/* Korttigridi */
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Kaksi korttia vierekkäin */
.two-col {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Kortit jotka täyttävät koko rivin */
.card-wide {
    grid-column: 1 / -1;
}
