/* 半日观云行 - 前台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: #333; background: #faf8f5; line-height: 1.6; }
a { color: #8b6f47; text-decoration: none; }
a:hover { color: #6b5237; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 22px; font-weight: 700; color: #8b6f47; letter-spacing: 2px; }
.main-nav { display: flex; gap: 24px; }
.main-nav a { color: #555; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; transition: all .2s; }
.main-nav a:hover, .main-nav a.active { color: #8b6f47; border-bottom-color: #8b6f47; }
.header-user { display: flex; align-items: center; gap: 12px; }
.user-link { position: relative; color: #555; font-size: 14px; }
.badge { position: absolute; top: -6px; right: -12px; background: #e74c3c; color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; }
.btn-link { color: #8b6f47; font-size: 14px; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: #8b6f47; }

/* Main */
.main-content { min-height: calc(100vh - 64px - 200px); padding: 30px 0; }

/* Banner */
.banner-slider { position: relative; height: 400px; overflow: hidden; border-radius: 12px; margin-bottom: 40px; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; }
.banner-slide.active { opacity: 1; }
.banner-slide:nth-child(1) { background: linear-gradient(135deg, #d4a574, #8b6f47); }
.banner-slide:nth-child(2) { background: linear-gradient(135deg, #a8c8b8, #6b9b85); }
.banner-slide:nth-child(3) { background: linear-gradient(135deg, #e8c4a0, #c4956a); }
.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.banner-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.banner-dots span.active { background: #fff; }

/* Section */
.section { margin-bottom: 50px; }
.section-title { font-size: 24px; font-weight: 700; color: #333; margin-bottom: 24px; padding-left: 12px; border-left: 4px solid #8b6f47; }
.section-more { float: right; font-size: 14px; color: #999; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.card-img { width: 100%; height: 180px; background: #f0ebe3; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 40px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.card-desc { font-size: 13px; color: #888; margin-bottom: 10px; }
.card-price { font-size: 18px; color: #e67e22; font-weight: 700; }
.card-price small { font-size: 12px; color: #999; font-weight: normal; }

/* Buttons */
.btn { display: inline-block; padding: 10px 24px; border-radius: 6px; font-size: 14px; cursor: pointer; border: none; transition: all .2s; text-align: center; }
.btn-primary { background: #8b6f47; color: #fff; }
.btn-primary:hover { background: #6b5237; color: #fff; }
.btn-outline { background: transparent; border: 1px solid #8b6f47; color: #8b6f47; }
.btn-outline:hover { background: #8b6f47; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #555; font-weight: 500; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color .2s; }
.form-control:focus { outline: none; border-color: #8b6f47; }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }

/* Auth pages */
.auth-wrapper { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); width: 100%; max-width: 400px; }
.auth-box h2 { text-align: center; margin-bottom: 28px; color: #333; }
.auth-tip { text-align: center; margin-top: 16px; font-size: 13px; color: #999; }

/* Forum */
.forum-list { background: #fff; border-radius: 10px; overflow: hidden; }
.forum-item { padding: 18px 20px; border-bottom: 1px solid #f0f0f0; display: flex; gap: 14px; }
.forum-item:last-child { border-bottom: none; }
.forum-avatar { width: 44px; height: 44px; border-radius: 50%; background: #d4a574; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.forum-content { flex: 1; }
.forum-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.forum-meta { font-size: 12px; color: #999; display: flex; gap: 16px; }
.forum-images { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.forum-images img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }

/* Detail */
.detail-box { background: #fff; border-radius: 10px; padding: 30px; }
.detail-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.detail-meta { font-size: 13px; color: #999; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.detail-content { font-size: 15px; line-height: 1.8; margin-bottom: 24px; }
.detail-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.detail-images img { width: 100%; border-radius: 8px; }

/* Comments */
.comment-list { margin-top: 30px; }
.comment-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.comment-user { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-text { font-size: 14px; color: #555; }
.comment-time { font-size: 12px; color: #bbb; }

/* User center */
.uc-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid #f0f0f0; }
.uc-tab { padding: 10px 20px; cursor: pointer; font-size: 14px; color: #888; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.uc-tab.active { color: #8b6f47; border-bottom-color: #8b6f47; font-weight: 600; }
.uc-panel { display: none; }
.uc-panel.active { display: block; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.data-table th { background: #f8f5f0; padding: 12px 14px; text-align: left; font-size: 13px; color: #666; font-weight: 600; }
.data-table td { padding: 12px 14px; border-top: 1px solid #f0f0f0; font-size: 14px; }
.data-table tr:hover td { background: #faf8f5; }

/* Status tags */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag-pending { background: #fff3cd; color: #856404; }
.tag-confirmed { background: #d1ecf1; color: #0c5460; }
.tag-cancelled { background: #f8d7da; color: #721c24; }
.tag-expired { background: #e2e3e5; color: #383d41; }
.tag-completed { background: #d4edda; color: #155724; }
.tag-paid { background: #d4edda; color: #155724; }
.tag-red { background: #f8d7da; color: #721c24; }

/* Station QR page */
.station-qr-wrap { max-width: 420px; margin: 40px auto; background: #fff; border-radius: 12px; padding: 30px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.station-qr-wrap h2 { margin-bottom: 8px; }
.station-qr-wrap .station-name { font-size: 20px; color: #8b6f47; font-weight: 700; margin-bottom: 20px; }
.timing-display { font-size: 36px; font-weight: 700; color: #333; margin: 20px 0; font-family: monospace; }
.timing-status { font-size: 14px; margin-bottom: 16px; }
.timing-status.running { color: #27ae60; }
.timing-status.idle { color: #999; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #666; }
.pagination a:hover { border-color: #8b6f47; color: #8b6f47; }
.pagination .current { background: #8b6f47; color: #fff; border-color: #8b6f47; }

/* Alert */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* Footer */
.site-footer { background: #3a3228; color: #ccc; padding: 40px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 30px; }
.footer-col h4 { color: #fff; margin-bottom: 14px; font-size: 16px; }
.footer-col p, .footer-col a { font-size: 13px; color: #aaa; margin-bottom: 6px; display: block; }
.footer-col a:hover { color: #d4a574; }
.footer-bottom { border-top: 1px solid #4a4238; padding: 16px 0; font-size: 12px; color: #888; text-align: center; }

/* Filter bar */
.filter-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-bar .form-control { width: auto; min-width: 140px; }

/* Works grid */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.work-item { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.work-item img { width: 100%; height: 200px; object-fit: cover; }
.work-info { padding: 12px; }
.work-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.work-author { font-size: 12px; color: #999; }

/* Responsive */
@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); gap: 12px; }
  .main-nav.show { display: flex; }
  .mobile-menu-btn { display: block; }
  .header-user .user-link span:not(.badge) { display: none; }
  .banner-slider { height: 220px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-img { height: 140px; }
  .auth-box { padding: 24px; }
  .detail-box { padding: 20px; }
}
