/* ------------------- GLOBAL RESET ------------------- */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #121212;
  color: #e0e0e0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* Убираем опасный глобальный сброс * { } */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ------------------- CONTAINER ------------------- */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 15px;
}

/* ------------------- HEADERS ------------------- */
h1, h2, h3, h4, h5 {
  font-weight: 600;
  margin-bottom: 15px;
  color: #f5f5f5;
  text-align: center;
}

/* ------------------- BUTTONS ------------------- */
button, .btn-switch, .btn-view, .btn-delete {
  cursor: pointer;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  transition: background 0.2s;
}

.btn-switch { background-color: #2563eb; color: #fff; }
.btn-switch:hover { background-color: #1e40af; }

.btn-view { background-color: #3b82f6; color: white; }
.btn-view:hover { background-color: #2563eb; }

.btn-delete { background-color: #ef4444; color: white; }
.btn-delete:hover { background-color: #dc2626; }

/* ------------------- TABLES ------------------- */
.table-journal-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
}

.notes-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1f1f28;
  color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.notes-table th, .notes-table td {
  padding: 12px 16px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #2e2e3b;
  font-size: 14px;
  white-space: normal;
}

.notes-table th {
  background: #2b2b3a;
  color: #ffc107;
  font-weight: 600;
}

.note-image {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease;
  display: block;
  margin: 0 auto;
}

.note-image:hover { transform: scale(1.05); }

/* ------------------- CARDS ------------------- */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  background-color: #1e1e1e;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.card-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
}

.card-text {
  font-size: 0.95rem;
  margin-bottom: 12px;
  text-align: center;
}

/* ------------------- NAVBAR ------------------- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px; /* уменьшено с 30px */
  z-index: 1000;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar .nav-links a, .navbar .nav-link {
  color: #ccc;
  font-weight: 500;
  margin-left: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.navbar .nav-links a:hover, .navbar .nav-link:hover {
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.navbar .nav-link.active {
  color: #fff;
  font-weight: 600;
}

/* ------------------- ARTICLE ------------------- */
.article-content {
  padding-left: 16px;
  padding-right: 16px;
  line-height: 1.7;
}

.article-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto;
}

/* ------------------- FORMS ------------------- */
.form-container {
  max-width: 400px;
  margin: 60px auto 120px auto;
  background: #1e1e1e;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  text-align: center;
}

.form-container input[type="email"],
.form-container input[type="password"] {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #2a2a2a;
  color: #fff;
  font-size: 16px;
}

/* ------------------- CHART PAGE ------------------- */
#chart-container {
  width: 100%;
  min-height: 400px;
}

.header {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  flex-wrap: wrap;
  gap: 10px;
}

/* ------------------- MOBILE ------------------- */
@media (max-width: 768px) {

  .navbar {
      padding: 10px 12px;
  }

  .cards-container {
      grid-template-columns: 1fr;
      gap: 12px;
  }

  .notes-table th, .notes-table td {
      font-size: 13px;
      padding: 8px 10px;
  }

  .article-content {
      padding-left: 16px !important;
      padding-right: 16px !important;
  }

  #chart-container {
      height: 50vh;
  }
}


