/* Общие стили */
.gradient-bg {
  background: linear-gradient(135deg, #111827 0%, #1e293b 50%, #13873a 100%);
}

.profile-card {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  background-color: #1f2937;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.4);
}

.rank-acquired {
  background-color: #10b981;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.flash {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  color: white;
  z-index: 1000;
  animation: slideIn 0.5s forwards;
}

@keyframes animate-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.flash-success { background-color: #10b981; }
.flash-error { background-color: #ef4444; }
.flash-info { background-color: #3b82f6; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Финансовые графики */
.financial-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chart-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.legend-color {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
}
.legend-label {
  font-size: 0.875rem;
  color: #f9fafb;
}

.bar-chart-container {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
}
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bar-label {
  width: 80px;
  text-align: right;
  font-size: 0.875rem;
  color: #f9fafb;
}
.bar-container {
  flex: 1;
  background-color: #374151;
  border-radius: 0.25rem;
  height: 1.5rem;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: 0.25rem;
  position: relative;
}
.bar-value {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.total-amount-display {
  text-align: center;
  margin-bottom: 1rem;
}
.total-amount-value {
  font-size: 2rem;
  font-weight: bold;
  color: #f9fafb;
}
.total-amount-label {
  font-size: 1rem;
  color: #9ca3af;
}

/* Фиксированный хедер */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}
.content-container {
  padding-top: 120px;
}

/* Модальное окно входа */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-modal-content {
  background-color: #1f2937;
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 22rem;
  width: 100%;
  position: relative;
}
.close-modal-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s ease;
}
.close-modal-btn:hover {
  color: #ffffff;
}
.login-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #374151;
  border: 1px solid #4b5563;
  border-radius: 0.375rem;
  color: #f9fafb;
}
.login-form-input:focus {
  outline: none;
  ring-2: ring-green-500;
}
.login-button {
  width: 100%;
  background-color: #13873a;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}
.login-button:hover {
  background-color: #0d6a2d;
}

/* Таймер автовыхода */
.logout-timer {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: rgba(255, 99, 132, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  z-index: 1010;
  font-size: 0.875rem;
  font-weight: bold;
  display: none;
}

/* Стили для Markdown */
.prose {
  color: #f9fafb;
  line-height: 1.75;
}
.prose h1 {
  font-size: 1.875rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #13873a;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #10b981;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  color: #34d399;
}
.prose p {
  margin-bottom: 1rem;
}
.prose ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose li {
  margin-bottom: 0.25rem;
}
.prose strong {
  font-weight: bold;
  color: #fff;
}
.prose em {
  font-style: italic;
}
.prose a {
  color: #60a5fa;
  text-decoration: underline;
}
.prose a:hover {
  color: #93c5fd;
}
.prose code {
  background-color: #374151;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875em;
}
.prose pre {
  background-color: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.prose blockquote {
  border-left: 4px solid #4b5563;
  padding-left: 1rem;
  margin-left: 0;
  font-style: italic;
  color: #9ca3af;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  border: 1px solid #4b5563;
}
.prose thead {
  background-color: #1f2937;
}
.prose th {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid #4b5563;
  font-weight: bold;
  color: #10b981;
}
.prose td {
  padding: 0.75rem;
  border-bottom: 1px solid #4b5563;
}
.prose tr:nth-child(even) {
  background-color: #2d3748;
}
.prose tr:hover {
  background-color: #374151;
}

/* Спойлеры (details/summary) */
.prose details {
  background-color: #2d3748;
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}
.prose summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  color: #60a5fa;
  background-color: #1f2937;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.prose summary:hover {
  background-color: #374151;
  color: #93c5fd;
}
.prose summary::after {
  content: '▼';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: #9ca3af;
}
.prose details[open] summary {
  border-bottom-color: #4b5563;
  background-color: #374151;
}
.prose details[open] summary::after {
  transform: rotate(180deg);
}
.prose details > :not(summary) {
  padding: 1rem;
}
.prose-invert {
  color: #f9fafb;
}
.prose-invert a {
  color: #60a5fa;
}
.prose-invert strong {
  color: #fff;
}