body {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9fb;
  color: #222;
  min-height: 100vh;
}
header {
  background: #fff;
  color: #1a237e;
  padding: 16px 0 10px 0;
  text-align: center;
  box-shadow: 0 2px 12px rgba(26,35,126,0.06);
}
nav {
  margin-top: 10px;
}
nav a {
  color: #1a237e;
  margin: 0 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.06em;
  transition: color 0.2s, background 0.2s;
  padding: 6px 10px;
  border-radius: 6px;
}
nav a:hover {
  text-decoration: none;
  color: #bfa14a;
  background: #fffbe6;
}
main {
  max-width: 960px;
  margin: 20px auto 120px auto;
  background: #fff;
  padding: 28px 18px 24px 18px;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
footer {
  background: #fffbe6;
  color: #1a237e;
  text-align: center;
  padding: 16px 0 12px 0;
  position: sticky;
  bottom: 0;
  width: 100%;
  font-size: 0.98em;
  letter-spacing: 0.01em;
  z-index: 10;
  border-top: 1.5px solid #bfa14a;
}
.article-card {
  display: flex;
  align-items: flex-start;
  background: #fff;
  margin-bottom: 28px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(26,35,126,0.07);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover {
  box-shadow: 0 6px 24px rgba(26,35,126,0.13);
  transform: translateY(-2px) scale(1.01);
}
.article-thumb {
  width: 130px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px 0 0 10px;
  margin-right: 20px;
  background: #e3e6f3;
}
.article-info {
  flex: 1;
  padding: 14px 0;
}
.article-meta {
  font-size: 0.97em;
  color: #666;
  margin-bottom: 6px;
}
.article-category {
  background: #e3e6f3;
  color: #1a237e;
  border-radius: 4px;
  padding: 2px 10px;
  margin-right: 10px;
  font-weight: 500;
  font-size: 0.98em;
}
.article-date {
  color: #888;
  font-size: 0.97em;
}
.article-title {
  font-size: 1.22em;
  font-weight: bold;
  color: #1a237e;
  text-decoration: none;
  transition: color 0.2s;
}
.article-title:hover {
  text-decoration: underline;
  color: #3949ab;
}
.article-full-img {
  width: 100%;
  max-width: 650px;
  display: block;
  margin: 0 auto 22px auto;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(26,35,126,0.07);
}
.article-body {
  margin-top: 20px;
  font-size: 1.13em;
  line-height: 1.7;
  word-break: break-word;
}
.article-body h1, .article-body h2, .article-body h3 {
  color: #1a237e;
  margin-top: 1.2em;
}
.article-body ul, .article-body ol {
  margin-left: 1.5em;
}
.article-body pre, .article-body code {
  background: #f3f3f3;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.98em;
}
.admin-actions {
  margin-top: 12px;
}
.edit-btn, .delete-btn, .delete-comment-btn {
  background: #e3e6f3;
  color: #1a237e;
  border: none;
  border-radius: 4px;
  padding: 7px 16px;
  margin-right: 10px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
}
.edit-btn:hover {
  background: #c5cae9;
}
.delete-btn, .delete-comment-btn {
  background: #ffeaea;
  color: #b71c1c;
}
.delete-btn:hover, .delete-comment-btn:hover {
  background: #ffcdd2;
}
.edit-form, #add-article-form {
  max-width: 650px;
  margin: 40px auto;
  background: #fff;
  padding: 34px 24px 28px 24px;
  border-radius: 16px;
  box-shadow: 0 2px 16px #ffe08222;
  border: 1.5px solid #fffbe6;
}

.md-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0 6px 0;
}
.md-btn {
  background: #e3e6f3;
  color: #1a237e;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.95em;
  cursor: pointer;
}
.md-btn:hover {
  background: #c5cae9;
}
.md-preview {
  border: 1px dashed #bfa14a;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  margin-top: 8px;
}
input[type="text"], input[type="url"], input[type="email"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #bfa14a;
  border-radius: 8px;
  font-size: 1.08em;
  margin-top: 6px;
  margin-bottom: 12px;
  transition: border 0.2s;
  background: #fffbe6;
}
input[type="text"]:focus, input[type="url"]:focus, input[type="email"]:focus, textarea:focus {
  border: 1.5px solid #bfa14a;
  outline: none;
}
input[type="file"] {
  margin-top: 6px;
  margin-bottom: 12px;
}
button, .edit-btn, .delete-btn, .delete-comment-btn {
  background: #bfa14a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1.08em;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #ffe08233;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
button:hover, .edit-btn:hover, .delete-btn:hover, .delete-comment-btn:hover {
  background: #1a237e;
  color: #fffbe6;
  box-shadow: 0 4px 16px #bfa14a33;
}
.article-view {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px #ffe08222;
  padding: 36px 28px 28px 28px;
  margin-bottom: 32px;
  border: 1.5px solid #fffbe6;
}
.article-view h1 {
  font-size: 2em;
  color: #1a237e;
  margin-bottom: 12px;
}
.article-meta {
  font-size: 1.08em;
  color: #bfa14a;
  margin-bottom: 18px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.article-category {
  background: #fffbe6;
  color: #bfa14a;
  border-radius: 6px;
  padding: 2px 12px;
  font-weight: 500;
  font-size: 1em;
}
.article-date {
  color: #888;
  font-size: 1em;
}
.article-body {
  margin-top: 18px;
  font-size: 1.15em;
  line-height: 1.7;
  word-break: break-word;
}
#comments-section {
  background: #fffbe6;
  border-radius: 14px;
  box-shadow: 0 2px 8px #ffe08233;
  padding: 28px 18px 18px 18px;
  margin-bottom: 32px;
  border: 1.5px solid #fffbe6;
}
#comments-section h3 {
  color: #bfa14a;
  margin-bottom: 18px;
}
#comments-list li {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px #ffe08222;
  font-size: 1.08em;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
#comments-list li b {
  color: #1a237e;
}
#comments-list li .delete-comment-btn {
  margin-left: 18px;
  padding: 7px 18px;
  font-size: 1em;
}
#image-preview img {
  max-width: 220px;
  max-height: 140px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(26,35,126,0.08);
}
#result {
  margin-top: 12px;
  font-size: 1.08em;
  color: #1a237e;
  min-height: 24px;
}
#main-articles-list, #articles-list, #comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#comments-list li {
  background: #f7f7fb;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(26,35,126,0.04);
  font-size: 1.04em;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
#comments-list li b {
  color: #1a237e;
}
#comments-list li .delete-comment-btn {
  margin-left: 18px;
  padding: 5px 12px;
  font-size: 0.98em;
}
.main-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  background: #fff;
  padding: 18px 0 10px 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 8px rgba(26,35,126,0.08);
}
.main-nav a {
  color: #1a237e;
  font-size: 1.13em;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.01em;
}
.main-nav a:hover, .main-nav a.active {
  background: #fffbe6;
  color: #bfa14a;
  box-shadow: 0 2px 8px #ffe08244;
}
/* Мобильная навигация */
.nav-wrap { display: flex; align-items: center; justify-content: space-between; max-width: 960px; margin: 0 auto; padding: 0 12px; }
.burger { display: none; background: transparent; border: none; font-size: 1.6em; padding: 8px; cursor: pointer; color: #1a237e; }
.mobile-nav { display: none; flex-direction: column; gap: 8px; padding: 10px 12px; }
.mobile-nav a { padding: 10px 12px; background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(26,35,126,0.06); }
.hero-block {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 38px 0 38px 0;
  flex-wrap: wrap;
}
.hero-photo { margin-top: 12px; }
.hero-photo img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 6px 32px rgba(191,161,74,0.13);
  background: #fffbe6;
  border: 3px solid #fffbe6;
}
.hero-info {
  flex: 1;
  min-width: 220px;
}
.hero-quote {
  font-size: 1.32em;
  color: #bfa14a;
  font-style: italic;
  margin: 0 0 18px 0;
  padding: 0 0 0 12px;
  border-left: 4px solid #bfa14a;
  background: #fffbe6;
  border-radius: 10px;
}
.quote-author {
  font-size: 0.98em;
  color: #888;
  margin-left: 8px;
}
.hero-desc {
  font-size: 1.13em;
  color: #1a237e;
  margin-top: 10px;
  background: #fffbe6;
  padding: 16px 22px;
  border-radius: 10px;
  box-shadow: 0 2px 8px #ffe08233;
}
.main-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 36px 0 36px 0;
}
.section-card {
  display: block;
  background: #fff;
  color: #1a237e;
  font-size: 1.18em;
  font-weight: 500;
  padding: 28px 38px;
  border-radius: 16px;
  box-shadow: 0 2px 16px #ffe08222;
  text-decoration: none;
  transition: box-shadow 0.2s, background 0.2s, color 0.2s, transform 0.2s;
  min-width: 220px;
  text-align: center;
  letter-spacing: 0.01em;
  border: 1.5px solid #fffbe6;
}
.section-card:hover {
  background: #fffbe6;
  color: #bfa14a;
  box-shadow: 0 6px 32px #ffe08244;
  transform: translateY(-2px) scale(1.03);
  border-color: #bfa14a;
}
.empty-reviews {
  color: #888;
  font-size: 1.08em;
  margin-bottom: 24px;
  text-align: center;
}
@media (max-width: 700px) {
  main, .edit-form, #add-article-form {
    max-width: 98vw;
    padding: 10px 2vw 20px 2vw;
  }
  header { padding: 10px 0 8px 0; }
  .main-nav { display: none; }
  .burger { display: inline-flex; }
  .mobile-nav { display: flex; }
  .article-card {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
  }
  .article-thumb {
    width: 100%;
    height: 180px;
    border-radius: 10px 10px 0 0;
    margin-right: 0;
    margin-bottom: 10px;
  }
  .article-info {
    padding: 10px 0;
  }
  .article-full-img {
    max-width: 98vw;
    height: auto;
  }
  .hero-block {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .hero-photo { margin-top: 8px; }
  .hero-photo img {
    width: 100%;
    height: auto;
    max-width: 320px;
    margin: 0 auto;
    display: block;
  }
  .main-sections {
    flex-direction: column;
    gap: 16px;
    margin: 24px 0 24px 0;
  }
  .section-card {
    padding: 18px 8px;
    font-size: 1.08em;
    min-width: 0;
  }
  .article-view {
    padding: 16px 4vw 16px 4vw;
  }
  #comments-section {
    padding: 14px 2vw 14px 2vw;
  }
} 
/* Улучшаю карточки статей на главной */
#main-articles-list .article-card {
  border: 1.5px solid #fffbe6;
  box-shadow: 0 2px 16px #ffe08222;
  border-radius: 16px;
  margin-bottom: 28px;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}
#main-articles-list .article-card:hover {
  box-shadow: 0 6px 32px #ffe08244;
  transform: translateY(-2px) scale(1.03);
}
#main-articles-list .article-thumb {
  width: 120px;
  height: 90px;
  border-radius: 12px 0 0 12px;
  margin-right: 18px;
  object-fit: cover;
  background: #fffbe6;
}
#main-articles-list .article-info {
  padding: 10px 0;
}
#main-articles-list .article-title {
  font-size: 1.15em;
  color: #1a237e;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s;
}
#main-articles-list .article-title:hover {
  color: #bfa14a;
  text-decoration: underline;
} 
.article-preview {
  color: #444;
  font-size: 1.04em;
  margin: 10px 0 10px 0;
  line-height: 1.5;
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
}
.read-btn {
  display: inline-block;
  background: #bfa14a;
  color: #fff;
  border-radius: 8px;
  padding: 8px 22px;
  font-size: 1.05em;
  font-weight: 500;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #ffe08233;
}
.read-btn:hover {
  background: #1a237e;
  color: #fffbe6;
  box-shadow: 0 4px 16px #bfa14a33;
}
.article-view h1 {
  font-size: 2.2em;
  color: #1a237e;
  margin-bottom: 12px;
  font-weight: 700;
}
.article-view .article-meta {
  font-size: 1.13em;
  color: #bfa14a;
  margin-bottom: 18px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.article-view .article-category {
  background: #fffbe6;
  color: #bfa14a;
  border-radius: 6px;
  padding: 2px 12px;
  font-weight: 500;
  font-size: 1em;
}
.article-view .article-date {
  color: #888;
  font-size: 1em;
}
.article-view .article-full-img {
  width: 100%;
  max-width: 650px;
  display: block;
  margin: 0 auto 22px auto;
  border-radius: 14px;
  box-shadow: 0 2px 12px #ffe08222;
}
.article-view .article-body {
  margin-top: 18px;
  font-size: 1.18em;
  line-height: 1.7;
  word-break: break-word;
} 
.big-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fffbe6;
  color: #bfa14a;
  border: 2px solid #bfa14a;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 1.18em;
  font-weight: 600;
  text-decoration: none;
  margin: 0 10px 10px 0;
  box-shadow: 0 2px 8px #ffe08233;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
  cursor: pointer;
}
.big-btn span {
  font-size: 1.25em;
}
.big-btn:hover, .big-btn:focus {
  background: #bfa14a;
  color: #fffbe6;
  border-color: #bfa14a;
  box-shadow: 0 4px 16px #bfa14a33;
}
.add-btn {
  background: #bfa14a;
  color: #fff;
  border-color: #bfa14a;
}
.add-btn:hover, .add-btn:focus {
  background: #fffbe6;
  color: #bfa14a;
  border-color: #bfa14a;
}
.all-articles-btn {
  background: #fff;
  color: #bfa14a;
  border-color: #bfa14a;
}
.all-articles-btn:hover, .all-articles-btn:focus {
  background: #bfa14a;
  color: #fffbe6;
  border-color: #bfa14a;
} 
.admin-btn {
  background: #fffbe6;
  color: #1a237e;
  border-color: #bfa14a;
}
.admin-btn:hover, .admin-btn:focus {
  background: #bfa14a;
  color: #fffbe6;
}
.logout-btn {
  background: #ffeaea;
  color: #b71c1c;
  border-color: #bfa14a;
}
.logout-btn:hover, .logout-btn:focus {
  background: #bfa14a;
  color: #fffbe6;
} 