/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 深空黑版本 - 强制更新 */
body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 40%;
    max-width: 600px;
    min-width: 360px; /* 保证在手机上有良好的阅读宽度 */
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box.persona-page, .login-box.questionnaire-page, .login-box.results-page {
    text-align: left;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 300;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #666;
}

button {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #333;
}

/* 入口页面样式 */
.entry-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 30px 0;
}

.entry-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    border: 2px solid #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 80px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.entry-card:hover {
    border-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.25);
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
}

.entry-card:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.card-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    text-align: left;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #333;
}

.card-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.card-arrow {
    font-size: 20px;
    color: #007bff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-weight: bold;
}

.entry-card:hover .card-arrow {
    color: #0056b3;
    transform: translateX(6px);
    font-size: 22px;
}

/* Persona Page Styles */
.persona-page .summary {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

.achievements {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.achievement-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #007bff;
}

.achievement-card h4 {
    margin: 0 0 10px 0;
    color: #007bff;
}

.achievement-card p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.highlight {
    background-color: #e3f2fd;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
    color: #0056b3;
}

.cta-button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: #218838;
}

/* My Questionnaire Page Styles */
.questionnaire-page .questions-list {
    margin: 20px 0;
}

.question-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.question-display ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

.question-display li {
    padding: 5px;
}

.question-display li.correct {
    font-weight: bold;
    color: #28a745;
}

/* Results Page Styles */
.results-page .result-module {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.results-page .result-module h4 {
    margin-top: 0;
}

.food-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.food-card {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.food-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.food-card .food-info {
    padding: 10px;
}

.food-card h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.food-card p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    text-align: left;
}

/* Answer Questionnaire List */
.questionnaire-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.questionnaire-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.questionnaire-list-item:hover {
    background-color: #e9ecef;
}

/* 分析页面样式 */
.analysis-content {
    text-align: left;
}

.taste-tags, .preferences {
    margin-bottom: 25px;
}

.taste-tags h3, .preferences h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #e9ecef;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.preferences p {
    color: #666;
    line-height: 1.6;
}

/* 问卷结果页面样式 */
.questionnaire-content {
    text-align: left;
}

.result-summary, .recommendations {
    margin-bottom: 25px;
}

.result-summary h3, .recommendations h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress {
    background: #333;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.recommendations ul {
    list-style: none;
    padding: 0;
}

/* 问卷相关样式 */
.questionnaire-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.questionnaire-card {
    background: #f8f9fa;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.questionnaire-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-status {
    display: flex;
    align-items: center;
}

.card-content {
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.card-content:hover {
    background-color: #f0f8ff;
}

.card-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.card-info span {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 6px;
    color: #666;
    font-size: 12px;
}

.question-preview {
    color: #555;
    font-style: italic;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.answered-text {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.answer-btn {
    background: #007bff;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.answer-btn:hover {
    background: #0056b3;
}

.view-btn {
    background: #6c757d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 问题结果显示样式 */
.question-result {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.question-result h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.options-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.option-text {
    font-weight: 500;
    color: #333;
}

.option-count {
    font-weight: 600;
    color: #007bff;
}

.questions-results {
    margin: 20px 0;
}

/* 统计结果样式 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.yes-stat {
    background: #d4edda;
    border-color: #28a745;
}

.no-stat {
    background: #f8d7da;
    border-color: #dc3545;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 18px;
    font-weight: 600;
    margin: 5px 0;
}

.stat-percentage {
    font-size: 14px;
    color: #666;
}

/* 回答者列表样式 */
.respondents-list {
    margin-top: 20px;
}

.respondent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
}

.yes-answer {
    background: #d4edda;
    border-left-color: #28a745;
}

.no-answer {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.answer {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    background: #333;
    color: white;
}

.timestamp {
    font-size: 12px;
    color: #666;
}

/* 口味分析样式 */
.analysis-content {
    text-align: left;
}

.taste-tags, .preferences {
    margin-bottom: 25px;
}

.taste-tags h3, .preferences h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #e9ecef;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.preferences p {
    color: #666;
    line-height: 1.6;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.answer-btn, .view-btn, .edit-btn, .submit-btn {
    background: #333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.answer-btn:hover, .view-btn:hover, .edit-btn:hover, .submit-btn:hover {
    background: #555;
}

.view-btn {
    background: #28a745;
}

.edit-btn {
    background: #007bff;
}

.answered-text {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* 问卷答题样式 */
.question-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.question-item h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.option-label:hover {
    background: #e9ecef;
}

.option-label input {
    margin-right: 10px;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果分析样式 */
.results-summary {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.total-responses {
    color: #333;
    font-weight: 600;
    margin: 0;
}

.results-content {
    text-align: left;
}

.result-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-item h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.answer-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item .option {
    min-width: 80px;
    font-weight: 500;
    color: #333;
}

.bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.bar .fill {
    height: 100%;
    background: #333;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.stat-item .count {
    min-width: 80px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* 标签页样式 */
.tab-container {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #333;
    border-bottom-color: #333;
    font-weight: 600;
}

.tab-content {
    min-height: 200px;
}

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.refresh-btn:hover {
    background: #0056b3;
}

.refresh-btn:active {
    transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .entry-card {
        padding: 16px;
        min-height: 70px;
        gap: 12px;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .card-arrow {
        font-size: 18px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .entry-card {
        min-height: 90px;
        padding: 24px 20px;
    }
    
    .entry-card:active {
        background: #e3f2fd;
        transform: scale(0.98);
    }
    
    .card-icon {
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
}

/* 大屏幕优化 */
@media (min-width: 768px) {
    .entry-options {
        max-width: 500px;
        margin: 40px auto;
    }
    
    .entry-card {
        padding: 24px;
        min-height: 90px;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-description {
        font-size: 15px;
    }
}
