/* style.css - CSS styles for History Today App */
/* 
   此内容与您原始请求中的压缩 CSS 相同。
   作为独立文件放置在此处。
*/
:root{--color-primary:#3b82f6;--color-primary-hover:#2563eb;--color-secondary:#8b5cf6;--color-accent:#f97316;--color-bg:#f8fafc;--color-surface:#fff;--color-text:#1e293b;--color-text-muted:#64748b;--color-border:#e2e8f0;--color-success:#22c55e;--color-error:#ef4444;--color-warning:#f59e0b;--color-ancient:#b45309;--color-modern:#1e40af;--color-contemporary:#065f46;--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--radius:.75rem;--transition:all .2s ease-in-out}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}body{margin:0;font-family:var(--font-sans);background-color:var(--color-bg);color:var(--color-text);line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.container{max-width:1200px;margin:0 auto;padding:0 1.5rem}main{padding:2rem 0}.hidden{display:none!important}.section-fade{opacity:0;transform:translateY(20px);transition:opacity .6s ease,transform .6s ease}.section-fade.visible{opacity:1;transform:translateY(0)}.main-header{background-color:rgba(255,255,255,.8);backdrop-filter:blur(10px);position:sticky;top:0;z-index:100;border-bottom:1px solid var(--color-border)}.header-content{display:flex;justify-content:space-between;align-items:center;height:70px;flex-wrap:wrap}.logo{display:flex;align-items:center;gap:.5rem;font-size:1.5rem;font-weight:700;color:var(--color-primary);text-decoration:none;flex-shrink:0}.nav-actions{display:flex;gap:1rem;flex-wrap:wrap;justify-content:flex-end}.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1.2rem;border-radius:999px;border:1px solid transparent;font-weight:600;cursor:pointer;transition:var(--transition);text-decoration:none;white-space:nowrap;font-size:.95rem}.btn-primary{background-color:var(--color-primary);color:#fff}.btn-primary:hover{background-color:var(--color-primary-hover)}.btn-outline{border-color:var(--color-border);background-color:var(--color-surface);color:var(--color-text-muted)}.btn-outline:hover{background-color:var(--color-bg);border-color:#cbd5e1}.page-header{text-align:center;margin-bottom:3rem;padding-top:1rem}.page-title{font-size:2.5rem;margin:0 0 1rem;background:linear-gradient(to right,var(--color-primary),var(--color-secondary));-webkit-background-clip:text;color:transparent;font-weight:800}.page-subtitle{font-size:1.1rem;color:var(--color-text-muted);max-width:600px;margin:0 auto}.controls-section{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;background:var(--color-surface);padding:1.5rem;border-radius:var(--radius);box-shadow:var(--shadow-md);margin-bottom:3rem}.controls-group{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%}.day-navigation{display:flex;align-items:center;gap:.25rem;justify-content:center;flex-wrap:wrap}.date-picker{padding:.6rem;border:1px solid var(--color-border);border-radius:.5rem;font-size:1rem;flex-grow:0;width:140px;text-align:center;box-sizing:border-box;min-width:100px}.day-navigation .btn{padding:.6rem .8rem}.category-filters{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;flex-grow:1;width:100%}.filter-btn{display:inline-flex;align-items:center;gap:.4rem;padding:.5rem 1rem;border-radius:999px;border:1px solid var(--color-border);background:0 0;cursor:pointer;font-weight:500;transition:var(--transition);font-size:.9rem}.filter-btn-all{color:var(--color-text-muted)}.filter-btn-ancient{color:var(--color-ancient)}.filter-btn-modern{color:var(--color-modern)}.filter-btn-contemporary{color:var(--color-contemporary)}.filter-btn.active,.filter-btn:hover{background-color:var(--color-primary);color:#fff!important;border-color:var(--color-primary)}.event-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:1.5rem}.event-card{background-color:var(--color-surface);border-radius:var(--radius);box-shadow:var(--shadow-md);padding:1.5rem;display:flex;flex-direction:column;transition:transform .2s ease,box-shadow .2s ease}.event-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}.event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;flex-wrap:wrap;gap:.5rem}.event-year{background-color:var(--color-bg);color:var(--color-text-muted);font-weight:700;padding:.25rem .75rem;border-radius:999px;font-size:.85rem;flex-shrink:0}.event-category{display:inline-flex;align-items:center;gap:.3rem;font-size:.9rem;font-weight:500;padding:.25rem .75rem;border-radius:999px;flex-shrink:0}.category-ancient{background-color:#fef3c7;color:var(--color-ancient)}.category-modern{background-color:#dbeafe;color:var(--color-modern)}.category-contemporary{background-color:#dcfce7;color:var(--color-contemporary)}.event-description{font-size:1.1rem;margin-bottom:1.5rem;flex-grow:1}.event-actions{display:flex;gap:.75rem;border-top:1px solid var(--color-border);padding-top:1rem;margin-top:auto;flex-wrap:wrap}.action-btn{background:0 0;border:none;padding:0;cursor:pointer;color:var(--color-text-muted);display:flex;align-items:center;gap:.4rem;font-size:.9rem;transition:var(--transition);text-decoration:none;white-space:nowrap;flex-shrink:0}.action-btn:hover{color:var(--color-primary)}.action-btn.bookmarked{color:var(--color-accent)}.quote-section{background:linear-gradient(135deg,var(--color-primary),var(--color-secondary));color:#fff;padding:3rem 1.5rem;border-radius:var(--radius);text-align:center;margin:4rem 0;box-shadow:var(--shadow-lg)}.quote-text{font-size:1.5rem;font-style:italic;max-width:800px;margin:0 auto 1rem;line-height:1.5}.quote-author{font-weight:600;opacity:.9;font-size:1.1rem}.month-grid{display:flex;flex-direction:column;gap:2rem}.month-card{background-color:var(--color-surface);border-radius:var(--radius);padding:1.5rem;box-shadow:var(--shadow-md);display:flex;flex-direction:column;break-inside:avoid}.month-title{font-size:1.8rem;margin:0 0 1.5rem;color:var(--color-primary);font-weight:700;text-align:center}.day-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:.75rem;flex-grow:1}.day-link{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:.75rem;border-radius:.5rem;border:1px solid var(--color-border);text-decoration:none;color:var(--color-text);transition:var(--transition);height:70px}.day-link.has-events{background-color:var(--color-primary);color:#fff;border-color:var(--color-primary)}.day-link.no-events{background-color:var(--color-bg);color:var(--color-text-muted);border-color:var(--color-border);opacity:.7}.day-link.no-events:hover,.day-link:hover{transform:scale(1.05);box-shadow:var(--shadow-sm)}.day-link.no-events:hover{background-color:var(--color-surface);color:var(--color-text-muted);opacity:1}.day-number{font-size:1.5rem;font-weight:700;line-height:1.2}.day-count{font-size:.8rem;opacity:.7;margin-top:.2rem}.news-record-list{display:flex;flex-direction:column;gap:1rem;max-width:800px;margin:0 auto}.news-record-item{background-color:var(--color-surface);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:1.2rem 1.5rem;transition:transform .2s ease,box-shadow .2s ease;display:flex;align-items:center;flex-wrap:wrap;gap:.8rem}.news-record-item:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}.news-record-date{font-size:1.1rem;font-weight:600;color:var(--color-primary);flex-shrink:0}.news-record-summary{font-size:1rem;color:var(--color-text);flex-grow:1;min-width:200px}.news-record-link{display:inline-flex;align-items:center;gap:.4rem;color:var(--color-primary);text-decoration:none;font-weight:500;transition:color var(--transition);flex-shrink:0}.news-record-link:hover{color:var(--color-primary-hover)}.pagination-controls{display:flex;justify-content:center;align-items:center;gap:.5rem;margin-top:2rem;flex-wrap:wrap}.page-number,.pagination-btn{padding:.6rem 1.2rem;border-radius:.5rem;border:1px solid var(--color-border);background-color:var(--color-surface);color:var(--color-text-muted);text-decoration:none;font-weight:600;transition:var(--transition);cursor:pointer;display:inline-flex;align-items:center}.pagination-btn:hover:not(:disabled),.page-number:hover:not(.active){background-color:var(--color-bg);border-color:#cbd5e1;color:var(--color-primary)}.pagination-btn:disabled{opacity:.5;cursor:not-allowed}.page-number.active{background-color:var(--color-primary);color:#fff;border-color:var(--color-primary);cursor:default}.page-number.active:hover{background-color:var(--color-primary);color:#fff}.modal-overlay{position:fixed;inset:0;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:1000;opacity:0;transition:opacity .2s ease;pointer-events:none}.modal-overlay.active{opacity:1;pointer-events:auto}.modal-content{background:var(--color-surface);border-radius:var(--radius);padding:2rem;max-width:600px;width:90%;box-shadow:var(--shadow-lg);transform:scale(.95);transition:transform .2s ease;max-height:90vh;overflow:hidden;display:flex;flex-direction:column}.modal-overlay.active .modal-content{transform:scale(1)}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;flex-shrink:0}.modal-title{font-size:1.5rem;margin:0}.modal-close-btn{background:0 0;border:none;font-size:1.5rem;cursor:pointer;color:var(--color-text-muted);transition:color .2s ease}.modal-close-btn:hover{color:var(--color-text)}.bookmarks-list{flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;gap:1rem;padding-right:.5rem}.bookmark-item{display:flex;justify-content:space-between;align-items:center;gap:1rem;background:var(--color-bg);padding:1rem;border-radius:.5rem;box-shadow:var(--shadow-sm);flex-wrap:wrap}.bookmark-info{flex-grow:1;min-width:150px}.bookmark-desc{font-weight:600;margin-bottom:.2rem}.bookmark-year{font-size:.9rem;color:var(--color-text-muted)}.bookmark-actions{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-top:.5rem}.remove-bookmark-btn{color:var(--color-error)}.main-footer{text-align:center;padding:2rem 0;margin-top:2rem;border-top:1px solid var(--color-border);color:var(--color-text-muted);font-size:.9rem}#scroll-to-top-btn{position:fixed;bottom:2rem;right:2rem;background-color:var(--color-primary);color:#fff;border:none;border-radius:50%;width:50px;height:50px;font-size:1.5rem;display:flex;justify-content:center;align-items:center;cursor:pointer;box-shadow:var(--shadow-md);transition:opacity .3s ease,transform .3s ease;opacity:0;transform:translateY(20px);z-index:999}#scroll-to-top-btn.show{opacity:1;transform:translateY(0)}#scroll-to-top-btn:hover{background-color:var(--color-primary-hover);box-shadow:var(--shadow-lg)}.message-box{padding:1rem;margin-bottom:1rem;border-radius:.5rem;text-align:center}.message-box.error{background-color:#fee2e2;color:var(--color-error);border:1px solid var(--color-error)}.message-box.info{background-color:#dbeafe;color:var(--color-primary);border:1px solid var(--color-primary)}.message-box.warning{background-color:#fef9c3;color:var(--color-warning);border:1px solid var(--color-warning)}.no-results-message{text-align:center;padding:4rem 0;color:var(--color-text-muted)}@media (max-width:1024px){.container{padding:0 1rem}}@media (max-width:768px){.header-content{flex-direction:column;align-items:flex-start;height:auto;padding:.8rem 0;gap:.8rem}.nav-actions{width:100%;justify-content:space-around;gap:.5rem}.nav-actions .btn i{display:none}.nav-actions .btn .btn-text{display:inline}.nav-actions .btn{padding:.5rem .8rem;font-size:.85rem;gap:0}.page-title{font-size:2rem}.page-subtitle{font-size:1rem;padding:0 .5rem}.controls-section{flex-direction:column;padding:1rem;gap:.8rem}.controls-group{flex-direction:column;gap:.8rem;width:100%}.day-navigation{width:100%;justify-content:space-between;gap:.5rem}.date-picker{flex-grow:1;max-width:none}.day-navigation .btn{flex-shrink:0;width:auto}.category-filters{width:100%;justify-content:space-around}.filter-btn{flex-grow:1;font-size:.85rem;padding:.4rem .6rem}.event-grid{grid-template-columns:1fr;gap:1rem}.event-card{display:flex;min-width:unset}.quote-section{padding:2rem 1rem;margin:3rem 0}.quote-text{font-size:1.2rem}.quote-author{font-size:1rem}.day-link{height:60px}.day-number{font-size:1.3rem}.day-count{font-size:.7rem}.modal-content{padding:1.5rem;width:95%}.modal-title{font-size:1.2rem}.bookmark-item{flex-direction:column;align-items:flex-start;padding:.8rem}.bookmark-actions{width:100%;justify-content:flex-end;margin-top:.8rem}#scroll-to-top-btn{bottom:1rem;right:1rem;width:45px;height:45px;font-size:1.2rem}.pagination-controls{gap:.25rem}.page-number,.pagination-btn{padding:.4rem .8rem}}@media (max-width:480px){body{font-size:.9rem}.container{padding:0 .5rem}.logo{font-size:1.2rem}.nav-actions .btn{padding:.3rem .5rem;font-size:.75rem}.nav-actions .btn i{display:none}.nav-actions .btn .btn-text{display:inline}.page-title{font-size:1.5rem}.page-subtitle{font-size:.9rem}.day-navigation{gap:.2rem}.date-picker{font-size:.9rem}.day-navigation .btn{padding:.5rem .6rem}.category-filters{justify-content:center}.category-filters .filter-btn{flex-grow:unset;font-size:.75rem;padding:.3rem .4rem;white-space:nowrap}.event-card{padding:.8rem}.event-description{font-size:.95rem}.quote-text{font-size:1rem}.quote-author{font-size:.9rem}}