:root {
  --tg-theme-bg-color: #1c1c1d;
  --tg-theme-text-color: #2c2c2e;
  --tg-theme-hint-color: #2c2c2e;
  --tg-theme-link-color: #2481cc;
  --tg-theme-button-color: #2481cc;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-secondary-bg-color: #2c2c2e;

  --primary-gradient: linear-gradient(135deg, #0088cc 0%, #005580 100%);
  --danger-color: #ff3b30;
  --success-color: #34c759;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/*body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--tg-theme-bg-color);
  background-image: "img/background.jpg";
  color: var(--tg-theme-text-color);
  overflow-x: hidden;
  user-select: none;
}*/
body {
  font-family: 'Outfit', sans-serif;
  /*background-color: var(--tg-theme-bg-color);*/
  background-image: url('https://golazoo.com.et/img/bkbkbk.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #2c2c2e;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  user-select: none;
}

/* Loader */
.loader_container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--tg-theme-bg-color);
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--glass-border);
  border-top: 4px solid var(--tg-theme-button-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
}

.padded-panel {
  padding: 20px;
  margin: 15px;
  color: #2c2c2e;
}

/* Header */
.box_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin: 10px;
  border-radius: 20px;
  position: sticky;
  top: 10px;
  z-index: 100;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 45px;
  height: 45px;
  border-radius: 8px;
}

.app-title {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.balance-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #2c2c2e;
}

/* Main App Container */
.app {
  padding-bottom: 100px;
}

.box {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.box.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */
h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.subtitle {
  color: #2c2c2e;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Buttons */
.btn-main,
.btn-gradient {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--tg-theme-button-text-color);
  background-color: var(--tg-theme-button-color);
  transition: transform 0.1s, opacity 0.2s;
}

.btn-gradient {
  background: var(--primary-gradient);
}

.btn-main:active,
.btn-gradient:active {
  transform: scale(0.97);
}

.btn-main:disabled,
.btn-gradient:disabled,
.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.danger-btn {
  background-color: var(--danger-color) !important;
}

/* Navigation Tabs (Cash In/Out) */
.switching_tab {
  display: flex;
  margin: 15px;
  background: var(--tg-theme-secondary-bg-color);
  border-radius: 12px;
  padding: 4px;
}

.switching_tab h3 {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  padding: 10px;
  margin: 0;
  border-radius: 8px;
  color: var(--tg-theme-hint-color);
  cursor: pointer;
  transition: all 0.3s;
}

.switching_tab h3.active {
  background: var(--tg-theme-bg-color);
  color: var(--tg-theme-text-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Footer Navigation */
.box_footer {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-around;
  padding: 12px;
  border-radius: 24px;
  z-index: 1000;
}

.nav_icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--tg-theme-hint-color);
  cursor: pointer;
  transition: color 0.3s, transform 0.2s;
}

.nav_icon.active {
  color: var(--tg-theme-button-color);
  transform: translateY(-2px);
}

.nav_icon .icon {
  font-size: 1.4rem;
}

.nav_icon .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* Profile Elements */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
  color: #2c2c2e;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  background: var(--primary-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  margin-bottom: 15px;
  box-shadow: 0 10px 20px rgba(0, 136, 204, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  color: #2c2c2e;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c2c2e;
}

hr.divider {
  border: 0;
  height: 1px;
  background: var(--glass-border);
  margin: 20px 0;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  width: 85%;
  max-width: 350px;
  padding: 25px;
  text-align: center;
  color: white;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Placeholder Box */
.placeholder-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: var(--tg-theme-hint-color);
  margin-bottom: 20px;
}

/* Game Lobby Specifics */
.stake-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
  color: #2c2c2e;
}

.stake-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #2c2c2e;
  padding: 15px 5px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1.1rem;
}

.stake-btn.selected {
  background: var(--tg-theme-button-color);
  border-color: var(--tg-theme-button-color);
  box-shadow: 0 4px 15px rgba(36, 129, 204, 0.4);
}

.stake-btn-input {
  color: white;
}

/* Status Message */
.status-msg {
  display: none;
  text-align: center;
  padding: 12px;
  margin: 15px;
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
  font-weight: 600;
}

/* cash_out_inpts */
.cash_out_inpts {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #2c2c2e;
  padding: 15px 5px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1.1rem;
  color: white;
}

/* Game UI Overrides */
.menu_screen {
  margin: 15px;
  padding: 25px 20px;
  color: #2c2c2e;
}

.waiting-indicator {
  margin-top: 20px;
  text-align: center;
  color: var(--tg-theme-hint-color);
  font-weight: 600;
}

.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px;
  padding: 15px;
}

.player_box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.p-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c2c2e;
}

.score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tg-theme-button-color);
}

.score-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c2c2e;
  margin-top: 2px;
}

.ball-track {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.ball {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s;
}

.ball.pending {
  background-color: var(--tg-theme-hint-color);
  opacity: 0.3;
}

.ball.goal {
  background-color: var(--success-color);
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
}

.ball.save {
  background-color: var(--danger-color);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
}

.timer {
  font-size: 0.8rem;
  color: #2c2c2e;
}

.vs-badge {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2c2c2e;
}

.game_container {
  position: relative;
  width: 90%;
  max-width: fit-content;
  margin: 0 auto;
}

.goal {
  max-width: 100%;
  height: auto;
  display: block;
}

.target-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px;
}

.zones {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 8px;
}

.normal-zones {
  grid-template-columns: 1fr 0.8fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.sd-zones {
  grid-template-columns: 1fr 0.8fr 1fr;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #cacaca;
  border-radius: 12px;
  color: #2481cc;
  font-size: 1.5rem;
  font-weight: 800;
  backdrop-filter: blur(5px);
  transition: all 0.2s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.zone-num {
  line-height: 1;
}

.zone-action {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1;
}

.glass-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.95);
}

.normal-zone[data-zone="1"] {
  grid-area: 1 / 1 / 2 / 2;
}

.normal-zone[data-zone="5"] {
  grid-area: 1 / 2 / 3 / 3;
}

.normal-zone[data-zone="2"] {
  grid-area: 1 / 3 / 2 / 4;
}

.normal-zone[data-zone="3"] {
  grid-area: 2 / 1 / 3 / 2;
}

.normal-zone[data-zone="4"] {
  grid-area: 2 / 3 / 3 / 4;
}

/* Game Interactivity Visuals */
.kick-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  z-index: 10;
  animation: zoomIn 0.3s ease-out forwards;
}

.dive-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  z-index: 5;
  opacity: 0.8;
  animation: slideInDive 0.3s ease-out forwards;
}

@keyframes zoomIn {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }

  80% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes slideInDive {
  0% {
    transform: translate(-50%, 50%);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%);
    opacity: 0.8;
  }
}

.turn-kicking {
  border: 2px solid var(--success-color);
  box-shadow: 0 0 15px rgba(52, 199, 89, 0.5);
}

.turn-defending {
  border: 2px solid var(--danger-color);
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.5);
}