* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding-bottom: 60px;
}

/* 返回链接 */
.back-link {
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #2c3e50;
    border-color: #2c3e50;
    transform: translateX(-3px);
}

/* 头部区域 */
.header-section {
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.page-title {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: #1a1a1a;
}

.search-section {
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 1px solid #e9ecef;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    border-color: #2c3e50;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.05);
}

/* 句子列表 */
.quotes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.quote-card {
    padding: 24px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.quote-card:nth-child(1) { animation-delay: 0.1s; }
.quote-card:nth-child(2) { animation-delay: 0.15s; }
.quote-card:nth-child(3) { animation-delay: 0.2s; }
.quote-card:nth-child(4) { animation-delay: 0.25s; }
.quote-card:nth-child(5) { animation-delay: 0.3s; }
.quote-card:nth-child(6) { animation-delay: 0.35s; }
.quote-card:nth-child(7) { animation-delay: 0.4s; }
.quote-card:nth-child(8) { animation-delay: 0.45s; }

.quote-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #2c3e50;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quote-card:hover {
    border-color: #2c3e50;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
}

.quote-card:hover::before {
    transform: scaleY(1);
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 15px;
    flex-wrap: wrap;
}

.quote-meta {
    flex: 1;
    min-width: 200px;
}

.quote-title {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.quote-author {
    font-size: 14px;
    color: #666;
}

.quote-source {
    font-size: 12px;
    padding: 4px 12px;
    background: #f8f9fa;
    color: #666;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
}

.quote-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    white-space: pre-line;
    padding-left: 16px;
    border-left: 3px solid #f0f0f0;
}

.quote-note {
    margin-top: 12px;
    font-size: 13px;
    color: #999;
    font-style: italic;
}

/* 加载和空状态 */
.loading,
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.footer p {
    margin: 5px 0;
    font-size: 13px;
    color: #999;
}

.footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2c3e50;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .quote-card {
        padding: 20px;
    }
    
    .quote-title {
        font-size: 16px;
    }
    
    .quote-content {
        font-size: 14px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .page-title {
        color: #ffffff;
    }
    
    .back-btn {
        color: #999;
        border-color: #3c3c3c;
    }
    
    .back-btn:hover {
        color: #e0e0e0;
        border-color: #e0e0e0;
    }
    
    .search-input {
        background: #2c2c2c;
        border-color: #3c3c3c;
        color: #e0e0e0;
    }
    
    .search-input:focus {
        border-color: #e0e0e0;
        background: #333333;
        box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.05);
    }
    
    .quote-card {
        background: #2c2c2c;
        border-color: #3c3c3c;
    }
    
    .quote-card::before {
        background: #e0e0e0;
    }
    
    .quote-card:hover {
        border-color: #e0e0e0;
        box-shadow: 0 2px 12px rgba(224, 224, 224, 0.08);
    }
    
    .quote-title {
        color: #ffffff;
    }
    
    .quote-author {
        color: #999;
    }
    
    .quote-source {
        background: #3c3c3c;
        border-color: #4c4c4c;
        color: #999;
    }
    
    .quote-content {
        color: #ccc;
        border-left-color: #3c3c3c;
    }
    
    .quote-note {
        color: #777;
    }
    
    .loading,
    .no-results {
        color: #666;
    }
    
    .footer {
        border-top-color: #3c3c3c;
    }
    
    .footer a:hover {
        color: #ffffff;
    }
}
