.tooltip2 {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip2 .tooltip2text {
  visibility: hidden;
  width: 200px;
  background-color: var(--prussian-blue);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  font-size: 14px;
  line-height: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip2 .tooltip2text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--prussian-blue) transparent transparent transparent;
}

.tooltip2:hover .tooltip2text {
  visibility: visible;
  opacity: 1;
}

.table-container, .matches-table, .standings-table, table {
  overflow: visible !important;
}

.table-wrapper {
  position: relative;
  overflow: visible;
}
.tooltip2 .tooltip2text {
  z-index: 9999;
}

/* --- READY RACERS MODERN LİG TABLOSU TAM CSS --- */

/* 1. Ana Konteyner: Scroll bar çıkmasını engelleyen geniş yapı */
.rr-table-wrapper {
    background: var(--maastricht-blue-80);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    overflow-x: auto; /* Mobilde taşmayı önlemek için */
    -webkit-overflow-scrolling: touch; /* iOS akıcı kaydırma */
    font-family: 'Chalet', sans-serif;
}

/* 2. Başlık Alanı ve Aksan Çizgisi */
.rr-table-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.rr-title-area h3 {
    font-family: 'Chalet', sans-serif;
    font-weight: 900;
    margin: 0;
    letter-spacing: 2px;
    color: #fff;
}

.rr-title-area h3 small {
    display: block;
    font-size: 12px;
    color: var(--alien-armpit);
    letter-spacing: 4px;
    margin-top: 5px;
    text-transform: uppercase;
}

.rr-accent-line {
    display: block;
    width: 50px;
    height: 4px;
    background: var(--alien-armpit);
    margin-bottom: 15px;
}

/* 3. Ana Tablo Yapısı */
.rr-main-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px; /* Sütunların birbirine girmemesi için minimum genişlik */
}

.rr-main-table thead th {
    padding: 15px 20px;
    font-size: 14px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    border-bottom: 2px solid var(--purple-taupe-50);
    letter-spacing: 2px;
    text-align: center;
}

.rr-main-table thead th:nth-child(2) {
    text-align: left; /* Takım/Oyuncu sütunu sola yaslı */
}

.rr-main-table tbody tr {
    transition: all 0.3s;
    border-bottom: 1px solid var(--purple-taupe-30);
}

.rr-main-table tbody tr:hover {
    background: var(--purple-taupe-20);
}

.rr-main-table td {
    padding: 20px;
    font-weight: 600;
    vertical-align: middle;
    color: #fff;
}

/* 4. Sıralama ve Oyuncu Profili */
.rank-number {
    font-family: 'Chalet', sans-serif;
    color: rgba(255,255,255,0.2);
    font-size: 18px;
    text-align: center;
}

.rank-top .rank-number { 
    color: var(--alien-armpit); 
    text-shadow: 0 0 10px var(--alien-armpit-30);
}

.player-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.club-logo {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.club-logo img {
    max-width: 100%;
    max-height: 100%;
}

.player-details .name {
    display: block;
    font-size: 16px;
    color: #fff;
    margin-bottom: 2px;
    font-weight: 700;
}

.player-details .club {
    display: block;
    font-size: 12px;
    color: #ff4b5c; /* Takım rengi PHP'den style olarak ezilebilir */
    font-weight: 800;
    text-transform: uppercase;
}

/* 5. Puan Badge'i */
.points-badge {
    background: var(--yellow-sun-10);
    color: var(--yellow-sun);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: 'Chalet', sans-serif;
    font-weight: 900;
    font-size: 18px;
    border: 1px solid var(--yellow-sun-20);
    display: inline-block;
}

/* 5. Puan Badge'i */
.rank-badge {
    background: var(--white-10);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: 'Chalet', sans-serif;
    font-weight: 900;
    font-size: 18px;
    border: 1px solid var(--white-20);
    display: inline-block;
}

/* 6. Form Kutucukları (G, B, M) */
.form-list {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.form-list span {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.form-list .g { background: var(--alien-armpit-10); color: var(--alien-armpit); border: 1px solid var(--alien-armpit-20); } /* Galibiyet */
.form-list .b { background: var(--white-10); color: var(--white); border: 1px solid var(--white-20); }    /* Beraberlik */
.form-list .m { background: var(--awesome-10); color: var(--awesome); border: 1px solid var(--awesome-20); } /* Mağlubiyet */

/* 7. Açıklama (Legend) Alanı */
.rr-legend {
    display: flex;
    gap: 15px;
}

.legend-item { 
    font-size: 11px; 
    display: flex;
    align-items: center;
    color: var(--white);
}

.legend-item i { 
    display: inline-block; 
    width: 8px; 
    height: 8px; 
    border-radius: 2px; 
    margin-right: 5px; 
}
.legend-item i.win { background: var(--alien-armpit); }
.legend-item i.draw { background: var(--yellow-sun); }
.legend-item i.loss { background: var(--awesome); }

/* 8. Responsive Düzenlemeler */
@media (max-width: 992px) {
    .rr-table-wrapper {
        padding: 20px;
    }
    
    .rr-table-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .rr-legend {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .rr-main-table td {
        padding: 15px 10px;
    }
    
    .player-profile {
        gap: 12px;
    }
    
    .club-logo {
        width: 35px;
    }
}

.rr-stats-header {
    display: flex;
    align-items: center;
    gap: 25px;
}

.stat-card {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 25px;
}

.stat-card:last-of-type {
    border-right: none;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: var(--alien-armpit);
    letter-spacing: 1px;
    font-weight: 800;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    font-family: 'Chalet', sans-serif;
    line-height: 1;
    margin-top: 5px;
}

/* Mobilde yan yana sığmazsa alt alta gelmesi için */
@media (max-width: 768px) {
    .rr-stats-header {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    .stat-card {
        text-align: left;
        padding-right: 0;
        border-right: none;
    }
    .stat-value {
        font-size: 18px;
    }
}