/* --- GLOBAL STYLES (Telegram-like Look) --- */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  background: #000; /* Deep black for the main background */
  color: #fff; /* Default white text */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Ensure border-box for consistent sizing */
  box-sizing: border-box;
  padding-bottom: 60px; /* Space for fixed bottom nav */
  margin: 0; /* Resetting default body margin, specifically for mines.html */
}
*, *::before, *::after {
  box-sizing: inherit;
}
main {
  flex-grow: 1;
  background: #000; /* Ensure main content area is also black */
  padding-top: 56px; /* Space for fixed header (approx. header height + small margin) */
}

/* --- HEADER STYLES --- */
header {
  position: fixed; /* Header always on top */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50; /* Ensure header stays above other content */
  background: #18181B; /* Slightly off-black for header background */
  border-bottom: 1px solid #363636; /* Subtle separator line */
  padding: 0.5rem 1rem; /* Compact padding for reduced height */
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
header .max-w-md { /* Centering content in header */
  max-width: 768px; /* Slightly wider for better desktop view */
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  display: flex; /* Make it a flex container for its children */
  align-items: center; /* Vertically align items */
  justify-content: space-between; /* Space between logo/support and balance */
  height: 44px; /* Fixed height for the header content area */
}
header .logo-and-support { /* Group for logo and support button */
  display: flex;
  align-items: center;
  gap: 8px; /* Space between items in this group */
}
header h1 {
  font-weight: bold;
  color: #fff;
  font-size: 1.1rem; /* Slightly smaller title */
  margin-left: 4px; /* Small gap after star */
  flex-grow: 0; /* Don't grow, let content push it (for roulette.html) */
}
.star-icon {
  color: #FBBE24; /* Telegram-like yellow for stars */
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  font-size: 1.5rem; /* Standard star size in header */
}

/* --- АДМИН-ПАНЕЛЬ: Общие стили --- */
        /* Дополнительные стили для админ-панели */
.admin-container {
	max-width: 800px;
	margin: 2rem auto;
	padding: 1.5rem;
	background: #18181B;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.3);
	text-align: center;
}
.admin-container h2 {
	font-size: 2rem;
	color: #FBBE24; /* Желтый для заголовка */
	font-weight: 800;
	margin-bottom: 2rem;
}
.admin-section {
	text-align: left;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #363636; /* Разделитель секций */
}
.admin-section:last-child {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}
.admin-section h3 {
	font-size: 1.4rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 1.2rem;
	display: flex;
	align-items: center;
	gap: 10px;
}
.admin-section h3 i {
	color: #3390EC; /* Синий для иконок секций */
}

/* Стиль для настроек */
.settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Адаптивные колонки */
	gap: 20px;
	margin-top: 1.5rem;
}
.setting-card {
	background: #2D2D2D;
	border-radius: 12px;
	padding: 1.2rem;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.setting-card label {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	color: #A0A0A0;
	margin-bottom: 0.7rem;
}
.setting-card input[type="text"],
.setting-card input[type="number"],
.setting-card select,
.admin-section textarea { /* Добавлено для textarea */
	width: 100%;
	padding: 0.7rem 1rem;
	border: 1px solid #4C4C4C;
	border-radius: 8px;
	background: #3A3A3A;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 1rem; /* Отступ снизу */
	box-sizing: border-box;
}
.setting-card input[type="number"]:focus,
.setting-card input[type="text"]:focus,
.setting-card select:focus,
.admin-section textarea:focus { /* Добавлено для textarea */
	outline: none;
	border-color: #3390EC;
	box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.25);
}
.setting-card .input-with-icon {
	position: relative;
	display: flex;
	align-items: center;
}
.setting-card .input-icon {
	position: absolute;
	left: 10px;
	color: #A0A0A0;
	font-size: 1rem;
	z-index: 2;
}
.setting-card .input-group {
	display: flex;
	gap: 10px;
	align-items: center;
}
.setting-card .input-group .add-chance-btn {
	background: #4CAF50; /* Зеленая кнопка */
	color: #fff;
	padding: 0.7rem 1.2rem;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0; /* Чтобы кнопка не сжималась */
}
.setting-card .input-group .add-chance-btn:hover {
	background: #409243;
}
.setting-card .input-group .remove-btn {
	background: #EF4444; /* Красная кнопка */
	color: #fff;
	padding: 0.7rem 1.2rem;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0;
}
.setting-card .input-group .remove-btn:hover {
	background: #d32f2f;
}
.chance-entry {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	background: #3A3A3A;
	padding: 10px 15px;
	border-radius: 8px;
}
.chance-entry span {
	color: #A0A0A0;
}
.chance-entry input[type="text"],
.chance-entry input[type="number"],
.chance-entry select { /* Добавлено для select в chance-entry */
	margin-bottom: 0; /* Убираем нижний отступ для инпутов в chance-entry */
}
.chance-entry .prize-amount-input,
.chance-entry .prize-probability-input,
.chance-entry .mines-multiplier-value-input {
	 flex-grow: 1; /* Чтобы они занимали больше места */
}
.chance-entry .prize-type-select {
	flex-shrink: 0;
	width: auto;
}

/* Кнопка переключения тех. работ */
.maintenance-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #2D2D2D;
	padding: 1rem 1.5rem;
	border-radius: 12px;
	margin-bottom: 1.5rem;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.maintenance-toggle label {
	font-size: 1.1rem;
	font-weight: 600;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
}
.maintenance-toggle .switch {
	position: relative;
	display: inline-block;
	width: 50px; /* Ширина переключателя */
	height: 24px; /* Высота переключателя */
}
.maintenance-toggle .switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.maintenance-toggle .slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #3A3A3A; /* Серый фон */
	border-radius: 12px; /* Скругленные углы */
	transition: .4s;
}
.maintenance-toggle .slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	border-radius: 50%;
	transition: .4s;
}
input:checked + .slider {
	background-color: #3390EC; /* Синий цвет при включении */
}
input:focus + .slider {
	box-shadow: 0 0 1px #3390EC; /* Синее свечение при фокусе */
}
input:checked + .slider:before {
	transform: translateX(26px); /* Перемещение кружка */
}

/* Стиль для кнопки "Применить" */
.apply-settings-btn {
	background: #3390EC;
	color: #fff;
	font-weight: 700;
	font-size: 1.1rem;
	border: none;
	border-radius: 8px;
	padding: 0.85rem 2rem;
	margin-top: 1.5rem;
	box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3);
	transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
	width: auto;
	display: inline-block;
	cursor: pointer;
}
.apply-settings-btn:hover:not(:disabled) {
	background: #2A79CC;
	transform: scale(1.02);
}
.apply-settings-btn:disabled {
	background: #4C4C4C;
	cursor: not-allowed;
	box-shadow: none;
	opacity: 0.7;
}

/* Стили для поиска пользователей */
.user-search-section {
	margin-top: 1.5rem;
	background: #2D2D2D;
	border-radius: 12px;
	padding: 1rem 1.5rem;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.user-search-section h3 {
	margin-bottom: 1rem;
}
.user-search-container {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 1.5rem;
}
.user-search-container input[type="text"] {
	flex-grow: 1; /* Занимает доступное пространство */
}
.user-search-container .find-user-btn {
	background: #3390EC;
	color: #fff;
	padding: 0.7rem 1.2rem;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0;
}
.user-search-container .find-user-btn:hover {
	background: #2A79CC;
}
.user-info-display {
	background: #3A3A3A;
	border-radius: 8px;
	padding: 1rem 1.2rem;
	margin-top: 1rem;
	text-align: left;
	color: #A0A0A0;
}
.user-info-display p {
	margin-bottom: 0.6rem;
}
.user-info-display p:last-child {
	margin-bottom: 0;
}
.user-info-display span {
	font-weight: 600;
	color: #fff;
}
.user-info-display .user-actions {
	display: flex;
	flex-wrap: wrap; /* Позволяет кнопкам переноситься */
	gap: 10px;
	margin-top: 1.5rem;
}
.user-info-display .user-actions button {
	flex: 1 1 auto; /* Кнопки будут расти и сжиматься */
	min-width: 120px; /* Минимальная ширина, чтобы не слипались */
	padding: 0.7rem 1rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 1rem;
	border: none;
	cursor: pointer;
	transition: background 0.15s, transform 0.12s;
}
.user-info-display .user-actions .ban-unban-btn { /* Изменено с .ban-btn */
	background: #EF4444; /* Red */
	color: #fff;
}
.user-info-display .user-actions .ban-unban-btn:hover {
	background: #d32f2f;
}
.user-info-display .user-actions .make-admin-unadmin-btn { /* Изменено с .make-admin-btn */
	background: #3390EC; /* Blue */
	color: #fff;
}
.user-info-display .user-actions .make-admin-unadmin-btn:hover {
	background: #2A79CC;
}
/* Для кнопок "Выдать", которые используют общий стиль .telegram-button */
.user-info-display .user-actions .telegram-button {
	 background: #3A3A3A; /* Более темный серый для кнопок выдачи */
	 color: #fff;
	 box-shadow: none; /* Убираем лишнюю тень */
}
.user-info-display .user-actions .telegram-button:hover {
	 background: #4C4C4C;
}

/* Таблица настроек шансов (для Mines, если нужна табличная структура, но у нас сейчас list) */
/*
.chance-settings-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1.5rem;
}
.chance-settings-table th, .chance-settings-table td {
	padding: 0.8rem 1rem;
	text-align: left;
	border-bottom: 1px solid #363636;
}
.chance-settings-table th {
	background: #2D2D2D;
	font-weight: 600;
	color: #A0A0A0;
}
.chance-settings-table tr:last-child td {
	border-bottom: none;
}
.chance-settings-table .chance-entry-row input {
	margin-bottom: 0;
}
.chance-settings-table .action-buttons {
	display: flex;
	gap: 5px;
}
*/
.chance-entry-controls {
	display: flex;
	gap: 10px;
	flex-wrap: wrap; /* Позволяет элементам переноситься на новую строку */
	align-items: center;
}
.chance-entry-controls input,
.chance-entry-controls select {
	flex-grow: 1; /* Занимают доступное пространство */
	min-width: 80px; /* Минимальная ширина для полей ввода */
	margin-bottom: 0; /* Убираем лишний margin-bottom, он будет на родителе */
}
.chance-entry-controls button {
	flex-shrink: 0; /* Не сжимать кнопку */
	width: auto; /* Автоматическая ширина */
	padding: 0.7rem 1.2rem !important; /* !important, чтобы переопределить .apply-settings-btn */
	margin-top: 0 !important; /* Убираем лишний отступ */
}

/* Header buttons (Balance & Support) */
#user-balance, #support-header-button { /* support-header-button is only in index.html */
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2D2D2D; /* Dark gray for header buttons */
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 4px 8px; /* Compact padding for header buttons */
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-decoration: none; /* For #user-balance being a link */
}
/* Анимация пульсации для кнопки баланса */
#user-balance.pulse-animation {
  animation: balancePulse 1.5s infinite ease-in-out;
}
@keyframes balancePulse {
  0% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
  50% { transform: scale(1.03); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
  100% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
}

#user-balance:hover, #support-header-button:hover {
  background: #3A3A3A; /* Slightly lighter gray on hover */
  transform: scale(1.02);
}
#user-balance:active, #support-header-button:active {
  transform: scale(0.98);
}
#user-balance .fa-wallet {
  color: #FBBE24; /* Yellow for wallet icon */
  font-size: 0.9em; /* Slightly smaller icon */
}
#support-header-button span {
  display: inline; /* Default to show text */
}
@media (max-width: 480px) { /* On very small screens */
  #support-header-button span {
    display: none; /* Hide text, show only icon */
  }
  #support-header-button {
    padding: 4px 6px; /* Adjust padding for icon-only button */
  }
  #support-header-button .fa-headset {
      margin-right: 0; /* No margin if text is hidden */
  }
  header h1 {
      font-size: 1rem; /* Smaller title on small screens */
  }
  header .logo-and-support {
      gap: 4px; /* Reduce gap to fit on small screens */
  }
}
/* --- MAIN CONTENT LAYOUT --- */
main .max-w-md {
  max-width: 768px; /* Consistent max-width */
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  text-align: center; /* For mines.html, tasks.html, profile.html */
}
.main-title-section {
  text-align: center;
  margin-bottom: 1rem; /* ИЗМЕНЕНО: уменьшен отступ снизу */
  padding-top: 1rem;
}
.main-title-section h2 {
  font-size: clamp(1.2rem, 5vw, 2rem); /* Динамический размер шрифта */
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #fff;
  white-space: nowrap; /* Запрещает перенос строки */
  overflow: hidden; /* Обрезает текст, если не помещается */
  text-overflow: ellipsis; /* Добавляет многоточие, если текст обрезан */
  display: block; /* Убедимся, что это блочный элемент для overflow/white-space */
}
.main-title-section p {
  color: #A0A0A0; /* Lighter gray for descriptive text */
  font-size: 1rem; /* For mines.html */
}
.main-title-section .star-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* --- DYNAMIC INPUT CARD (NEW MAIN INTERFACE - index.html) --- */
.dynamic-input-card {
  background: #2D2D2D; /* Consistent dark gray background */
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 1.5rem 1.2rem;
  margin: 0 auto 2rem auto;
  color: #fff;
  max-width: 420px; /* Max-width for the main input card */
}
/* Form group for consistent vertical spacing */
.form-group {
    margin-bottom: 0.7rem; 
}
.form-group:last-of-type {
    margin-bottom: 0; /* No margin for the last group before the Buy button */
}
.dynamic-input-card label {
  color: #A0A0A0; /* Light gray for input labels */
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: block;
}
/* --- UPDATED STYLE FOR INPUTS (WITH ICONS & BOLD TEXT) --- */
.modal-content input[type="number"],
.dynamic-input-card input[type="number"], 
.dynamic-input-card input[type="text"],
.modal-content input[type="text"] { /* Added for modal inputs */
  width: 100%; 
  padding: 0.7rem 1rem;
  padding-left: 35px; /* Отступ для иконки */
  border: 1px solid #4C4C4C; /* Subtle border for inputs */
  border-radius: 8px;
  background: #3A3A3A; /* Slightly lighter gray for input background */
  color: #fff;
  font-size: 1.05rem;
  font-weight: bold; /* Жирный шрифт для ввода */
  transition: border-color 0.15s, box-shadow 0.15s;
  /* УБИРАЕМ СТРЕЛКИ НАВСЕГДА ДЛЯ ВСЕХ ЧИСЛОВЫХ ПОЛЕЙ */
  -moz-appearance: textfield; /* Firefox */
}
.modal-content input[type="number"]::-webkit-outer-spin-button,
.modal-content input[type="number"]::-webkit-inner-spin-button,
.dynamic-input-card input[type="number"]::-webkit-outer-spin-button,
.dynamic-input-card input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari */
    margin: 0; /* Убирает лишний отступ, который иногда появляется */
}

.modal-content input[type="number"]:focus,
.dynamic-input-card input[type="number"]:focus, 
.dynamic-input-card input[type="text"]:focus,
.modal-content input[type="text"]:focus { /* Added for modal inputs */
  outline: none;
  border-color: #3390EC; /* Telegram blue on focus */
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.25); /* Blue glow on focus */
}

/* Стили для обертки инпута с иконкой */
.input-with-icon {
    position: relative;
    display: flex; /* Для корректного размещения иконки и инпута */
    align-items: center; /* Выравнивание по центру по вертикали */
    flex-grow: 1; /* Чтобы обертка занимала все доступное место в input-group */
}
/* Стили для иконки внутри инпута */
.input-icon {
    position: absolute;
    left: 10px; /* Отступ от левого края */
    color: #A0A0A0; /* Цвет как у лейблов */
    font-size: 1rem; /* Размер иконки */
    z-index: 2; /* Убедимся, что иконка поверх инпута */
}

.dynamic-input-card .input-group { /* Flex group for username input and button */
    display: flex;
    align-items: center;
    gap: 8px;
}

.dynamic-input-card .input-group button {
    flex-shrink: 0; 
    padding: 0.7rem 1rem;
    background: #3A3A3A; 
    color: #fff; 
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap; 
    display: flex; 
    align-items: center;
    gap: 6px;
}
.dynamic-input-card .input-group button:hover {
    background: #4C4C4C; 
    transform: scale(1.02);
}
.dynamic-input-card .input-group button:active {
    transform: scale(0.98);
}

/* Avatar styling */
.avatar-area {
  display: flex; 
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem; /* ИЗМЕНЕНО: уменьшен отступ снизу */
}
.avatar-area .avatar-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #3A3A3A; /* Placeholder background */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-area .avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-area .avatar-container .fa-user {
  font-size: 2.5rem;
  color: #A0A0A0; /* Gray for default icon */
}
.avatar-area .username-display {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff; /* Default color for the whole line, including @username */
}
.avatar-area .username-display .blue-name {
    color: #3390EC; /* Specific class for blue name */
}

/* Main "Buy" Button */
.telegram-button {
  background: #3390EC; /* Telegram blue */
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem; /* <--- ИЗМЕНЕНО: уменьшен размер шрифта (for profile.html) */
  border: none;
  border-radius: 8px;
  padding: 0.85rem 0; /* Changed from 0.85rem 0 to 0.7rem 0 for profile.html */
  margin-top: 0.5rem;
  box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3); /* Blue shadow */
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  width: 100%; /* Ensure full width */
  cursor: pointer; /* Add cursor pointer for all buttons */
  display: flex; /* For icon and text alignment */
  align-items: center;
  justify-content: center;
  gap: 8px; /* Space between icon and text */
}
.telegram-button:hover {
  background: #2A79CC; /* Darker blue on hover */
  transform: scale(1.02);
  box-shadow: 0 6px 14px rgba(51, 144, 236, 0.4);
}
.telegram-button:active {
  transform: scale(0.98);
}
/* Disabled state for main button */
.telegram-button:disabled {
  background: #4C4C4C; /* Grey background for disabled */
  cursor: not-allowed;
  box-shadow: none; /* No shadow */
  transform: none; /* No hover/active transform */
  opacity: 0.7;
}

/* --- INFO SECTION (index.html) --- */
.info-section {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #A0A0A0; /* Light gray */
}
.info-section a {
  color: #3390EC; /* Telegram blue for links */
  text-decoration: none;
  transition: color 0.15s;
}
.info-section a:hover {
  color: #2A79CC;
  text-decoration: underline;
}

/* --- POLICY LINKS SECTION (index.html) --- */
.policy-links-section {
  display: flex;
  flex-wrap: wrap; /* Allows wrapping on small screens */
  justify-content: center;
  gap: 12px; /* Space between buttons */
  margin-top: 2rem; /* Space after info section */
  margin-bottom: 2rem; /* Space before footer */
}
.policy-links-section .policy-button {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    background: #3390EC; /* Telegram blue */
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(51, 144, 236, 0.2);
    flex-basis: 0; /* Allow shrinking */
    flex-grow: 1; /* Allow growing to fill space */
    min-width: 160px; /* Minimum width before wrapping */
    justify-content: center; /* Center text and icon inside button */
    cursor: pointer; /* Add cursor pointer */
}
.policy-links-section .policy-button i {
    margin-right: 0.5rem;
}
.policy-links-section .policy-button:hover {
    background: #2A79CC;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(51, 144, 236, 0.3);
}
.policy-links-section .policy-button:active {
    transform: scale(0.98);
}

/* --- MODAL WINDOWS --- */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); /* Semi-transparent black overlay */
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* Hidden by default */
  pointer-events: none; /* No interaction when hidden */
  transition: opacity 0.2s ease-out;
}
.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
  background: #2D2D2D; /* Dark gray for modal content */
  color: #fff; /* Default text color for modal */
  border-radius: 16px;
  padding: 28px 20px;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3); /* Stronger shadow for modal */
  position: relative;
  text-align: left; /* Default alignment, might be overridden by specific modals */
  transform: translateY(20px); /* Slide up animation */
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}
.modal-backdrop.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}
.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.8rem; /* ИЗМЕНЕНО: уменьшен отступ */
  color: #fff;
  text-align: center; /* Центрируем заголовок модалки */
}
/* Добавлено: стили для описания в модалке */
.modal-content .modal-description {
    font-size: 0.95rem;
    color: #A0A0A0;
    text-align: center;
    margin-bottom: 1.5rem; /* Отступ после описания */
    line-height: 1.5;
}
.modal-content .modal-row {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem; /* Добавляем внутренний отступ для разделителя */
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.7); /* Более мягкий белый для лейблов */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Тонкий, еле заметный разделитель */
}
/* Убираем нижний разделитель у последнего элемента перед чекбоксом */
.modal-content .modal-row:last-child { 
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.modal-content .modal-row span:last-child {
  font-weight: 600;
  color: #3390EC; /* СИНИЙ для значений - ИЗМЕНЕНО! */
}
/* Если баланс после покупки отрицательный, цвет красный */
.modal-content .modal-row span#modal-balance-after.negative {
    color: #EF4444; 
}

.modal-content .modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
}
.modal-content button {
  flex: 1 1 0;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
/* Modal Confirm Button */
.modal-content .confirm-btn {
  background: #3390EC; /* Telegram blue */
  color: #fff;
  box-shadow: 0 2px 8px rgba(51, 144, 236, 0.2);
}
.modal-content .confirm-btn:hover {
  background: #2A79CC;
}
/* Modal Cancel Button */
.modal-content .cancel-btn {
  background: #3A3A3A; /* Dark gray */
  color: #fff; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.modal-content .cancel-btn:hover {
  background: #4C4C4C;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem; /* Larger 'x' */
  color: #ccc; /* Light gray 'x' */
  cursor: pointer;
}
.modal-close:hover {
  color: #fff;
}

/* Modal Checkbox (index.html) */
.modal-checkbox-row {
    display: flex;
    align-items: flex-start; /* Align checkbox to top of text */
    margin-top: 1rem; 
    margin-bottom: 1.5rem; 
    font-size: 0.95rem; 
    color: rgba(255, 255, 255, 0.7); /* Согласованный мягкий белый */
}
.modal-checkbox-row input[type="checkbox"] {
    margin-right: 10px; 
    width: 20px; /* Larger checkbox */
    height: 20px;
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    accent-color: #3390EC; /* Telegram blue for checkmark */
    cursor: pointer;
}
.modal-checkbox-row label a {
    color: #3390EC; /* Telegram blue for link */
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px; 
}
.modal-checkbox-row label a:hover {
    text-decoration: underline;
}

/* Notification Popups */
.fixed-notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  background: #4CAF50; /* Success green */
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 0.95rem;
  animation: slideInFromRight 0.3s ease-out forwards, fadeOut 0.3s ease-in 2.7s forwards; 
}
.fixed-notification.error {
  background: #EF4444; /* Error red */
}
.fixed-notification.info { /* for profile.html */
    background-color: #2196F3; /* Blue for info */
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}
@keyframes slideInFromRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeInOut { /* for profile.html */
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* --- Browser Mode Info Section (index.html, mines.html) --- */
.browser-mode-info {
    background: #2D2D2D;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 1.5rem 1.2rem;
    margin: 2rem auto;
    color: #fff;
    max-width: 420px;
    text-align: center;
}
.browser-mode-info h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #FBBE24; /* Yellow for attention */
}
.browser-mode-info p {
    color: #A0A0A0;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.browser-mode-info .get-link-button {
    background: #3390EC;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.5rem;
    box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none; /* For link styling */
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.browser-mode-info .get-link-button:hover {
    background: #2A79CC;
    transform: scale(1.02);
}
.browser-mode-info .get-link-button:active {
    transform: scale(0.98);
}

/* --- BOTTOM NAVIGATION BAR --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #18181B; /* Same as header background */
    border-top: 1px solid #363636; /* Subtle separator line */
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px; /* Standard height for nav bar */
    z-index: 100; /* Ensure it's above other content */
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2); /* Shadow pointing upwards */
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #A0A0A0; /* Default text color (gray) */
    text-decoration: none;
    font-size: 0.75rem; /* Smaller font for labels */
    font-weight: 500;
    flex-grow: 1; /* Distribute space evenly */
    height: 100%; /* Fill nav bar height */
    transition: color 0.2s, background 0.2s;
    position: relative; /* For "Скоро" badge */
}

.bottom-nav .nav-item i {
    font-size: 1.2rem; /* Icon size */
    margin-bottom: 4px; /* Space between icon and text */
    transition: color 0.2s;
}

.bottom-nav .nav-item:hover {
    color: #FFF; /* Slightly brighter on hover */
    background: #2D2D2D; /* Subtle background change on hover */
}

/* Active state for the current page */
.bottom-nav .nav-item.active {
    color: #3390EC; /* Telegram blue for active item */
}

.bottom-nav .nav-item.active i {
    color: #3390EC; /* Telegram blue for active icon */
}

/* Disabled state */
.bottom-nav .nav-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none; /* Disable clicks */
}

.bottom-nav .nav-item .coming-soon {
    position: absolute;
    top: 5px; /* Adjust as needed */
    right: 5px; /* Adjust as needed */
    background: #EF4444; /* Red badge */
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: bold;
    line-height: 1;
}

/* --- Styles for Mines Game (mines.html) --- */
.mines-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
    background: #18181B;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mines-grid {
    display: grid;
    gap: 4px;
    margin-bottom: 1rem;
}

.mines-cell {
    width: 40px;
    height: 40px;
    background: #2D2D2D;
    border-radius: 6px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.mines-cell:hover:not(.revealed):not(:disabled) {
    background: #3A3A3A;
    transform: scale(1.05);
}

.mines-cell.revealed {
    cursor: default;
    transform: none;
}

.mines-cell.safe {
    background: #4CAF50; /* Success Green */
}

.mines-cell.mine {
    background: #EF4444; /* Error Red */
    color: #000;
}

.mines-status {
    color: #A0A0A0;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.mines-actions {
    display: flex;
    flex-direction: column; /* Изменено для стека кнопок */
    align-items: center;
}
.mines-actions button {
    width: 100%; /* Занимает всю ширину */
    margin: 5px 0; /* Отступ между кнопками */
}
.mines-cell:not(.revealed):not(:disabled){
  cursor: pointer;
}
.mines-cell:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.main-title-section {
    margin-bottom: 0px !important;
}
.mines-actions #demo-spin-section{ /* Removed margin-top from here */
    margin-top: 0; /* Ensures it doesn't add extra space if start/cashout buttons are already there */
}
.mines-cell.mine-near{
  font-size:15px;
  font-weight: bold;
}
/* Styles for the "Начать игру" button */
#start-game-button {
    background: #3390EC; /* Telegram blue */
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 0;
    margin-top: 1rem; /* Adjust as needed */
    box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#start-game-button:hover:not(:disabled) {
    background: #2A79CC;
    transform: scale(1.02);
    box-shadow: 0 6px 14px rgba(51, 144, 236, 0.4);
}
#start-game-button:active:not(:disabled) {
    transform: scale(0.98);
}
#start-game-button:disabled {
    background: #4C4C4C;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}
.hidden-button { /* for mines.html */
	display: none !important; /* Убедитесь, что переопределяет все */
}
/* НОВЫЙ СТИЛЬ ДЛЯ КНОПКИ ДЕМО */
.demo-spin-button {
    background: #3A3A3A; /* Более темный серый для демо-кнопки */
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 0; /* Сохраняем тот же padding для размера */
    margin-top: 1rem; /* Отступ от других кнопок */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.demo-spin-button:hover:not(:disabled) {
    background: #4C4C4C; /* Немного светлее при наведении */
    transform: scale(1.02);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}
.demo-spin-button:active:not(:disabled) {
    transform: scale(0.98);
}
.demo-spin-button:disabled {
    background: #4C4C4C;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

/* --- Profile Card (profile.html) --- */
.profile-card {
    background: #18181B; /* Darker background for the whole card */
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 1.5rem;
    margin: 1rem auto 2rem auto; /* Top margin for header spacing */
    color: #fff;
    max-width: 450px; /* Slightly wider for better content display */
    text-align: center; /* Center main profile info */
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}
.profile-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #3A3A3A; /* Placeholder background */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 12px;
    border: 3px solid #3390EC; /* Telegram blue border */
    box-shadow: 0 0 15px rgba(51, 144, 236, 0.4); /* Blue glow */
}
.profile-avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-avatar-container .fa-user {
    font-size: 4rem;
    color: #A0A0A0; /* Gray for default icon */
}
.profile-username {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.profile-fullname {
    font-size: 1rem;
    color: #A0A0A0;
}

.profile-stats-section, .referral-section {
    text-align: left; /* Align text left within sections */
    margin-bottom: 1.5rem;
}
.profile-stats-section h3, .referral-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FBBE24; /* Yellow for section titles */
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-stat-item, .referral-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}
.profile-stat-item:last-child, .referral-stat-item:last-child {
    border-bottom: none;
}
.profile-stat-item span:last-child, .referral-stat-item span:last-child {
    font-weight: 600;
    color: #fff;
}

/* --- Referral Program Specific Styles (profile.html) --- */
.referral-link-container {
    background: #2D2D2D;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.95rem;
    color: #fff;
}
.referral-link-container input {
    flex-grow: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    padding: 0;
    cursor: pointer;
}
.referral-link-container button {
    background: #3390EC;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}
.referral-link-container button:hover {
    background: #2A79CC;
}
.referral-link-container button:active {
    transform: scale(0.95);
}

/* Progress bars for referral milestones */
.milestone-progress {
    margin-top: 1.5rem;
}
.milestone-item {
    margin-bottom: 1.2rem;
}
.milestone-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.milestone-item .progress-bar-container {
    width: 100%;
    background-color: #3A3A3A;
    border-radius: 8px;
    overflow: hidden;
    height: 18px; /* Slightly smaller than tasks */
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.milestone-item .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2E8B57); /* Green gradient */
    border-radius: 8px;
    transition: width 0.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.milestone-item .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shine 2.5s infinite;
}
@keyframes shine {
    0% { transform: translateX(-100%); }
    60% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}
.milestone-item .progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 18px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
}
.milestone-item .status-icon {
    font-size: 1.1em;
    margin-left: auto;
    color: #A0A0A0;
}
.milestone-item.completed .status-icon {
    color: #4CAF50; /* Green for completed */
}
/* Style for active tab button (profile.html) */
.tab-button.active {
    background: #007bff; /* Different blue for active tab */
}

/* --- CONTAINER STYLES (roulette.html) --- */
.roulette-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    background: #18181B;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}
.roulette-container h2 {
    font-size: 1.8rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.roulette-container p {
    color: #A0A0A0;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Cost Display (roulette.html) */
.cost-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}
.cost-display .original-cost {
    color: #A0A0A0;
    text-decoration: line-through;
    font-weight: 400;
    font-size: 0.9em;
}
.cost-display .discounted-cost {
    color: #FBBE24; /* Yellow for discount */
}
/* NEW: Freespin display */
.freespin-info {
    font-size: 1.05rem;
    font-weight: 600;
    color: #4CAF50; /* Green for available freespins */
    margin-bottom: 1rem;
    display: flex; /* Ensure it's a flex container for icon and text */
    align-items: center;
    justify-content: center;
}
.freespin-info i {
    margin-right: 5px;
}

/* --- CASE SELECTION STYLES (roulette.html) --- */
.case-selection {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.case-button {
    flex: 1;
    padding: 10px 5px;
    background: #2D2D2D;
    border: 2px solid transparent;
    border-radius: 12px;
    color: #A0A0A0;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden; /* For glow effect */
    min-width: 80px; /* Ensure buttons don't get too small */
}

.case-button:hover {
    background: #3A3A3A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.case-button.active {
    background: linear-gradient(45deg, #0088cc, #3390EC); /* Telegram blue gradient */
    border-color: #FBBE24; /* Yellow border for active */
    color: #fff;
    transform: scale(1.05); /* Pop out a bit */
    box-shadow: 0 6px 16px rgba(51, 144, 236, 0.4);
    z-index: 1; /* Bring to front slightly */
}

.case-button i {
    font-size: 1.8rem; /* Larger icon */
    margin-bottom: 5px;
    color: #A0A0A0; /* Default icon color */
    transition: color 0.2s;
}

.case-button.active i {
    color: #fff; /* White icon for active */
}

.case-button .case-cost {
    font-size: 0.8em;
    font-weight: 500;
    margin-top: 3px;
    color: rgba(255,255,255,0.7);
}
.case-button.active .case-cost {
    color: #fff;
}

/* --- CASE OPENING SPECIFIC STYLES (roulette.html) --- */
.case-strip-container {
    width: 100%;
    max-width: 400px; /* Adjust based on desired visible items */
    height: 120px; /* Height of the strip */
    margin: 0 auto 1.5rem auto; /* Adjusted margin */
    border-radius: 12px;
    background: #2D2D2D;
    border: 4px solid #3A3A3A;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    overflow: hidden; /* Crucial for hiding items outside visible area */
    position: relative;
}

.case-strip {
    display: flex; /* Arrange items horizontally */
    height: 100%;
    will-change: transform; /* Optimize for animation */
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.2, 1); /* Spin duration */
}
.case-strip.spinning {
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.case-strip.stopped {
    transition: transform 0.5s ease-out; /* Snap to final position */
}

.case-item {
    min-width: 100px; /* Fixed width for each item */
    flex-shrink: 0; /* Prevent items from shrinking */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1C1C1F; /* Darker background for individual items */
    border-right: 1px solid rgba(255,255,255,0.05); /* Separator */
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: default;
    user-select: none;
}
.case-item:last-child {
    border-right: none;
}
.case-item .item-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #FBBE24; /* Yellow for star/prize icon */
}
.case-item .item-text {
    font-size: 0.9rem;
    color: #A0A0A0; /* Grey for "prize" text */
}

/* The winning item after stop */
.case-item.active-prize {
    background: linear-gradient(45deg, #3390EC, #0088cc); /* Highlight winning prize */
    border-color: #FBBE24;
    transform: scale(1.05); /* Slight scale up */
    transition: transform 0.2s ease-out;
    position: relative; /* For pseudo-elements or additional effects */
    overflow: hidden; /* For any internal glow effect */
}

/* Subtle glow effect for winning item */
.case-item.active-prize::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    animation: pulseGlow 1.5s infinite alternate; /* Subtle pulse */
    z-index: 1;
}

@keyframes pulseGlow {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
    100% { transform: scale(1.2) rotate(360deg); opacity: 0.8; }
}

.case-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px; /* Width of the pointer line */
    height: 100%;
    background: #FBBE24; /* Yellow pointer */
    z-index: 10;
    box-shadow: 0 0 10px rgba(251, 190, 36, 0.5);
}

/* Adjustments for spin button */
.spin-button {
    background: linear-gradient(45deg, #0088cc, #3390EC); /* Telegram blue gradient */
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(51, 144, 236, 0.4);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem; /* More space above button */
}
.spin-button:hover:not(:disabled) {
    background: linear-gradient(45deg, #007bbd, #2a79cc);
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(51, 144, 236, 0.5);
}
.spin-button:active:not(:disabled) {
    transform: scale(0.98);
}
.spin-button:disabled {
    background: #4C4C4C;
    cursor: not-allowed;
    box-shadow: none;
    transform: none; /* Disable transform on hover/active when disabled */
}

/* NEW: Demo button styles */
.demo-spin-button {
    background: #4C4C4C; /* Greyish background */
    color: #fff;
    font-weight: 600; /* Slightly less bold */
    font-size: 1rem; /* Slightly smaller font */
    padding: 0.8rem 1.5rem; /* Smaller padding */
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Softer shadow */
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem; /* Space below main spin button */
}
.demo-spin-button:hover:not(:disabled) {
    background: #5A5A5A;
    transform: scale(1.01); /* Less prominent hover effect */
    box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}
.demo-spin-button:active:not(:disabled) {
    transform: scale(0.99);
}
.demo-spin-button:disabled {
    background: #3A3A3A; /* Even darker grey when disabled */
    cursor: not-allowed;
    box-shadow: none;
}

/* Result Area (repurposed for hidden state of modal content) */
.result-area { /* This is now mostly hidden, modal takes over display */
    display: none; /* Always hidden */
}

/* --- New: Win Animation Overlay (roulette.html) --- */
#win-animation-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200; /* Above modals */
    pointer-events: none; /* Allows clicks to pass through when not active */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #FBBE24; /* Yellow color for win text */
    text-shadow: 0 0 15px rgba(251, 190, 36, 0.8), 0 0 30px rgba(251, 190, 36, 0.6);
    opacity: 0;
    visibility: hidden; /* Hidden by default */
}

#win-animation-overlay.active {
    animation: winAnimation 1.5s ease-out forwards;
}

@keyframes winAnimation {
    0% {
        opacity: 0;
        visibility: visible;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Specific styles for the GIFT MODAL (roulette.html) */
.modal-content.gift-modal {
    padding: 28px 20px; /* Standard padding, adjusted for content */
    background: #1C1C1F; /* Darker background, similar to telegram gift modals */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); /* Stronger, deeper shadow */
    overflow: hidden; /* To contain potential overflow from animations */
}

.modal-content.gift-modal h3 {
    font-size: 1.8rem; /* Larger font for main modal title */
    font-weight: 800; /* Even bolder */
    margin-bottom: 20px; /* Space below title */
    color: #fff;
}

.gift-container {
    position: relative;
    margin-bottom: 25px; /* Space before description */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gift-reveal-area {
    position: relative;
    width: 140px; /* Slightly larger area */
    height: 140px;
    margin: 0 auto 10px auto; /* Centered with more bottom margin */
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-icon {
    position: absolute;
    font-size: 6rem; /* Even larger gift icon */
    color: #4CAF50; /* Green gift box color */
    transition: all 0.4s ease-out; /* For transform/opacity */
}

.prize-value-reveal {
    position: absolute;
    font-size: 2.8rem; /* Very large prize value */
    color: #FBBE24; /* Yellow stars */
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0; /* Hidden initially */
    transform: scale(0.5); /* Starts small */
    transition: all 0.5s ease-out; /* For reveal animation */
}
.prize-value-reveal .fas.fa-star, .prize-value-reveal .fas.fa-ruble-sign {
    font-size: 0.8em; /* Adjust icon size relative to text */
}

.prize-value-reveal.active {
    opacity: 1;
    transform: scale(1);
    animation: prizePop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; /* Pop-in effect */
}

@keyframes prizePop {
    0% { opacity: 0; transform: scale(0.5); }
    70% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.gift-icon.hidden {
    opacity: 0;
    transform: scale(0.5);
}

/* Animation for initial gift pulse */
@keyframes pulseGift {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}
.gift-icon.pulsing {
    animation: pulseGift 1.5s infinite ease-in-out;
}

.prize-text-secondary {
    font-size: 1.1rem; /* Size for "X Telegram Stars" */
    color: #A0A0A0; /* Gray color */
    opacity: 0; /* Hidden initially */
    transform: translateY(10px); /* Starts slightly below */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.prize-text-secondary.active {
    opacity: 1;
    transform: translateY(0);
}

.gift-description {
    color: #A0A0A0;
    font-size: 0.9rem;
    margin-bottom: 25px; /* More space before buttons */
}

/* Telegram-style buttons, updated */
.modal-content .prize-actions {
    flex-direction: column; /* Stack buttons */
    gap: 12px; /* Space between buttons */
    margin-top: 0; /* Margin handled by description */
}

.modal-content .prize-actions button {
    width: 100%;
    padding: 12px 20px; /* Increased padding */
    border-radius: 10px; /* Slightly more rounded */
    font-weight: 600;
    font-size: 1.1rem; /* Slightly larger font */
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Deeper shadow */
}

.modal-content .prize-actions .get-prize-btn {
    background: #3390EC; /* Telegram blue as primary action */
    color: #fff;
    box-shadow: 0 4px 10px rgba(51, 144, 236, 0.4); /* Blue shadow */
}
.modal-content .prize-actions .get-prize-btn:hover:not(:disabled) {
    background: #2A79CC;
    transform: scale(1.01);
}

.modal-content .prize-actions .sell-prize-btn {
    background: #3A3A3A; /* Dark gray for secondary action */
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.modal-content .prize-actions .sell-prize-btn:hover:not(:disabled) { 
    background: #4C4C4C;
    transform: scale(1.01);
}

/* Modal for username input when claiming prize (roulette.html) */
#claim-username-modal .modal-content {
    text-align: left; /* Align text left for input fields */
}
#claim-username-modal .modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #A0A0A0;
}
/* Улучшенные стили для поля ввода @username в модалке */
#claim-username-modal .modal-content input[type="text"] {
    width: 100%;
    padding: 0.7rem 1rem; /* Соответствует другим инпутам */
    margin-bottom: 20px;
    border: 1px solid #4C4C4C;
    border-radius: 8px;
    background: #3A3A3A;
    color: #fff;
    font-size: 1.05rem; /* Соответствует другим инпутам */
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s; /* Анимация фокуса */
}
#claim-username-modal .modal-content input[type="text"]:focus {
    outline: none;
    border-color: #3390EC;
    box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.25);
}
/* Кнопки в модалке юзернейма */
#claim-username-modal .modal-content .modal-actions {
    flex-direction: row; /* Buttons side-by-side */
    gap: 12px; /* Расстояние между кнопками */
    margin-top: 10px; /* Немного уменьшен отступ */
}
#claim-username-modal .modal-content .modal-actions button {
    flex: 1 1 0; /* Равномерное распределение ширины */
    padding: 10px 0; /* Соответствует стандартным модальным кнопкам */
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}
/* Confirm button in claim username modal */
#claim-username-modal .modal-content .confirm-btn {
    background: #3390EC; /* Telegram blue */
    color: #fff;
    box-shadow: 0 2px 8px rgba(51, 144, 236, 0.2);
}
#claim-username-modal .modal-content .confirm-btn:hover:not(:disabled) {
    background: #2A79CC;
}
/* Cancel button in claim username modal */
#claim-username-modal .modal-content .cancel-btn {
    background: #3A3A3A; /* Dark gray */
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#claim-username-modal .modal-content .cancel-btn:hover:not(:disabled) {
    background: #4C4C4C;
}
/* Disabled state for all modal buttons */
.modal-content button:disabled {
    background: #4C4C4C;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

/* --- TASKS SECTION STYLES (tasks.html) --- */
.tasks-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
.tasks-container h2 {
    font-size: 1.8rem;
    color: #fff;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}
.tasks-container .section-title {
    font-size: 1.5rem; /* Более крупный шрифт для заголовков секций */
    font-weight: 600;
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #363636; /* Разделитель */
}
.tasks-container .section-title:first-of-type {
    margin-top: 0; /* Убираем верхний отступ у первого заголовка */
}

.task-card {
    background: #18181B;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.task-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
}
.task-card p {
    color: #A0A0A0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Улучшенный прогресс-бар */
.progress-bar-container {
    width: 100%;
    background-color: #3A3A3A; /* Темный фон для незаполненной части */
    border-radius: 8px;
    overflow: hidden;
    height: 20px; /* Увеличена высота для лучшей видимости */
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3); /* Внутренняя тень для глубины */
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3390EC, #0088cc); /* Яркий синий градиент */
    border-radius: 8px; /* Немного меньше, чтобы был виден радиус контейнера */
    transition: width 0.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Для эффекта света */
}
/* Эффект мерцания/блеска для прогресс-бара */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shine 2.5s infinite; /* Анимация блеска */
}
/* This @keyframes shine is repeated, keep one */
/* @keyframes shine {
    0% { transform: translateX(-100%); }
    60% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
} */

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 20px; /* Соответствует высоте бара */
    font-size: 0.85rem; /* Увеличено */
    font-weight: 700; /* Более жирный */
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
}

.task-reward {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: #FBBE24; /* Yellow for reward */
    margin-top: 0.5rem;
}
.task-reward i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Кнопки заданий */
.task-button {
    background: #4CAF50; /* Green for claim */
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    margin-top: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.task-button:hover:not(:disabled) {
    background: #409243;
    transform: scale(1.01);
}
.task-button:active:not(:disabled) {
    transform: scale(0.99);
}
.task-button:disabled {
    background: #4C4C4C;
    cursor: not-allowed;
    opacity: 0.7;
}
/* Дополнительные стили для кнопки "Выполнено" */
.task-button.completed {
    background: #3A3A3A; /* Серый цвет для выполненных/полученных */
    color: #A0A0A0;
    cursor: default;
}
.task-button.completed:hover {
    transform: none; /* Отключаем hover-эффект */
}
/* Стили для кнопки "Выполнить и получить" */
.task-button.perform-and-get {
    background: #3390EC; /* Синий цвет */
}
.task-button.perform-and-get:hover:not(:disabled) {
    background: #2A79CC;
}

/* MODAL WINDOWS (tasks.html specific overrides) */
/* This specific rule was present in tasks.html and seems to override global, ensuring modal is initially truly hidden */
.modal-backdrop {
    opacity: 0 !important; /* Forces hidden by default */
    pointer-events: none !important; /* No interaction when hidden */
}
.modal-backdrop.active {
    opacity: 1 !important; /* Forces visible when active */
    pointer-events: auto !important; /* Allows interaction when active */
}
.modal-content .telegram-button { /* specific override for modal buttons for tasks.html */
    margin-top: 0.5rem; /* Re-establish margin for these buttons */
}
/* ==================================== */
/* Styles for Ban Overlay Modal (Add this to your global.css) */
/* ==================================== */

/* Full-screen backdrop for the ban modal */
.ban-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark semi-transparent background */
    display: flex; /* Use flexbox for centering content */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    z-index: 1000; /* Ensure it's on top of everything */
    backdrop-filter: blur(5px); /* Apply blur effect to content behind */
    -webkit-backdrop-filter: blur(5px); /* For Safari support */
    /* Animation for smooth appearance */
    animation: fadeIn 0.3s ease-out;
}

/* Content container for the ban message */
.ban-modal-content {
    background-color: var(--tg-theme-bg-color); /* Use Telegram background color */
    border-radius: 12px; /* Rounded corners */
    padding: 30px; /* Internal spacing */
    width: 90%; /* Responsive width */
    max-width: 350px; /* Maximum width for larger screens */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Soft shadow */
    text-align: center; /* Center text content */
    color: var(--tg-theme-text-color); /* Use Telegram text color */
    position: relative;
    overflow: hidden; /* Hide any overflowing content */
    /* Animation for smooth slide-in effect */
    animation: slideIn 0.3s ease-out;
}

/* Style for the lock icon */
.ban-icon {
    font-size: 4em; /* Large icon size */
    color: var(--tg-theme-destructive-text-color); /* Red color for warning/ban */
    margin-bottom: 20px;
    /* Small shake animation to draw attention */
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

/* Style for the main title */
.ban-modal-content h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--tg-theme-text-color);
}

/* Style for the main message text */
.ban-modal-content p {
    font-size: 1.1em;
    color: var(--tg-theme-hint-color); /* Use Telegram hint color for secondary text */
    margin-bottom: 10px;
}

/* Style for the ban duration text */
.ban-duration-text {
    font-size: 1em;
    color: var(--tg-theme-hint-color);
    margin-top: 15px;
    font-style: italic; /* Italicize duration for clarity */
}

/* Style for the close button, ensuring it looks like a Telegram button */
.telegram-button.mt-4 {
    margin-top: 25px; /* Margin top for separation */
    width: auto; /* Adjust width based on content */
    padding: 12px 25px; /* Adequate padding */
    font-size: 1.1em;
    /* Inherits button styles from your existing .telegram-button */
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8); /* Сделай фон модалки чуть темнее, чтобы было видно */
    z-index: 1000; /* Убедись, что модалка поверх всего */
    display: none; /* Скрыто по умолчанию */
    align-items: center;
    justify-content: center;
    opacity: 0; /* Изначально прозрачно */
    pointer-events: none; /* Не реагирует на события, пока не активно */
    transition: opacity 0.3s ease-out; /* Анимация появления */
}

.modal-backdrop.active,
.modal-backdrop[style*="display: flex"] { /* Для того, чтобы CSS-переход работал с JS display:flex */
    opacity: 1; /* Показываем полностью */
    pointer-events: auto; /* Реагирует на события */
    display: flex !important; /* Убедимся, что всегда flex, когда должна быть видна */
}

.modal-content {
    background: #2D2D2D; /* Темный фон для самой модалки */
    color: #fff;
    border-radius: 16px;
    padding: 28px 20px;
    max-width: 340px;
    width: 90%; /* Адаптивная ширина */
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); /* Более сильная тень */
    text-align: center; /* Центрируем текст */
    transform: translateY(20px); /* Анимация появления */
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal-backdrop.active .modal-content,
.modal-backdrop[style*="display: flex"] .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Стиль для кнопки закрытия в модалке техработ */
#maintenance-overlay .telegram-button {
    background: #3390EC; /* Синяя кнопка Telegram */
    color: #fff;
    margin-top: 20px; /* Отступ сверху */
}
#maintenance-overlay .telegram-button:hover {
    background: #2A79CC;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0) rotate(0.5deg); }
    20%, 80% { transform: translate3d(2px, 0, 0) rotate(-0.5deg); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(1deg); }
    40%, 60% { transform: translate3d(4px, 0, 0) rotate(-1deg); }
}
/* dist/global.css */

/* --- GENERAL RESET & BASE STYLES --- */
*, *::before, *::after {
  box-sizing: border-box; /* Ensures consistent sizing */
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  background: #000000; /* Deep black for the main background */
  color: #FFFFFF; /* Default white text */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base link styles */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

/* Remove default number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
}

/* --- HEADER STYLES --- */
header {
  position: fixed; /* Header always on top */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50; /* Ensure header stays above other content */
  background: #18181B; /* Slightly off-black for header background */
  border-bottom: 1px solid #363636; /* Subtle separator line */
  padding: 0.5rem 1rem; /* Compact padding for reduced height */
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
header .max-w-md { /* Centering content in header */
  max-width: 768px; /* Slightly wider for better desktop view */
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  display: flex; /* Make it a flex container for its children */
  align-items: center; /* Vertically align items */
  justify-content: space-between; /* Space between logo/support and balance */
  height: 44px; /* Fixed height for the header content area */
}
header .logo-and-support { /* Group for logo and support button */
  display: flex;
  align-items: center;
  gap: 8px; /* Space between items in this group */
}
header h1 {
  font-weight: bold;
  color: #FFFFFF;
  font-size: 1.1rem; /* Slightly smaller title */
  margin-left: 4px; /* Small gap after star */
  flex-grow: 0; /* Don't grow, let content push it (for roulette.html) */
}
.star-icon {
  color: #FBBE24; /* Telegram-like yellow for stars */
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  font-size: 1.5rem; /* Standard star size in header */
}

/* Header buttons (Balance & Support) */
#user-balance, #support-header-button { /* support-header-button is only in index.html */
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2D2D2D; /* Dark gray for header buttons */
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 4px 8px; /* Compact padding for header buttons */
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-decoration: none; /* For #user-balance being a link */
}
/* Анимация пульсации для кнопки баланса */
#user-balance.pulse-animation {
  animation: balancePulse 1.5s infinite ease-in-out;
}
@keyframes balancePulse {
  0% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
  50% { transform: scale(1.03); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
  100% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
}

#user-balance:hover, #support-header-button:hover {
  background: #3A3A3A; /* Slightly lighter gray on hover */
  transform: scale(1.02);
}
#user-balance:active, #support-header-button:active {
  transform: scale(0.98);
}
#user-balance .fa-wallet {
  color: #FBBE24; /* Yellow for wallet icon */
  font-size: 0.9em; /* Slightly smaller icon */
}
#support-header-button span {
  display: inline; /* Default to show text */
}
@media (max-width: 480px) { /* On very small screens */
  #support-header-button span {
    display: none; /* Hide text, show only icon */
  }
  #support-header-button {
    padding: 4px 6px; /* Adjust padding for icon-only button */
  }
  #support-header-button .fa-headset {
      margin-right: 0; /* No margin if text is hidden */
  }
  header h1 {
      font-size: 1rem; /* Smaller title on small screens */
  }
  header .logo-and-support {
      gap: 4px; /* Reduce gap to fit on small screens */
  }
}

/* --- MAIN CONTENT LAYOUT --- */
main {
  flex-grow: 1;
  background: #000000; /* Ensure main content area is also black */
  padding-top: 56px; /* Space for fixed header (approx. header height + small margin) */
  padding-bottom: 60px; /* Space for fixed bottom nav */
}
main .max-w-md {
  max-width: 768px; /* Consistent max-width */
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  text-align: center; /* For mines.html, tasks.html, profile.html */
}
.main-title-section {
  text-align: center;
  margin-bottom: 1rem;
  padding-top: 1rem;
}
.main-title-section h2 {
  font-size: clamp(1.2rem, 5vw, 2rem); /* Dynamic font size */
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
  white-space: nowrap; /* Prevent line breaks */
  overflow: hidden; /* Clip text if it overflows */
  text-overflow: ellipsis; /* Add ellipsis if text is clipped */
  display: block; /* Ensure it's a block element for overflow/white-space */
}
.main-title-section p {
  color: #A0A0A0; /* Lighter gray for descriptive text */
  font-size: 1rem;
}
.main-title-section .star-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* --- DYNAMIC INPUT CARD (NEW MAIN INTERFACE - index.html) --- */
.dynamic-input-card {
  background: #2D2D2D; /* Consistent dark gray background */
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 1.5rem 1.2rem;
  margin: 0 auto 2rem auto;
  color: #FFFFFF;
  max-width: 420px; /* Max-width for the main input card */
}
/* Form group for consistent vertical spacing */
.form-group {
    margin-bottom: 0.7rem; 
}
.form-group:last-of-type {
    margin-bottom: 0; /* No margin for the last group before the Buy button */
}
.dynamic-input-card label {
  color: #A0A0A0; /* Light gray for input labels */
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: block;
}
/* --- UPDATED STYLE FOR INPUTS (WITH ICONS & BOLD TEXT) --- */
.input-with-icon {
    position: relative;
    display: flex; /* For proper icon/input placement */
    align-items: center; /* Vertical alignment */
    flex-grow: 1; /* To make wrapper take available space */
}
.input-with-icon input[type="number"],
.input-with-icon input[type="text"],
.modal-content input[type="number"],
.modal-content input[type="text"] { /* Applies to inputs inside .dynamic-input-card and modals */
  width: 100%; 
  padding: 0.7rem 1rem;
  padding-left: 35px; /* Offset for icon */
  border: 1px solid #4C4C4C; /* Subtle border */
  border-radius: 8px;
  background: #3A3A3A; /* Input background */
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: bold;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-with-icon .input-icon {
    position: absolute;
    left: 10px;
    color: #A0A0A0;
    font-size: 1rem;
    z-index: 2;
}
.input-with-icon input[type="number"]:focus,
.input-with-icon input[type="text"]:focus,
.modal-content input[type="number"]:focus,
.modal-content input[type="text"]:focus {
  outline: none;
  border-color: #3390EC; /* Telegram blue on focus */
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.25); /* Blue glow on focus */
}

.dynamic-input-card .input-group { /* Flex group for username input and button */
    display: flex;
    align-items: center;
    gap: 8px;
}

.dynamic-input-card .input-group button {
    flex-shrink: 0; 
    padding: 0.7rem 1rem;
    background: #3A3A3A; 
    color: #FFFFFF; 
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap; 
    display: flex; 
    align-items: center;
    gap: 6px;
}
.dynamic-input-card .input-group button:hover {
    background: #4C4C4C; 
    transform: scale(1.02);
}
.dynamic-input-card .input-group button:active {
    transform: scale(0.98);
}

/* Avatar styling */
.avatar-area {
  display: flex; 
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}
.avatar-area .avatar-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #3A3A3A; /* Placeholder background */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-area .avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-area .avatar-container .fa-user {
  font-size: 2.5rem;
  color: #A0A0A0; /* Gray for default icon */
}
.avatar-area .username-display {
  font-size: 1.2rem;
  font-weight: 600;
  color: #FFFFFF; /* Default color for the whole line, including @username */
}
.avatar-area .username-display .blue-name {
    color: #3390EC; /* Specific class for blue name */
}

/* Main "Buy" Button & General Telegram-style button */
.telegram-button {
  background: #3390EC; /* Telegram blue */
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 0; /* Full width button */
  margin-top: 0.5rem;
  box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3); /* Blue shadow */
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.telegram-button:hover {
  background: #2A79CC; /* Darker blue on hover */
  transform: scale(1.02);
  box-shadow: 0 6px 14px rgba(51, 144, 236, 0.4);
}
.telegram-button:active {
  transform: scale(0.98);
}
/* Disabled state for main button */
.telegram-button:disabled {
  background: #4C4C4C; /* Grey background for disabled */
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.7;
}

/* --- INFO SECTION (index.html) --- */
.info-section {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #A0A0A0;
}
.info-section a {
  color: #3390EC; /* Telegram blue for links */
  text-decoration: none;
  transition: color 0.15s;
}
.info-section a:hover {
  color: #2A79CC;
  text-decoration: underline;
}

/* --- POLICY LINKS SECTION (index.html) --- */
.policy-links-section {
  display: flex;
  flex-wrap: wrap; /* Allows wrapping on small screens */
  justify-content: center;
  gap: 12px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.policy-links-section .policy-button {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    background: #3390EC; /* Telegram blue */
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(51, 144, 236, 0.2);
    flex-basis: 0;
    flex-grow: 1;
    min-width: 160px;
    justify-content: center;
    cursor: pointer;
}
.policy-links-section .policy-button i {
    margin-right: 0.5rem;
}
.policy-links-section .policy-button:hover {
    background: #2A79CC;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(51, 144, 236, 0.3);
}
.policy-links-section .policy-button:active {
    transform: scale(0.98);
}

/* --- MODAL WINDOWS (General) --- */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); /* Semi-transparent black overlay */
  z-index: 100; /* General modal z-index */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}
.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
  background: #2D2D2D; /* Dark gray for modal content */
  color: #FFFFFF;
  border-radius: 16px;
  padding: 28px 20px;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  position: relative;
  text-align: left;
  transform: translateY(20px); /* Slide up animation */
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}
.modal-backdrop.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}
.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #FFFFFF;
  text-align: center;
}
.modal-content .modal-description {
    font-size: 0.95rem;
    color: #A0A0A0;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.modal-content .modal-row {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-content .modal-row:last-child { 
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.modal-content .modal-row span:last-child {
  font-weight: 600;
  color: #3390EC;
}
.modal-content .modal-row span#modal-balance-after.negative {
    color: #EF4444; 
}

.modal-content .modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
}
.modal-content button {
  flex: 1 1 0;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.modal-content .confirm-btn {
  background: #3390EC;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(51, 144, 236, 0.2);
}
.modal-content .confirm-btn:hover {
  background: #2A79CC;
}
.modal-content .cancel-btn {
  background: #3A3A3A;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.modal-content .cancel-btn:hover {
  background: #4C4C4C;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #CCCCCC;
  cursor: pointer;
}
.modal-close:hover {
  color: #FFFFFF;
}

/* Modal Checkbox (index.html) */
.modal-checkbox-row {
    display: flex;
    align-items: flex-start;
    margin-top: 1rem; 
    margin-bottom: 1.5rem; 
    font-size: 0.95rem; 
    color: rgba(255, 255, 255, 0.7);
}
.modal-checkbox-row input[type="checkbox"] {
    margin-right: 10px; 
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #3390EC;
    cursor: pointer;
}
.modal-checkbox-row label a {
    color: #3390EC;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px; 
}
.modal-checkbox-row label a:hover {
    text-decoration: underline;
}

/* Notification Popups */
.fixed-notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  background: #4CAF50; /* Success green */
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 0.95rem;
  animation: slideInFromRight 0.3s ease-out forwards, fadeOut 0.3s ease-in 2.7s forwards; 
}
.fixed-notification.error {
  background: #EF4444; /* Error red */
}
.fixed-notification.info {
    background-color: #2196F3; /* Blue for info */
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}
@keyframes slideInFromRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* --- Browser Mode Info Section (index.html, mines.html) --- */
.browser-mode-info {
    background: #2D2D2D;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 1.5rem 1.2rem;
    margin: 2rem auto;
    color: #FFFFFF;
    max-width: 420px;
    text-align: center;
}
.browser-mode-info h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #FBBE24;
}
.browser-mode-info p {
    color: #A0A0A0;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.browser-mode-info .get-link-button {
    background: #3390EC;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.5rem;
    box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.browser-mode-info .get-link-button:hover {
    background: #2A79CC;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(51, 144, 236, 0.3);
}
.browser-mode-info .get-link-button:active {
    transform: scale(0.98);
}

/* --- BOTTOM NAVIGATION BAR --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #18181B; /* Same as header background */
    border-top: 1px solid #363636; /* Subtle separator line */
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px; /* Standard height for nav bar */
    z-index: 100; /* Ensure it's above other content */
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2); /* Shadow pointing upwards */
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #A0A0A0; /* Default text color (gray) */
    text-decoration: none;
    font-size: 0.75rem; /* Smaller font for labels */
    font-weight: 500;
    flex-grow: 1; /* Distribute space evenly */
    height: 100%; /* Fill nav bar height */
    transition: color 0.2s, background 0.2s;
    position: relative; /* For "Скоро" badge */
}

.bottom-nav .nav-item i {
    font-size: 1.2rem; /* Icon size */
    margin-bottom: 4px; /* Space between icon and text */
    transition: color 0.2s;
}

.bottom-nav .nav-item:hover {
    color: #FFFFFF; /* Slightly brighter on hover */
    background: #2D2D2D; /* Subtle background change on hover */
}

/* Active state for the current page */
.bottom-nav .nav-item.active {
    color: #3390EC; /* Telegram blue for active item */
}

.bottom-nav .nav-item.active i {
    color: #3390EC; /* Telegram blue for active icon */
}

/* Disabled state */
.bottom-nav .nav-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none; /* Disable clicks */
}

.bottom-nav .nav-item .coming-soon {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #FBBE24; /* Yellow badge */
    color: #18181B;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- BAN OVERLAY MODAL --- */
.ban-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 200; /* Higher z-index for ban/maintenance */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}
.ban-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.ban-modal-content {
    background: #2D2D2D;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 28px 20px;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.ban-modal-backdrop.active .ban-modal-content {
    transform: translateY(0);
    opacity: 1;
}
.ban-icon {
    font-size: 3rem;
    color: #EF4444; /* Red for ban icon */
    margin-bottom: 1rem;
}
.ban-modal-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.ban-modal-content p {
    color: #A0A0A0;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.ban-duration-text {
    font-size: 0.9rem;
    color: #FBBE24; /* Yellow for duration */
    font-weight: 600;
}

/* --- MAINTENANCE OVERLAY MODAL (Higher Z-index) --- */
#maintenance-overlay {
    z-index: 300; /* Even higher z-index than ban */
}
#maintenance-overlay .ban-icon { /* Reusing ban-icon for tools, but yellow */
    color: #FBBE24;
}

/* --- ADMIN PANEL SPECIFIC STYLES (Overrides for Tailwind & Consistency) --- */
/* Targeting the admin container with ID for higher specificity */
#admin-page-container {
    max-width: 800px !important; /* Force max width */
    margin: 2rem auto !important; /* Force centering and margin */
    padding: 1.5rem !important; /* Force padding */
    background: #18181B !important; /* Force background */
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
    text-align: center !important;
    color: #FFFFFF !important; /* Ensure text color is white */
}
#admin-page-container h2 {
    font-size: 2rem !important;
    color: #FBBE24 !important;
    font-weight: 800 !important;
    margin-bottom: 2rem !important;
}
#admin-page-container .admin-section {
    text-align: left !important;
    margin-bottom: 2rem !important;
    padding-bottom: 1.5rem !important;
    border-bottom: 1px solid #363636 !important;
}
#admin-page-container .admin-section:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
#admin-page-container .admin-section h3 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    margin-bottom: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
#admin-page-container .admin-section h3 i {
    color: #3390EC !important;
}

/* Settings Grid */
#admin-page-container .settings-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 1.5rem !important;
}
#admin-page-container .setting-card {
    background: #2D2D2D !important;
    border-radius: 12px !important;
    padding: 1.2rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    display: flex !important;
    flex-direction: column !important;
}
#admin-page-container .setting-card h4 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    margin-bottom: 1.2rem !important;
}
#admin-page-container .setting-card label {
    display: block !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #A0A0A0 !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0.8rem !important;
}
#admin-page-container .setting-card label:first-of-type {
    margin-top: 0 !important;
}

/* Input Fields (Admin specific) */
#admin-page-container .setting-card input[type="text"],
#admin-page-container .setting-card input[type="number"],
#admin-page-container .setting-card select,
#admin-page-container .setting-card textarea {
    width: 100% !important;
    padding: 0.7rem 1rem !important;
    border: 1px solid #4C4C4C !important;
    border-radius: 8px !important;
    background: #3A3A3A !important;
    color: #FFFFFF !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.8rem !important;
    box-sizing: border-box !important;
}
#admin-page-container .setting-card input[type="number"]:focus,
#admin-page-container .setting-card input[type="text"]:focus,
#admin-page-container .setting-card select:focus,
#admin-page-container .setting-card textarea:focus {
    outline: none !important;
    border-color: #3390EC !important;
    box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.25) !important;
}
#admin-page-container .setting-card .input-with-icon {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}
#admin-page-container .setting-card .input-with-icon input {
    padding-left: 35px !important;
}
#admin-page-container .input-icon {
    position: absolute !important;
    left: 10px !important;
    color: #A0A0A0 !important;
    font-size: 1rem !important;
    z-index: 2 !important;
}

/* Input Groups (for adding chances/multipliers) */
#admin-page-container .setting-card .input-group {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 0.8rem !important;
}
#admin-page-container .setting-card .input-group input {
    margin-bottom: 0 !important;
}

/* Buttons Add/Remove (for chances/multipliers) */
#admin-page-container .setting-card .add-chance-btn,
#admin-page-container .setting-card .remove-btn {
    background: #3A3A3A !important;
    color: #FFFFFF !important;
    padding: 0.7rem 1.2rem !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    flex-shrink: 0 !important;
    font-weight: 600 !important;
}
#admin-page-container .setting-card .add-chance-btn {
    background: #4CAF50 !important;
}
#admin-page-container .setting-card .add-chance-btn:hover {
    background: #409243 !important;
}
#admin-page-container .setting-card .remove-btn {
    background: #EF4444 !important;
}
#admin-page-container .setting-card .remove-btn:hover {
    background: #d32f2f !important;
}

/* Chance/Multiplier Entry */
#admin-page-container .chance-entry {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    background: #3A3A3A !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
}
#admin-page-container .chance-entry span {
    color: #A0A0A0 !important;
    font-weight: 600 !important;
}
#admin-page-container .chance-entry input[type="text"],
#admin-page-container .chance-entry input[type="number"],
#admin-page-container .chance-entry select {
    margin-bottom: 0 !important;
    flex-grow: 1 !important;
}
#admin-page-container .chance-entry .remove-btn {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.9rem !important;
}

/* Maintenance Toggle */
#admin-page-container .maintenance-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #2D2D2D !important;
    padding: 1rem 1.5rem !important;
    border-radius: 12px !important;
    margin-bottom: 1.5rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}
#admin-page-container .maintenance-toggle label {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
#admin-page-container .maintenance-toggle .switch {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 24px !important;
}
#admin-page-container .maintenance-toggle .switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}
#admin-page-container .maintenance-toggle .slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #3A3A3A !important;
    border-radius: 12px !important;
    transition: .4s !important;
}
#admin-page-container .maintenance-toggle .slider:before {
    position: absolute !important;
    content: "" !important;
    height: 16px !important;
    width: 16px !important;
    left: 4px !important;
    bottom: 4px !important;
    background-color: white !important;
    border-radius: 50% !important;
    transition: .4s !important;
}
#admin-page-container .maintenance-toggle input:checked + .slider {
    background-color: #3390EC !important;
}
#admin-page-container .maintenance-toggle input:focus + .slider {
    box-shadow: 0 0 1px #3390EC !important;
}
#admin-page-container .maintenance-toggle input:checked + .slider:before {
    transform: translateX(26px) !important;
}

/* Apply Settings Button */
#admin-page-container .apply-settings-btn {
    background: #3390EC !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.85rem 2rem !important;
    margin-top: 1.5rem !important;
    box-shadow: 0 4px 10px rgba(51, 144, 236, 0.3) !important;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s !important;
    width: auto !important;
    display: inline-block !important;
    cursor: pointer !important;
}
#admin-page-container .apply-settings-btn:hover:not(:disabled) {
    background: #2A79CC !important;
    transform: scale(1.02) !important;
}
#admin-page-container .apply-settings-btn:disabled {
    background: #4C4C4C !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.7 !important;
}

/* User Search */
#admin-page-container .user-search-section {
    margin-top: 1.5rem !important;
    background: #2D2D2D !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}
#admin-page-container .user-search-section h3 {
    margin-bottom: 1rem !important;
}
#admin-page-container .user-search-container {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
}
#admin-page-container .user-search-container input[type="text"] {
    flex-grow: 1 !important;
}
#admin-page-container .user-search-container .find-user-btn {
    background: #3390EC !important;
    color: #FFFFFF !important;
    padding: 0.7rem 1.2rem !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    flex-shrink: 0 !important;
    font-weight: 600 !important;
}
#admin-page-container .user-search-container .find-user-btn:hover {
    background: #2A79CC !important;
}

/* User Info Display */
#admin-page-container .user-info-display {
    background: #3A3A3A !important;
    border-radius: 8px !important;
    padding: 1rem 1.2rem !important;
    margin-top: 1rem !important;
    text-align: left !important;
    color: #A0A0A0 !important;
}
#admin-page-container .user-info-display p {
    margin-bottom: 0.6rem !important;
}
#admin-page-container .user-info-display p:last-child {
    margin-bottom: 0 !important;
}
#admin-page-container .user-info-display span {
    font-weight: 600 !important;
    color: #FFFFFF !important;
}
#admin-page-container .user-info-display .user-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 10px !important;
    margin-top: 1.5rem !important;
}
#admin-page-container .user-info-display .user-actions button {
    padding: 0.7rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s, transform 0.12s !important;
}
#admin-page-container .user-info-display .user-actions .ban-btn,
#admin-page-container .user-info-display .user-actions .unban-btn {
    background: #EF4444 !important;
    color: #FFFFFF !important;
}
#admin-page-container .user-info-display .user-actions .ban-btn:hover,
#admin-page-container .user-info-display .user-actions .unban-btn:hover {
    background: #d32f2f !important;
}
#admin-page-container .user-info-display .user-actions .make-admin-btn,
#admin-page-container .user-info-display .user-actions .remove-admin-btn {
    background: #3390EC !important;
    color: #FFFFFF !important;
}
#admin-page-container .user-info-display .user-actions .make-admin-btn:hover,
#admin-page-container .user-info-display .user-actions .remove-admin-btn:hover {
    background: #2A79CC !important;
}
#admin-page-container .user-info-display .user-actions .telegram-button {
    background: #4C4C4C !important;
    color: #FFFFFF !important;
}
#admin-page-container .user-info-display .user-actions .telegram-button:hover {
    background: #5A5A5A !important;
}

/* Chance Settings Table */
#admin-page-container .chance-settings-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 1.5rem !important;
}
#admin-page-container .chance-settings-table th, #admin-page-container .chance-settings-table td {
    padding: 0.8rem 1rem !important;
    text-align: left !important;
    border-bottom: 1px solid #363636 !important;
}
#admin-page-container .chance-settings-table th {
    background: #2D2D2D !important;
    font-weight: 600 !important;
    color: #A0A0A0 !important;
}
#admin-page-container .chance-settings-table tr:last-child td {
    border-bottom: none !important;
}
#admin-page-container .chance-settings-table .chance-entry-row input {
    margin-bottom: 0 !important;
}
#admin-page-container .chance-settings-table .action-buttons {
    display: flex !important;
    gap: 5px !important;
}

/* Additional styles for roulette_case_prizes_list and mines-multipliers-list */
#admin-page-container #roulette-case-prizes-list,
#admin-page-container #mines-multipliers-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 10px !important;
}
#admin-page-container #roulette-prize-amount, #admin-page-container #roulette-prize-probability, #admin-page-container #mines-multiplier-cells, #admin-page-container #mines-multiplier-value {
    flex-grow: 1 !important;
}
#admin-page-container .chance-entry-controls {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    margin-top: 10px !important;
    flex-wrap: wrap !important;
}
#admin-page-container .chance-entry-controls input,
#admin-page-container .chance-entry-controls select {
    margin-bottom: 0 !important;
}
#admin-page-container .chance-entry-controls button {
    margin-top: 0 !important;
}