/* 现代化主题 - 文件下载站 */
:root {
  --primary: #4a6bff;
  --primary-dark: #3a50c2;
  --secondary: #ff7e5f;
  --dark: #2d3748;
  --light: #f8fafc;
  --gray: #718096;
  --light-gray: #e2e8f0;
  --success: #48bb78;
  --warning: #ed8936;
  --danger: #f56565;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --container-max: 1280px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f7fa;
  color: var(--dark);
  line-height: 1.7;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* 头部样式 */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.nav-links a {
  margin-left: 1.5rem;
  font-weight: 500;
  color: var(--dark);
  display: inline-flex;
  align-items: center;
}

.nav-links a i {
  margin-right: 0.4rem;
}

.nav-links a:hover {
  color: var(--primary);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: white;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

.btn-secondary {
  background: var(--secondary);
}

.btn-secondary:hover {
  background: #e06e51;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #e04141;
}

/* 表单样式 */
.form-group {
  margin-bottom: 1.25rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.25);
  outline: none;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

/* 卡片样式 */
.card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 1.25rem;
  background-color: #fff;
  border-bottom: 1px solid var(--light-gray);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--dark);
}

.card-header i {
  margin-right: 0.5rem;
  color: var(--primary);
}

.card-body {
  padding: 1.5rem;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

th {
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.03);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* 目录导航 */
.breadcrumb {
  display: flex;
  list-style: none;
  background-color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin: 0 0.5rem;
  color: var(--gray);
}

/* 文件列表样式 */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.directory-item {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 250px;
  position: relative;
  overflow: hidden;
}

.directory-item:hover {
  transform: translateY(-5px);
}

.directory-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  transition: var(--transition);
}

.directory-name {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  word-break: break-word;
  max-height: 3.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.file-name-container {
  margin-bottom: 0.75rem;
  width: 100%;
  height: 50px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-size {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.file-actions, .directory-actions {
  margin-top: auto;
  width: 100%;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.file-actions .btn, .directory-actions .btn {
  min-width: 45%;
}

.file-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-note {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.25rem;
  text-overflow: ellipsis;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

/* 文件类型图标颜色 */
.fa-file-pdf { color: #e74c3c; }
.fa-file-word { color: #2980b9; }
.fa-file-excel { color: #27ae60; }
.fa-file-powerpoint { color: #e67e22; }
.fa-file-image { color: #9b59b6; }
.fa-file-audio { color: #3498db; }
.fa-file-video { color: #e74c3c; }
.fa-file-archive { color: #f39c12; }
.fa-file-code { color: #1abc9c; }
.fa-folder { color: #f1c40f; }

/* 公告样式 */
.announcements {
  margin-bottom: 2rem;
}

.announcements h2 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.announcements h2:before {
  content: "\f0a1";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 0.5rem;
  color: var(--primary);
}

.announcement {
  background-color: #fff;
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.announcement-content {
  margin-bottom: 1rem;
}

.announcement-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 0.75rem 0;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.announcement-meta {
  font-size: 0.85rem;
  color: var(--gray);
  text-align: right;
}

/* 留言板样式 */
.comments {
  margin-top: 2rem;
}

.comments h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.comments h3:before {
  content: "\f4ad";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 0.5rem;
  color: var(--primary);
}

.comment {
  background-color: #fff;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.comment-content {
  margin-bottom: 0.75rem;
  color: #000000;
}

.comment-meta {
  font-size: 0.85rem;
  color: #000000;
  text-align: right;
}

/* 闪烁消息 */
.flash-messages {
  margin-bottom: 1.5rem;
}

.flash-message {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  animation: fadeIn 0.5s ease;
}

.flash-success {
  background-color: rgba(72, 187, 120, 0.1);
  color: #276749;
  border-left: 4px solid var(--success);
}

.flash-error {
  background-color: rgba(245, 101, 101, 0.1);
  color: #c53030;
  border-left: 4px solid var(--danger);
}

/* 登录页面样式 */
.login-container {
  max-width: 400px;
  margin: 3rem auto;
}

.login-card {
  padding: 2rem;
  text-align: center;
}

.login-title {
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 600;
}

/* 上传表单 */
.upload-form {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

.upload-form h3 {
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

/* 页脚样式 */
footer {
  background-color: #2d3748;
  color: #e2e8f0;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-section {
  flex: 1;
  margin-right: 2rem;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    padding: 1rem 0;
  }
  
  .site-title {
    margin-bottom: 0.75rem;
  }
  
  .nav-links a {
    margin: 0 0.75rem;
  }
  
  .footer-content {
    flex-direction: column;
  }
  
  .footer-section {
    margin-right: 0;
    margin-bottom: 2rem;
  }
  
  .directory-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* nihao  */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


.note-edit-form {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
  border-radius: var(--border-radius);
}

/* stop */
.note-editor {
  border-radius: var(--border-radius) !important;
  border-color: var(--light-gray) !important;
}

.note-toolbar {
  background-color: #f9fafc !important;
  border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.note-btn {
  background-color: #fff !important;
  border-color: var(--light-gray) !important;
}

.note-btn:hover {
  background-color: #f1f5f9 !important;
}

/* lol */
.directory-item .btn {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.directory-item .btn i {
  margin-right: 0.5rem;
}

.directory-item:not(.file-item) .directory-icon {
  color: #f1c40f;
}

.file-description {
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0.5rem 0;
  color: var(--gray);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
}

.file-description-summary {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--gray);
}

/* 短链接相关样式 */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.share-modal-content {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.share-modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.share-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
}

.share-modal-body {
  margin-bottom: 1.5rem;
}

.share-info {
  margin-bottom: 1rem;
}

.share-url-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.share-actions {
  display: flex;
  justify-content: space-between;
}

.text-success {
  color: var(--success);
} 