/* public/css/style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* 导航栏 */
nav {
  background-color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #1a5fb4;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: #1a5fb4;
  color: white;
}

/* 页面标题 */
h1 {
  color: #1a5fb4;
  margin: 20px 0;
  font-size: 1.8em;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

/* 卡片容器 */
.card {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 25px;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* 卡片内的链接 */
.card a {
  color: #1a5fb4;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* 未登录提示 */
.hint {
  background-color: #fff8e1;
  border: 1px solid #ffe0a3;
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 20px;
  color: #8a6d00;
  font-size: 0.95em;
}

/* 日志详情页的附件 */
#noteFiles {
  margin-top: 20px;
}

.file-link {
  display: inline-block;
  margin: 5px 10px 5px 0;
  padding: 6px 12px;
  border: 1px solid #cfe0f7;
  border-radius: 6px;
  background-color: #f5f9ff;
  font-size: 0.95em;
}

#noteActions {
  margin-top: 20px;
}

/* 表单元素 */
input[type="text"],
textarea,
select {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #1a5fb4;
  box-shadow: 0 0 0 2px rgba(26, 95, 180, 0.2);
}

/* 按钮样式 */
.btn {
  background-color: #1a5fb4;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn:hover {
  background-color: #144a8c;
}

.btn-danger {
  background-color: #d32f2f;
}

.btn-danger:hover {
  background-color: #b71c1c;
}

.btn-small {
  padding: 6px 12px;
  font-size: 14px;
}

/* 日志项 */
.blog-item {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.blog-item h3 {
  margin: 0 0 10px 0;
  color: #1a5fb4;
  font-size: 1.3em;
}

.blog-item small {
  color: #666;
  font-size: 0.9em;
}

.blog-item pre {
  white-space: pre-wrap;
  background: #f9fafa;
  padding: 15px;
  border-radius: 5px;
  border: 1px dashed #ddd;
  margin: 10px 0 0 0;
  font-size: 0.95em;
  color: #444;
}

.blog-item pre {
  max-height: 300px;
  overflow-y: auto;
}

/* 文件项 */
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 6px;
  background-color: white;
  margin-bottom: 8px;
  transition: box-shadow 0.2s ease;
}

.file-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-name {
  flex: 1;
  font-size: 0.95em;
}

.file-size {
  color: #666;
  margin: 0 15px;
  font-size: 0.9em;
}

/* 页脚 */
.footer {
  margin-top: 60px;
  text-align: center;
  padding: 30px 0;
  font-size: 13px;
  color: #777;
  border-top: 1px solid #eee;
}

.footer a {
  color: #1a5fb4;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}


/* 响应式适配 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  nav {
    flex-direction: column;
    align-items: stretch;
  }

  nav a {
    text-align: center;
    margin: 4px 0;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .file-size {
    order: 1;
  }
}
