
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: 'Saira Condensed', 'Roboto', sans-serif;
}

body{
    background-color: #131116;
    color: #fff;
    width: 100%;
    margin: 0px;
    padding: 0px;
    overflow-x: hidden;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(90deg, #2a2a40, #121212);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.search-bar{
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 16px;
  background-color: #2a2a40;
  color: #fff;
}

.search-bar::placeholder {
  color: #ccc;
}

.button-bar {
  margin-top: 65px;
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 10px 0;
}

.button-bar button {
  padding: 8px 15px;
  background: linear-gradient(0deg, #ffc400, #ffe554);
  border: 0px;
  color: #121212;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button-bar a{
    text-decoration: none;
    color: #121212;
}

.button-bar button:hover {
  background: linear-gradient(0deg, #ffc400, #ffe554);
  box-shadow: 0 0 10px #fdd349;
  transform: scale(1.05);
}

.banner{
    margin: 5px auto 0 auto;
    max-width: 1125px;
    width: 100%;
    height: 350px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("assets/asphalt-banner.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    position: relative;
    padding-top: 20px;
}

.profile-content{
    position: absolute;
    bottom: 15px;
    left: 20px;
    transform: translateX(0%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index:2;
    padding: 20px;
}

.avatar{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.profile-info h1{
    font-size: 30px;
    margin-top: 5px;
}

.profile-info button{
    font-size: 12px;
    margin-left: 15px;
    padding: 5px;
    background: linear-gradient(0deg, #ffc400, #ffe554);
    color: #121212;
    border-width: 0px;
    vertical-align: middle;
}

.profile-info button:hover{
  background: linear-gradient(0deg, #ffc400, #ffe554);
  box-shadow: 0 0 10px #fdd349;
  transform: scale(1.05);
}

.profile-info p{
    color: #ccc;
    margin-top: 10px;
}

.profile-info icon{
    margin: 5px;
    color: #dbb32e;
}


.player-profile{
    max-width: 1200px;
    margin: 20px auto 10px auto;
    padding: 20px;
}

section{
    background-color: #221e2f00;
    border-radius: 10px;
    margin-bottom: 5px;
    margin-top: -20px;
    box-shadow: 20px #121212;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    scroll-margin-top: 120px;
}

h3{
    margin: 5px
}

.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    background-color: #221e2f00;
    border-radius: 10px;
    margin-bottom: 5px;
    margin-top: -20px;
    box-shadow: 20px #121212;
    margin: 0 auto;
    padding: 20px; 
}

.table-container h3 {
    margin-bottom: 10px;
    text-align: left;
    font-weight: 600;
}

.table-container table{
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    overflow: hidden;
    margin-top: 15px;
    background-color: #221e2f4d;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
    border: 1px solid #4a378667;
}

.table-container th,
.table-container td {
    padding: 5px;
    text-align: center;
}

.table-container th{
    font-weight: 300;
    font-size: 12px;
    color: #ccc;
}

.table-container td{
    background-color: #2a2a4000;
    vertical-align: middle;
    text-align: center;
}

.car-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.car-cell img {
    width: auto;
    max-height: 60px;
    border-radius: 10px;
    margin-top: 7px;
    margin-bottom: 7px;
    margin-left: 7px;
}

.car-cell span{
    flex: 1;
    text-align: center;
}

table{
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    overflow: hidden;
    margin-top: 15px;
    background-color: #221e2f4d;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #4a378667;
}

th, td{
    padding: 5px;
    text-align: center;
}

th{
    background-color: #2a2a4000;
    text-align: center;
    font-size: 12px;
    font-weight: 200;
}

td{
    background-color: #2a2a4000;
    vertical-align: middle;
    font-weight: 600;
    text-align: center;
}

table tbody tr:hover{
    transform: scale(1.02);
}

.top-tracks {
  border-collapse: separate;
  border-spacing: 0 5px;
}

.top-tracks td {
    position: relative;
    text-align: center;
    z-index: 1;
    vertical-align: middle;
    background: transparent;
    border: none;
    padding: 5px;
}

.top-tracks th{
    font-weight: 300;
    font-size: 12px;
    color: #ccc;
}

.top-tracks tbody tr {
  height: 80px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  color: #fff;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
  transition: transform 0.2s;
  margin-top: 2px;
  overflow: hidden;
}

.top-tracks tbody tr:hover {
  transform: scale(1.02)
}

.car-cell-history {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.car-cell-history img {
    width: auto;
    height: 60px;
    border-radius: 10px;
    margin-left: 20px;
    margin-top: 7px;
    margin-bottom: 7px;
}

.car-cell-history span{
    flex: 1;
    text-align: center;
}

details summary{
    list-style: none;
}

summary{
    cursor: pointer;
}

.gold{
    color: #FFD700;
}

.silver{
    color: #9ca4af;
}

.bronce{
    color: #CD7F32;
}

.epic{
    color: #d6800f;
}

.rank-6-stars{
    width: 60px;
    height: auto;
}

.rank-5-stars{
    width: 50px;
    height: auto;
}

.green{
    color: #44d63f;
}

.purple{
    color: #8d3fd6;
}

.race-history-row {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  text-align: center;
  border-radius: 6px;
  overflow: hidden;
}

.race-history-row td {
  padding: 2px;
  vertical-align: middle;
  border: none;
}

.win-race {
  border: 1px solid #44d63f46;
  background-color: #1e2f1e79;
}

.lose-race {
    border: 1px solid #d63f3f46;
    background-color: #2f1e1e7c;
}

.race-history-row:hover {
  transform: scale(1.02);
}

html {
  scroll-behavior: smooth;
}

.banner,
section {
  opacity: 0;                
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .stats-section {
    grid-template-columns: 1fr;
    min-width: 500px;
  }
}

@media (max-width: 768px) {
  .top-bar,
  .button-bar,
  .banner,
  .win-race,
  .lose-race,
  .top-cars,
  .top-tracks,
  .top-cars-stats-table,
  .table {
    max-width: 768px;
    min-width: 500px;
    font-size: 10px;
    overflow-x: auto;
    margin-left: -5px;;
  }
}

