* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #ffffff;
  color: #0a0a0a;
  min-height: 100vh;
  overflow-x: hidden;
  /* Flexbox-настройки, чтобы прижимать футер к низу */
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  width: 100%;
  flex: 1; /* Растягивает экран на всё свободное пространство до футера */
}

.screen.active {
  display: flex;
}

/* Landing */
#landing-screen {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.hero-logo {
  max-width: 420px;
  width: 85%;
  height: auto;
  margin-bottom: 35px;
}

.btn-explore {
  background: #ffffff;
  color: #0a0a0a;
  border: 1px solid #0a0a0a;
  padding: 12px 42px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.btn-explore:hover {
  background: #0a0a0a;
  color: #ffffff;
}

/* Dashboard Header & Nav */
#dashboard-screen {
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.header-logo img {
  height: 36px;
  width: auto;
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #888888;
  cursor: pointer;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
  text-transform: uppercase;
}

.nav-btn:hover,
.nav-btn.active {
  color: #0a0a0a;
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -25px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #0a0a0a;
}

main {
  flex: 1;
  padding: 48px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel {
  border: 1px solid #f0f0f0;
  padding: 32px;
  background: #ffffff;
  min-height: 200px;
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
}

.panel-box {
  border: 1px solid #f0f0f0;
  background: #ffffff;
  padding: 20px;
}

/* Forms */
.admin-form {
  margin-bottom: 32px;
  padding: 24px;
  background: #fafafa;
  border: 1px solid #eaeaea;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdcdc;
  font-family: inherit;
  font-size: 14px;
}

.admin-form textarea {
  resize: vertical;
  min-height: 100px;
}

.admin-form input[type="file"] {
  font-size: 14px;
  color: #666666;
}

.admin-form button {
  align-self: flex-start;
  background: #0a0a0a;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

.admin-form button:hover {
  background: #333333;
}

/* Metrics Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: #dcdcdc;
}

.stat-card h3 {
  font-size: 11px;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 500;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #0a0a0a;
}

.pnl-positive {
  color: #00875a !important;
}

.pnl-negative {
  color: #de350b !important;
}

.outline-btn {
  background: #0a0a0a;
  color: #ffffff;
  border: 1px solid #0a0a0a;
  padding: 12px 24px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.outline-btn:hover {
  background: #333333;
}

/* Chart Container */
.chart-container-box {
  border: 1px solid #f0f0f0;
  background: #ffffff;
  padding: 28px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-header h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0a0a0a;
}

.timeframe-selector {
  display: flex;
  gap: 8px;
}

.tf-btn {
  background: transparent;
  border: 1px solid #dcdcdc;
  color: #666666;
  padding: 6px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tf-btn:hover,
.tf-btn.active {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}

.chart-wrapper {
  position: relative;
  height: 320px;
  width: 100%;
}

/* Capital Table Editor */
.table-input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  font-size: 12px;
  width: 100%;
}

.btn-save-sm {
  background: #00875a;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  margin-right: 4px;
}

.btn-del-sm {
  background: #de350b;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
}

/* Trades Table */
.table-wrapper {
  overflow-x: auto;
}

.trades-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.trades-table th {
  background: #fafafa;
  padding: 12px 16px;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f0f0f0;
}

.trades-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.badge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
}

.badge.side-buy {
  background: #e6f4ea;
  color: #137333;
}

.badge.side-sell {
  background: #fce8e6;
  color: #c5221f;
}

/* Articles */
article {
  margin-bottom: 16px;
  border: 1px solid #f0f0f0;
  background: #ffffff;
}

.article-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #fafafa;
  transition: background 0.2s;
}

.article-header:hover {
  background: #f0f0f0;
}

.article-header h3 {
  font-size: 15px;
  color: #0a0a0a;
  margin-bottom: 4px;
}

.article-header small {
  color: #999999;
  font-size: 12px;
}

.article-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-delete {
  background: none;
  border: 1px solid #e0e0e0;
  color: #666666;
  padding: 4px 10px;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
}

.btn-delete:hover {
  background: #ffeeee;
  color: #cc0000;
  border-color: #ffcccc;
}

.article-body {
  display: none;
  padding: 20px;
  border-top: 1px solid #f0f0f0;
}

.article-body.open {
  display: block;
}

.article-body p {
  color: #444444;
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.file-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #0a0a0a;
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
}

.file-link:hover {
  background: #e0e0e0;
}

/* Admin Mode */
.admin-only {
  display: none !important;
}

body.admin-mode .admin-only {
  display: block !important;
}

body.admin-mode form.admin-only {
  display: flex !important;
}

#admin-btn {
  font-size: 16px;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }
  nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  main {
    padding: 20px;
  }
}
.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-subtitle {
  font-size: 13px;
  color: #888888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 12px;
  margin-bottom: 24px;
}

.landing-stats-bar {
  display: flex;
  gap: 24px;
  margin-top: 48px;
  padding: 12px 24px;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-stat-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stat-label {
  color: #888888;
}

.stat-val {
  font-weight: 600;
  color: #0a0a0a;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  margin-right: 4px;
}

.status-dot.online {
  background: #10b981;
}

.status-dot.offline {
  background: #ef4444;
}

/* ===============================
   Footer Styles (Dark Mode)
================================== */
.site-footer {
  background-color: #000000;
  color: #888888;
  padding: 40px 48px;
  width: 100%;
  border-top: 1px solid #1a1a1a;
  margin-top: auto; 
}

.footer-top {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.footer-logo {
  height: 36px;
  width: auto;
  margin-right: 20px;
  /* Если ваш логотип темный, раскомментируйте строчку ниже, 
     чтобы он стал белым на черном фоне: */
  filter: brightness(0) invert(1);
}

.copyright {
  font-size: 15px;
  color: #a0a0a0;
  letter-spacing: 0.5px;
}

.footer-bottom {
  display: flex;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-link {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

/* Стили для выпадающих списков (Contact Us, Media) */
.footer-dropdown {
  position: relative;
  display: inline-block;
}

.footer-link-btn {
  background: none;
  border: none;
  color: #a0a0a0;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.footer-link-btn:hover {
  color: #ffffff;
}

/* Выпадающее меню */
.footer-dropdown-content {
  display: none;
  position: absolute;
  bottom: 120%; /* Появляется над кнопкой */
  left: 0;
  background-color: #1a1a1a;
  min-width: 140px;
  box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  z-index: 1000;
  border: 1px solid #333;
}

/* Открываем меню через добавление класса (скриптом), а не по hover */
.footer-dropdown.show .footer-dropdown-content {
  display: block;
}

.footer-dropdown-content a {
  color: #cccccc;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s;
}

.footer-dropdown-content a:hover {
  background-color: #333333;
  color: #ffffff;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 20px;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ===============================
   Pagination Styles
================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 10px 0;
}

.pagination button {
  background: #0a0a0a;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  background: #333333;
}

.pagination button:disabled {
  background: #cccccc;
  cursor: not-allowed;
  color: #888888;
}

.pagination span {
  font-size: 13px;
  color: #666666;
  font-weight: 500;
}