* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
}

/* 标签页样式 */
.tabs-container {
    background: white;
    border-radius: 15px;
    padding: 0;
    margin: 30px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px 30px;
    font-size: 1.1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tab-inner {
    min-height: 400px;
}

.app-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.app-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.generate-btn-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.api-key-section {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.api-key-section label {
    color: #667eea;
    font-weight: bold;
    white-space: nowrap;
}

.api-key-section input {
    border: 2px solid #e0e0e0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1rem;
    min-width: 300px;
    outline: none;
    transition: border-color 0.3s ease;
}

.api-key-section input:focus {
    border-color: #667eea;
}

.search-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    background: #ff4444;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

.empty-state {
    text-align: center;
    color: white;
    padding: 60px 20px;
    font-size: 1.2rem;
}

.loading-state {
    text-align: center;
    color: #333;
    padding: 60px 20px;
    font-size: 1.2rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

.loading-text {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #667eea;
}

.loading-reason {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.post-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.post-author {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.options-container {
    margin-top: 20px;
}

.options-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
}

.option-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.option-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.option-label {
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 30px;
}

.option-text {
    flex: 1;
}

.selected-info {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.toggle-btn {
    margin-top: 10px;
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.toggle-btn:hover {
    background: #5568d3;
}

.answer-explanation {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    color: #555;
    font-style: italic;
}

/* 分数区域样式 */
.score-section {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.current-score {
    font-size: 1.3rem;
    color: #333;
}

.score-label {
    font-weight: bold;
    margin-right: 10px;
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin: 0 5px;
}

.score-total {
    color: #999;
    font-size: 1.2rem;
}

.submit-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 结果展示区域样式 */
.result-section {
    margin-top: 30px;
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.result-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
}

.result-score {
    margin-bottom: 30px;
}

.result-score-value {
    font-size: 4rem;
    font-weight: bold;
    color: #667eea;
}

.result-score-total {
    font-size: 2rem;
    color: #999;
    margin-left: 10px;
}

.result-rating {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.result-rating.extreme {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.result-rating.tendency {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.result-rating.normal {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.restart-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 纯度鉴定区域样式 */
.purity-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* 纯度鉴定风险提示 */
.purity-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.warning-icon {
    font-size: 2rem;
    line-height: 1;
}

.warning-content {
    flex: 1;
}

.warning-content strong {
    color: #856404;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.warning-content p {
    color: #856404;
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.purity-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.username-input-section {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.username-input-section label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.username-input-section input {
    flex: 1;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.username-input-section input:focus {
    border-color: #667eea;
}

.purity-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.purity-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.purity-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.purity-result {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #f5576c;
}

.purity-result h3 {
    color: #f5576c;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.purity-result .purity-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f5576c;
    margin: 20px 0;
    text-align: center;
}

.purity-result .purity-rating {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.purity-result .purity-rating.extreme {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.purity-result .purity-rating.moderate {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.purity-result .purity-rating.low {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.purity-result .examples-list {
    margin: 20px 0;
    padding-left: 20px;
}

.purity-result .examples-list li {
    margin: 10px 0;
    line-height: 1.6;
    color: #555;
}

.purity-result .commentary {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    font-style: italic;
    color: #333;
    line-height: 1.8;
}

/* 页面底部创作者声明 */
.app-footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.app-footer p {
    margin: 0;
}

.app-footer a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
    transition: opacity 0.3s ease;
}

.app-footer a:hover {
    opacity: 0.8;
}
