/* --- Variables & Reset --- */
:root {
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --primary-maroon: #800000;
    --accent-gold: #FFD700;
    --accent-red: #ff3333;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7; /* Better readability for SEO text */
    font-size: 16px;
    padding-bottom: 10px;
}

a { text-decoration: none; color: var(--accent-gold); transition: 0.3s; }
a:hover { color: #fff; text-shadow: 0 0 5px var(--accent-gold); }

/* --- Header --- */
.main-header {
    background: linear-gradient(180deg, #000 0%, var(--primary-maroon) 100%);
    border-bottom: 3px solid var(--accent-gold);
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

.site-title{background:linear-gradient(to right,#FCEABB,#F8B500);-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:2.8rem;font-weight:900;margin-bottom:5px;letter-spacing:0.5px}
.site-tagline{font-size:0.8rem;color:#fff;font-weight:500}


/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px;
}

/* --- SEO Content Cards (The fixed part) --- */
.seo-card {
    background: var(--card-bg);
    border-left: 5px solid var(--primary-maroon);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.seo-card h2, .seo-card h3, .seo-card h4 {
    color: var(--accent-gold);
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 5px;
    margin-top: 10px;
    font-size: 1.2rem;
}

.seo-card p { margin-bottom: 5px; color: #d0d0d0; text-align: justify; }
.seo-card ul { padding-left: 10px; margin-bottom: 10px; color: #d0d0d0; }
.seo-card li { margin-bottom: 8px; }

/* --- Live Results --- */
.live-box {
    background: linear-gradient(145deg, #460e0e, #000);
    border: 2px solid var(--accent-red);
    padding: 10px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 12px;
    animation: pulse 2s infinite;
}


.live-game-name {
  font-size: 1.8rem;
  font-weight: bold;
  margin-top: 5px;
/*  margin-bottom: 5px;*/

  /* Bright Steel Color (Pale cool grey/blue) */
  color: #e3f2fd;

  /* Layered Glow Effect */
  text-shadow:
    0 0 5px rgba(255, 255, 255, 0.9),    /* Inner white-hot core */
    0 0 10px rgba(176, 196, 222, 0.7),   /* Light Steel Blue middle */
    0 0 20px rgba(176, 196, 222, 0.5),   /* Outer aura */
    0 0 40px rgba(176, 196, 222, 0.3);   /* Distant haze */
}

.live-number {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin-top: 5px;
/*  margin: 10px 0; */
  
  /* Base shadow/glow */
  text-shadow: 2px 2px 0 #000, 0 0 15px rgba(255, 215, 0, 0.6);
  
  /* Animation */
  animation: goldPulse 2s infinite ease-in-out;
}

/* The Keyframes */
@keyframes goldPulse {
  0%, 100% {
    text-shadow: 2px 2px 0 #000, 0 0 15px rgba(255, 215, 0, 0.6);
  }
  50% {
    text-shadow: 2px 2px 0 #000, 0 0 25px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.4);
  }
}

.live-msg { color: #eee; font-style: italic; }

/* --- Result Grid --- */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.result-item {
    background: #222;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.result-item.highlight { border: 2px solid var(--accent-gold); background: #2a2a00; }

.result-item .h3 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
  
  /* The Fade Effect */
  background: linear-gradient(90deg, var(--primary-maroon) 0%, rgba(0,0,0,0) 100%);
  
  /* Accent Border on the left */
  border-left: 5px solid var(--accent-gold); /* Or use #fff */
  
  /* Spacing */
  padding: 2px 4px;
  border-radius: 0 4px 4px 0; /* Only rounded on the right */
}

.result-item .score {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin: 10px 0;

  /* The magic happens here */
  text-shadow:
    /* Layer 1: The original hard black shadow for definition */
    2px 2px 0 #000,
    /* Layer 2: A tight, bright gold glow */
    0 0 10px rgba(255, 215, 0, 0.8),
    /* Layer 3: A wider, softer ambient glow */
    0 0 30px rgba(255, 215, 0, 0.4);
}

.result-item .time { font-size: 1.0rem; color: #c7e9fe; /* margin-bottom: 10px;*/ }

/* --- Special Section (King/Queen) --- */
.kqj-section {
    background: linear-gradient(to right, #2c0b0b, #000);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--accent-gold);
    margin: 20px 0;
    text-align: center;
}

.kqj-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.kqj-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #555;
    padding: 10px;
    border-radius: 8px;
    min-width: 200px;
}

/* --- Footer & Buttons --- */
.footer { background: #000; color: #888; text-align: center; padding: 10px; border-top: 3px solid #333; margin-top: 10px; }
/*
.btn-refresh { background: var(--primary-maroon); color: #fff; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-refresh:hover { background: #aa0000; }
*/

.panel-link {
  /* CHANGE: Use block to take up the full line, or combine with width: 100% */
  display: block; 
  width: 100%;

  /* IMPORTANT: Prevents padding/border from making it wider than the parent */
  box-sizing: border-box; 

  /* OPTIONAL: Centers the text inside the full-width button */
  text-align: center; 

  /* Original styles */
  margin-top: 10px;
  padding: 5px 5px;
  background: #333;
  border-radius: 20px;
  font-size: 1.0rem;
  border: 1px solid #555;
}
.panel-link:hover { background: var(--primary-maroon); border-color: var(--accent-gold); }

/* --- Floating Button --- */
.refresh-symbol-btn {
  /* Position - Floating Bottom Right */
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;

  /* Shape & Size */
  width: 60px;
  height: 60px;
  border-radius: 50%; /* Makes it a circle */
  
  /* Color & Look */
  background-color: #333; /* Dark Grey Background */
  color: #fff;            /* White Icon */
  border: 2px solid #555; /* Subtle border */
  box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Drop Shadow */

  /* Icon Centering */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem; /* Size of the symbol */
  padding-bottom: 3px; /* Visual fix to center the symbol perfectly */
  cursor: pointer;
  
  /* Smooth Animation Setup */
  transition: all 0.4s ease;
}

/* Hover Effects */
.refresh-symbol-btn:hover {
  background-color: #fff; /* Inverts to white on hover */
  color: #000;            /* Icon turns black */
  transform: rotate(180deg) scale(1.1); /* Spins and grows slightly */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6); /* Glow on hover */
}

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } }

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-title { font-size: 2.0rem; }
    .result-grid { grid-template-columns: 1fr; }
    .kqj-container { flex-direction: column; }
    .kqj-card { width: 100%; }
}


  /* Base Reset for the list */
  .group-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  /* Main Container Box */
  .item-group-list {
    background-color: #0a0a0a; /* Deep Black */
    border: 2px solid #D4AF37; /* Metallic Gold Border */
    border-radius: 12px;
    padding: 25px;
    margin: 0 auto; /* Centering */
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); /* Soft Gold Glow */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  /* The 'Wave' Effect (Optional Pulse Animation) */
  .item-group-list.wave {
    animation: goldPulse 3s infinite;
  }

  /* Base Reset */
  .group-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    
    /* NEW: Grid Layout Setup */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Columns exactly */
    gap: 15px; /* Space between the gold buttons */
  }

  /* Main Container Box */
  .item-group-list {
    background-color: #0a0a0a; /* Deep Black */
    border: 2px solid #D4AF37; /* Metallic Gold Border */
    border-radius: 12px;
    padding: 15px;
    
    /* NEW: Increased width to fit 3 columns */
    max-width: 1100px; 
    width: 95%;
    
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    position: relative;
  }

  /* The 'Wave' Animation */
  .item-group-list.wave {
    animation: goldPulse 3s infinite;
  }

  /* Header Text */
  .block.big {
    display: block;
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    grid-column: 1 / -1; /* Ensures title spans full width */
    
    background: linear-gradient(to right, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* List Links Styling */
  .result-panel-chart {
    display: flex;             /* Center text vertically */
    align-items: center;       /* Center text vertically */
    justify-content: center;   /* Center text horizontally */
    text-decoration: none;
    color: #e0e0e0;
    padding: 10px 10px;
    
    /* Ensure heights are equal */
    height: 100%; 
    min-height: 50px; 

    border: 1px solid #333;
    border-radius: 8px;
    background-color: #111;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  /* Hover Effects */
  .result-panel-chart:hover {
    background: linear-gradient(90deg, #D4AF37, #FFD700); 
    color: #000;
    font-weight: 700;
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    border-color: #FFD700;
  }

  @keyframes goldPulse {
    0% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
    50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.5); }
    100% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
  }

  /* --- RESPONSIVE BREAKPOINTS --- */
  
  /* Tablet: 2 Columns */
  @media (max-width: 900px) {
    .item-group-list ul {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Mobile: 1 Column */
  @media (max-width: 600px) {
    .item-group-list ul {
      grid-template-columns: 1fr;
    }
    .block.big {
      font-size: 20px;
    }
  }

/* --- Navigation Buttons (Top/Bottom) --- */
/* Replaces: Blue bg/Red border with Dark Grey/Gold Border */
.goToBottom input, 
.goToBottom a, 
.goToTop a {
    display: block; /* Ensure full width structure */
    width: 100%;
    box-sizing: border-box; /* Prevents padding from breaking width */
    padding: 12px;
    margin-bottom: 10px;
    
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;

    /* premium Dark Theme Styles */
    color: #e0e0e0 !important;
    background: #333; /* Dark Grey base */
    border: 2px solid #D4AF37; /* Gold Border */
    border-radius: 8px; /* Smooth corners */
    
    transition: all 0.3s ease;
}

/* --- Hover Effects for Buttons --- */
.goToBottom input:hover, 
.goToBottom a:hover, 
.goToTop a:hover {
    background: #800000; /* Turns Maroon on hover */
    color: #fff !important;
    border-color: #FFD700; /* Brighter Gold */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); /* Gold Glow */
    transform: translateY(-2px); /* Slight lift effect */
}

/* --- Floating Scroll Buttons (Left Side) --- */
.floating-scroll-container {
    position: fixed;
    bottom: 30px;
    left: 30px;       /* Puts it on the left side */
    z-index: 9999;
    display: flex;
    flex-direction: column; /* Stacks them vertically */
    gap: 10px;        /* Space between the two buttons */
}

.scroll-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Makes them circles */
    background-color: #333; /* Dark Grey background */
    color: var(--accent-gold, #FFD700); /* Gold arrow */
    border: 2px solid var(--accent-gold, #FFD700);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding-bottom: 3px; /* Centers the text symbol visually */
}

/* Hover Effect: Turns Maroon & Glows */
.scroll-btn:hover {
    background-color: var(--primary-maroon, #800000); 
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); /* Gold Glow */
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}