/* ========================================
   GLOBAL
   ======================================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #222222;
}

.site-header {
    display: grid;
    grid-template-columns: 15% 85%;
    min-height: 180px;
    border-bottom: 1px solid #00ff00;
}

.site-footer {
    margin-top: 0px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #00ff00;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #00ff00;
}

.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    border-right: 1px solid #00ff00;
    min-width: 0;
}

.header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    min-width: 0;
}

.logo {
    width: 180px;
    max-width: 100%;
    height: auto;
}

.site-wrapper {
    width: 95%;
    max-width: 1800px;
    margin: 30px auto;
    background-color: #008800;
    border: 1px solid #00ff00;
    border-radius: 12px;
    box-sizing: border-box;
    overflow: hidden;
    min-height: calc(100vh - 60px);
}

/* ========================================
   Admin Panel
   ======================================== */

.admin-login {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
}

.admin-login form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-login form div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.admin-login input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
}

.admin-login button {
    padding: 10px 20px;
    cursor: pointer;
}

.admin-error {
    margin-bottom: 20px;
}

/* ========================================
   ADMIN MODULES
   ======================================== */

.admin-module {
    padding: 0 30px 30px;
    box-sizing: border-box;
}

.admin-module h1 {
    text-align: center;
}

.module-content {
    background-color: #00b500;
    border: 1px solid #00ff00;
    padding: 25px;
    box-sizing: border-box;
    text-align: center;
}

.module-content form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.module-content h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #00ff00;
}

.module-back {
    text-align: center;
    margin: 25px 0 0;
}

.module-back a {
    color: #00ff00;
}

/* ========================================
   DASHBOARD
   ======================================== */

.dashboard-user {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0 30px;
}

.dashboard-user a {
    color: #00ff00;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dashboard-panel {
    background-color: #00b500;
    border: 1px solid #00ff00;
    min-height: 180px;
    padding: 20px;
    box-sizing: border-box;
}

.dashboard-panel h2 {
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #00ff00;
}

.dashboard-menu {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
    gap: 8px;
}

.dashboard-menu a {
    color: #00ff00;
}

.dashboard h1 {
    text-align: center;
}

.dashboard {
    padding: 0 30px 30px;
    box-sizing: border-box;
}

/* ========================================
   IMPORT
   ======================================== */

.import-preview {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.import-preview table {
    width: 100%;
    border-collapse: collapse;
    background-color: #00b500;
}

.import-preview th,
.import-preview td {
    border: 1px solid #00ff00;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.import-preview th {
    font-weight: bold;
}

.import-confirm-form {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.import-error {
    margin: 20px 0;
    font-weight: bold;
}

.import-success {
    margin: 20px 0;
    font-weight: bold;
}

/* ========================================
   Games Module
   ======================================== */

.games-search form {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.games-actions {
    margin-top: 15px;
    text-align: center;
}

.games-actions a {
    color: #00ff00;
    margin: 0 5px;
}

.games-actions a:visited {
    color: #00ff00;
}

.games-actions a.active {
    color: #ffff00;
}

.games-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.games-edit-link,
.games-edit-link:visited {
    color: #00ff00;
}

/* ========================================
   GAME STATISTICS
   ======================================== */

.game-stats-panel h2 {
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #00ff00;
}

.stats-list {
    margin-top: 20px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 5px 0;
}

.stats-row strong {
    text-align: right;
}

.stats-row-3 {
    display: grid;
    grid-template-columns: 1fr auto auto;
}

.stats-row-3 strong {
    text-align: right;
}

.stats-row-3 small {
    min-width: 40px;
    text-align: right;
}

.stats-rating-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stats-row-2 {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.stats-year-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 20px;
    min-width: 0;
}

.stats-row-4 {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 20px;
    align-items: center;
}

.stats-row-4 small {
    min-width: 40px;
    text-align: right;
}

.stats-row-4 strong {
    text-align: right;
}

/* ========================================
   PUBLIC SITE
   ======================================== */

.site-main {
    display: grid;
    grid-template-columns: minmax(0, 15%) minmax(0, 85%);
    align-items: stretch;
}

.site-menu-column {
    min-width: 0;
    padding: 20px;
    box-sizing: border-box;
    border-right: 1px solid #00ff00;
}

.site-content {
    min-width: 0;
    padding: 30px;
    box-sizing: border-box;
}

.site-menu {
    width: 100%;
    box-sizing: border-box;
}

.menu-section {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #00ff00;
}

.menu-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.menu-title {
    display: block;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.menu-section a,
.menu-section a:visited {
    display: block;
    overflow-wrap: anywhere;
    color: #00ff00;
    text-decoration: none;
    margin: 5px 0;
}

.menu-section a.active,
.menu-section a.active:visited {
    color: #ffff00;
}

.menu-section a:hover {
    text-decoration: underline;
}

/* ========================================
   PUBLIC GAMES
   ======================================== */

.public-games {
    padding: 0 30px 30px;
    box-sizing: border-box;
}

.public-games > p {
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.public-games-alphabet {
    text-align: center;
    margin: 25px 0;
}

.public-games-alphabet a {
    color: #00ff00;
    margin: 0 5px;
}

.public-games-alphabet a.active {
    color: #ffff00;
    margin: 0 5px;
}

.public-games-filters {
    text-align: center;
    margin: 25px 0;
}

.public-games-filters a {
    color: #00ff00;
    margin: 0 5px;
}

.public-games-filters a.active {
    color: #ffff00;
    margin: 0 5px;
}

.public-games-status {
    text-align: center;
    margin: 25px 0;
}

.public-games-status a {
    color: #00ff00;
    margin: 0 5px;
}

.public-games-status a.active {
    color: #ffff00;
    margin: 0 5px;
}

.public-games-link {
    color: #00ff00;
}

.public-games-link:visited {
    color: #ffff00;
}

/* ========================================
   PUBLIC GAME
   ======================================== */

.public-game-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 25px;
}

.public-game-video iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border: 0;
}

.public-game-language {
    text-align: center;
    margin: 25px 0;
    color: #00ff00;
}

.public-game-language a:visited {
    color: #00ff00;
}

.public-game-language a.active {
    color: #ffff00;
}

.public-game-back a,
.public-game-back a.visited {
    text-align: center;
    color: #00ff00;
}

/* ========================================
   PUBLIC TRACKMANIA
   ======================================== */

.totd-intro {
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.totd-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 25px;
}

.totd-video iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border: 0;
}

.skins-intro {
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.skins-panel h2 {
    position: relative;
    text-align: center;
}

.skins-panel h2 a,
.skins-panel h2 a:visited {
    color: #00ff00;
}

.skins-panel img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 15px;
}

.skin-intro {
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.sketchfab-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 25px;
}

.sketchfab-embed-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border: 0;
}

.skin-back {
    text-align: center;
    margin-top: 25px;
}

.skin-back a,
.skin-back a:visited {
    color: #00ff00;
}

.skins-filter {
    text-align: center;
    margin: 25px 0;
}

.skins-filter a,
.skins-filter a:visited {
    color: #00ff00;
    margin: 0 5px;
}

.skins-filter a.active,
.skins-filter a.active:visited {
    color: #ffff00;
}

.skins-panel .skin-download {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: medium;
    font-weight: normal;
    color: #00ff00;
}

.skins-panel .skin-download:visited {
    color: #00ff00;
}

/* ========================================
   GUIDE TRACKMANIA
   ======================================== */

.guide-intro {
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.guide-intro a {
    color: #00ff00;
}

.guide-menu {
    text-align: center;
    margin: 25px 0;
}

.guide-menu a,
.guide-menu a:visited {
    color: #00ff00;
}

.guide-menu a.active {
    color: #ffff00;
}

.guide-panel {
    background-color: #00b500;
    border: 1px solid #00ff00;
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.guide-download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.guide-download-table td {
    padding: 10px;
    border-bottom: 1px solid #00ff00;
}

.guide-download-table td:last-child {
    text-align: right;
}

.guide-download-table a,
.guide-download-table a:visited {
    color: #00ff00;
}

.guide-panel > p:first-child {
    text-align: center;
}

/* ========================================
   tmstats TRACKMANIA
   ======================================== */

.tmstats-intro {

    text-align: center;
    font-size: large;
    font-weight: bold;

}


/* ========================================
   NAGŁÓWKI PANELI
   ======================================== */

.tmstats-panel h2,
.tmstats-trophies-panel h2 {

    text-align: center;

}


/* ========================================
   TROPHIES
   ======================================== */

.tmstats-trophies-panel {

    width: 100%;
    box-sizing: border-box;

}


.tmstats-trophy-points {

    text-align: center;
    font-size: xx-large;
    font-weight: bold;
    margin: 20px 0 30px;

}


.tmstats-tiers {

    display: grid;

    grid-template-columns: repeat(9, 1fr);

    grid-template-rows: repeat(3, auto);

    gap: 20px;

    width: 100%;

}


.tmstats-tier {

    text-align: center;

}


.tmstats-tier-name {

    font-size: large;
    font-weight: bold;

}


.tmstats-tier-name img {

    width: 100px;
    height: 100px;

    object-fit: contain;

    display: block;

    margin: 0 auto;

}


.tmstats-tier-count {

    margin-top: 5px;
    font-size: large;

}


/* ========================================
   DOLNE PANELE
   ======================================== */

.tmstats-bottom-grid {

    grid-template-columns: repeat(3, 1fr);

    margin-top: 20px;

}


.tmstats-panel {

    box-sizing: border-box;

}


/* ========================================
   RANKING — 3 KOLUMNY
   nazwa | grafika | miejsce
   ======================================== */

.tmstats-ranking-table {

    display: grid;

    grid-template-columns: 1fr 70px 1fr;

    row-gap: 12px;

    align-items: center;

    margin-top: 20px;

}


.tmstats-ranking-row {

    display: contents;

}


.tmstats-ranking-row > span:first-child {

    text-align: left;

}


.tmstats-ranking-row > span:nth-child(2) {

    text-align: center;

}


.tmstats-ranking-row > strong {

    text-align: right;

}


.tmstats-ranking-row img {

    width: 50px;
    height: 50px;

    object-fit: contain;

    display: block;

    margin: 0 auto;

}


/* ========================================
   MATCHMAKING — 3 KOLUMNY
   nazwa | grafika | wartość
   grafika zajmuje 4 wiersze
   ======================================== */

.tmstats-matchmaking-table {

    display: grid;

    grid-template-columns: 1fr 70px 1fr;

    grid-template-rows: repeat(4, auto);

    row-gap: 12px;

    align-items: center;

    margin-top: 20px;

}


.tmstats-matchmaking-label {

    text-align: left;

}


.tmstats-matchmaking-image {

    grid-column: 2;

    grid-row: 1 / span 4;

    display: flex;

    align-items: center;

    justify-content: center;

}


.tmstats-matchmaking-image img {

    width: 200px;

    height: 200px;

    object-fit: contain;

    display: block;

}


.tmstats-matchmaking-value {

    text-align: right;

}

/* =========================================================
   STATYSTYKI FILMÓW — OGÓLNE
   ========================================================= */

.movie-stats-overview {
    width: 100%;
    margin-bottom: 20px;
}

.stats-overview-horizontal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* =========================================================
   Panel opini
   ========================================================= */

.review-panel {
    background-color: #00b500;
    border: 1px solid #00ff00;
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
}