/* Main Styles for the SFP Summit Leaderboard */

/* Font declarations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'IQOSSansW04-Italic';
  src: url('../fonts/IQOSSansW04-Italic.woff2') format('woff2'),
       url('../fonts/IQOSSansW04-Italic.woff') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IQOSSansW04-BoldItalic';
  src: url('../fonts/IQOSSansW04-BoldItalic.woff2') format('woff2'),
       url('../fonts/IQOSSansW04-BoldItalic.woff') format('woff');
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IQOSSansW04-LightItalic';
  src: url('../fonts/IQOSSansW04-LightItalic.woff2') format('woff2'),
       url('../fonts/IQOSSansW04-LightItalic.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IQOSSansArabicW04-Regular';
  src: url('../fonts/IQOSSansArabicW04-Regular.woff2') format('woff2'),
       url('../fonts/IQOSSansArabicW04-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IQOSSansArabicW04-Light';
  src: url('../fonts/IQOSSansArabicW04-Light.woff2') format('woff2'),
       url('../fonts/IQOSSansArabicW04-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IQOSSansArabicW04-Bold';
  src: url('../fonts/IQOSSansArabicW04-Bold.woff2') format('woff2'),
       url('../fonts/IQOSSansArabicW04-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-blue: #4cc9f0;
  --primary-purple: #3a0ca3;
  --dark-bg: #1f2233;
  --text-light: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --rank-1-color: #ffb800;
  --rank-2-color: #c0c0c0;
  --rank-3-color: #cd7f32;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  background-image: url('../images/Desktop.png');
  background-size: contain;
  background-position: top;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.header-warning {
  color: #000;
  background-color: #fff;
  text-align: center;
  padding: 8px 30px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.logo {
  display: block;
  max-width: 250px;
  margin: 20px auto 40px;
}

.leader-board-title {
  text-align: center;
  font-family: 'Helvetica', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 125%;
  letter-spacing: 5.76px; /* 12% of 48px */
  margin: 40px 0;
  text-transform: uppercase;
}

.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  position: relative;
  flex-direction: column;
}

.calculation-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  gap: 10px;
}

.mode-btn {
  background-color: rgba(76, 201, 240, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(76, 201, 240, 0.3);
  border-radius: 30px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'IQOSSansArabicW04-Regular', sans-serif;
}

.mode-btn:hover {
  background-color: rgba(76, 201, 240, 0.2);
}

.mode-btn.active {
  background-color: rgba(76, 201, 240, 0.3);
  border-color: var(--primary-blue);
  box-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
}

.player-count {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
  font-family: 'IQOSSansArabicW04-Light', sans-serif;
}

.refresh-button {
  position: absolute;
  right: 0;
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.refresh-button:hover {
  transform: rotate(30deg);
}

.refresh-button.refreshing {
  animation: spin 1s linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.refresh-button svg {
  width: 24px;
  height: 24px;
  fill: var(--text-light);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #EBEBEB1F;
  border-radius: 10px;
  margin-bottom: 15px;
  padding: 20px 30px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leaderboard-row:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.rank {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 60px;
  height: 60px;
  font-family: 'Inter', sans-serif;
  font-size: 50px;
  font-weight: bold;
  margin-right: 20px;
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1px white;
  letter-spacing: 2px;
}

.rank sup {
  font-size: 16px;
  position: absolute;
  top: 15px;
  right: -10px;
  color: white;
  font-weight: 400;
  font-family: 'IQOSSansArabicW04-Regular', sans-serif;
  -webkit-text-stroke: 1px white;
}

.rank-1 {
  color: #FFB84D;
  position: relative;
  background: transparent;
  -webkit-text-stroke: 2px #CC6A04;
  font-family: 'Inter', sans-serif;
}

.rank-1 sup {
  -webkit-text-stroke: 1px  #CC6A04;
  color:  #CC6A04;
}

.market-name {
  flex-grow: 1;
  font-size: 24px;
  font-weight: 400;
  font-family: 'IQOSSansArabicW04-Light', sans-serif;
  padding-left: 10px;
}

.points {
  display: flex;
  align-items: center;
  font-family: 'IQOSSansArabicW04-Regular', sans-serif;
  color: white;
}

.points-value {
  font-size: 24px;
  font-weight: 700;
}

.points-label {
  font-size: 24px;
  font-family: 'IQOSSansArabicW04-Light', sans-serif;
  font-weight: 400;
  margin-left: 5px;
}

.first-place {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.3) 0%, rgba(58, 12, 163, 0.2) 100%);
    border-radius: 12px;
    padding: 20px 30px;
    position: relative;
}

.first-place::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(180deg, #FF9900 0%, #00D1D2 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.loading, .error-message {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: var(--text-light);
}

.no-data {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Adjust rank container width for double-digit numbers */
.rank.double-digit {
  width: 80px;
}

.rank.double-digit sup {
  right: -5px;
}

/* Adjust rank container width for triple-digit numbers */
.rank.triple-digit {
  width: 100px;
  font-size: 40px;
}

.rank.triple-digit sup {
  right: -5px;
  font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .leader-board-title {
    font-size: 36px;
    letter-spacing: 4.32px; /* 12% of 36px */
  }
  
  .calculation-mode {
    flex-wrap: wrap;
  }
  
  .mode-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .leaderboard-row {
    padding: 15px;
  }
  
  .rank {
    width: 50px;
    height: 50px;
    font-size: 22px;
    margin-right: 15px;
  }
  
  .rank.double-digit {
    width: 65px;
  }
  
  .rank.triple-digit {
    width: 80px;
    font-size: 20px;
  }
  
  .rank sup {
    font-size: 12px;
    right: -8px;
  }
  
  .market-name {
    font-size: 18px;
  }
  
  .points {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .leader-board-title {
    font-size: 28px;
    letter-spacing: 3.36px; /* 12% of 28px */
  }
  
  .calculation-mode {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .mode-btn {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .leaderboard-row {
    padding: 12px;
  }
  
  .rank {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-right: 10px;
  }
  
  .rank.double-digit {
    width: 50px;
  }
  
  .rank.triple-digit {
    width: 60px;
    font-size: 16px;
  }
  
  .rank sup {
    font-size: 10px;
    top: 10px;
    right: -5px;
  }
  
  .market-name {
    font-size: 16px;
  }
  
  .points {
    font-size: 16px;
  }
} 