/* Основные стили приложения */
:root {
  --bg-color: #f4f4f4;
  --card-bg: #ffffff;
  --text-color: #222;
  --border-color: #ddd;
  --accent-color: #27ae60;
}

[data-theme='dark'] {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-color: #eee;
  --border-color: #333;
  --accent-color: #27ae60;
}

body {
  margin: 0;
  padding: 0 10px 70px;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg-color);
  overflow-x: hidden;
  color: var(--text-color);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  margin: 20px 0 10px;
}

label, select, input, button {
  display: block;
  margin: 8px auto;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  max-width: 400px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
}

button {
  cursor: pointer;
  background: var(--accent-color);
  color: #fff;
  border: none;
}

#balance, #timer, #round-info, #bet-result, #last-results, #user-info, #bet-history {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-top: 18px;
}

/* Стили для таблицы истории ставок */
#bet-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#bet-history th, #bet-history td {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

#bet-history th {
  background: var(--border-color);
  font-weight: bold;
}

.bet-win {
  color: #27ae60;
  font-weight: bold;
}

.bet-lose {
  color: #e74c3c;
  font-weight: bold;
}

.bet-pending {
  color: #f39c12;
  font-weight: bold;
}

.color-badge {
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.color-red { background: #e74c3c; }
.color-black { background: #2c3e50; }
.color-green { background: #27ae60; }

/* Фиксированное меню внизу */
.bottom-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.menu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
  min-width: 60px;
}

.menu-button:hover {
  background: var(--border-color);
}

.menu-button.active {
  background: var(--accent-color);
  color: white;
}

.menu-button .icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.menu-button .label {
  font-size: 12px;
  font-weight: 500;
}

/* Увеличиваем отступ снизу для контента */
body {
  padding-bottom: 100px;
}

/* Скрываем меню на других страницах */
.page {
  display: none;
}

.page.active {
  display: block;
}

.back-button {
  background: var(--border-color);
  color: var(--text-color);
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button:hover {
  background: var(--accent-color);
  color: white;
}

.page-title {
  margin: 20px 0;
  color: var(--text-color);
}

/* Стили для главной страницы */
.home-welcome {
  text-align: center;
  padding: 40px 20px;
}

.home-welcome h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: #666;
}

.news-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.news-section h3 {
  margin: 0 0 15px 0;
  color: var(--text-color);
}

.news-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 12px;
  color: #666;
}

.news-text {
  color: var(--text-color);
}

/* Адаптивность */
@media (max-width: 480px) {
  label, select, input, button {
    width: 100%;
  }
  
  .home-stats {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .stat-card {
    padding: 15px;
  }
  
  .stat-icon {
    font-size: 24px;
  }
  
  .stat-value {
    font-size: 20px;
  }
} 