/* ===== NEW UI UPGRADE (CLEAN VERSION + PRO HEADER) ===== */

/* ================= GLOBAL ================= */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    padding-bottom:130px;
}

/* ================= POPUP BACKDROP ================= */
.popup {
display: none;
position: fixed;
z-index: 99999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.85);
backdrop-filter: blur(3px);
}

/* ================= MAIN POPUP LAYOUT ================= */
.popup-content {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #0b132b;

display: flex;
flex-direction: column;

padding: 0;
overflow: hidden;
}

/* ================= PRO HEADER (NEW STRUCTURE) ================= */
.header {
flex-shrink: 0;
position: sticky;
top: 0;
background: #0b132b;
z-index: 1000;
text-align: center;
padding: 25px 10px;
border-bottom: 2px solid #ffbe0b;
box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* TITLE (H1 BIG MAIN BRAND) */
.header h1 {
color: #ffbe0b;
font-size: 56px;
margin: 0;
letter-spacing: 1px;
}

/* SUB TITLE (H2) */
.header h2 {
color: #ffffff;
font-weight: normal;
font-size: 34px;
margin: 8px 0 0 0;
}

/* SMALL DESCRIPTION (H3) */
.header h3 {
color: #cccccc;
font-weight: normal;
font-size: 24px;
margin: 5px 0 0 0;
}

/* ================= POPUP HEADER WRAPPER (if used) ================= */
.popup-header {
flex-shrink: 0;
position: sticky;
top: 0;
z-index: 9999;
background: #0b132b;
padding: 15px 12px;
border-bottom: 1px solid #333;
will-change: transform;
}

/* ================= BUTTON ROW ================= */
.button-row {
display: flex;
justify-content: space-between;
gap: 10px;
}

.button-row button {
flex: 1;
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #000;
background: linear-gradient(145deg, #FFD700, #FFA500);
border: none;
border-radius: 20px;
box-shadow: 0 0 8px rgba(255,215,0,0.5);
cursor: pointer;
transition: 0.2s;
touch-action: manipulation;
}

.button-row button:hover {
transform: scale(1.05);
}

.button-row button.active {
background: linear-gradient(145deg, #00ffcc, #00c853);
box-shadow: 0 0 12px rgba(0,255,204,0.6);
}

/* ================= SEARCH ================= */
#searchTeam {
width: 100%;
margin: 10px 0;
padding: 12px;
border-radius: 10px;
border: none;
outline: none;
text-align: center;
background: #111;
color: white;
font-size: 14px;
box-sizing: border-box;
}

/* ================= SORT MENU ================= */
#sortMenu {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
background: #222;
border: 1px solid #333;
border-radius: 10px;
padding: 8px;
min-width: 200px;
display: none;
z-index: 9999;
}

#sortMenu div {
padding: 10px;
cursor: pointer;
color: #fff;
}

#sortMenu div:hover {
background: #333;
}

/* ================= CLOSE BUTTON ================= */
.close {
position: absolute;
top: 10px;
right: 15px;
font-size: 28px;
color: white;
cursor: pointer;
}

/* ================= MAIN SCROLL AREA ================= */
#apiData {
    flex:1;
    overflow-y:auto;
    padding:12px;
    padding-bottom:150px;
    box-sizing:border-box;
}

/* ================= MATCH CARDS ================= */
.match-card {
background: #1a1a1a;
border: 1px solid #333;
border-radius: 10px;
margin-bottom: 12px;
overflow: hidden;
color: white;
transition: 0.2s;
}

.match-card:hover {
border-color: #00ff88;
transform: scale(1.01);
}

.match-card table {
width: 100%;
border-collapse: collapse;
color: white;
}

.match-card table td {
padding: 8px;
border: 1px solid #222;
font-size: 14px;
}

/* ================= BADGES ================= */
.prediction-win { color: #00ff66; font-weight: bold; }
.prediction-loss { color: #ff4444; font-weight: bold; }
.prediction-pending { color: #ffffff; font-weight: bold; }

/* ================= MORE ANALYSIS ================= */

.more-analysis-box{
    display:inline-block;
    margin:25px 0;
    padding:18px 40px;
    background:#00ff88;
    color:#001;
    border-radius:16px;
    font-size:30px;
    font-weight:bold;
    cursor:pointer;
    transition:.25s;
    box-shadow:0 0 15px #00ff88;
}

.more-analysis-box span{
    writing-mode:horizontal-tb;
    transform:none;
}

.more-analysis-box:hover{
    transform:scale(1.05);
    box-shadow:0 0 30px #00ff88;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

.header h1 {
font-size: 40px;
}

.header h2 {
font-size: 26px;
}

.header h3 {
font-size: 18px;
}

.button-row {
flex-direction: row;
}

.button-row button {
font-size: 15px;
padding: 12px 0;
}

#searchTeam {
font-size: 16px;
}
}

/* ================= VIP AFFILIATE BAR ================= */

.affiliate-bar{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    width:100%;
    height:130px;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    text-decoration:none;
    cursor:pointer;

    background:linear-gradient(135deg,#111827,#1f2937);
    border-top:3px solid #FFD700;

    box-shadow:0 -5px 20px rgba(0,0,0,.5);

    z-index:99999;
}

.affiliate-bar .title{
    color:#FFD700;
    font-size:22px;
    font-weight:bold;
    letter-spacing:.5px;
}

.affiliate-bar .subtitle{
    color:#fff;
    font-size:15px;
    margin-top:8px;
    text-align:center;
}

.affiliate-bar:active{
    transform:scale(.98);
}

@media(max-width:768px){

    .affiliate-bar{
        height:130px;
    }

    .affiliate-bar .title{
        font-size:20px;
    }

    .affiliate-bar .subtitle{
        font-size:13px;
    }

}