* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #2196F3;
    color: white;
    padding: 1rem;
    text-align: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

/* Logo styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.logo {
    margin-right: 10px;
    animation: spin 30s linear infinite;
    transform-origin: center;
    width: 30px;
    height: 30px;
}

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

.logo-container .main-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    margin-left: 10px;
    color: white;
}

@media (max-width: 768px) {
    .logo-container .main-title {
        font-size: 1.5rem;
    }
}

.logo-container h1 {
    margin: 0;
    font-size: 1.6rem;
}

main {
    flex: 1;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.inputs-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    order: 2;
}

.inputs-section h3 {
    margin-bottom: 1rem;
    color: #2196F3;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 0.5rem;
}

.tool-controls {
    margin-bottom: 1.5rem;
}

.mode-selection, .set-selection {
    margin-bottom: 1.5rem;
}

.mode-selection h4, .set-selection h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.mode-buttons, .set-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mode-btn, .set-btn {
    padding: 8px 12px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mode-btn:hover, .set-btn:hover {
    background-color: #e5e5e5;
}

.mode-btn.active, .set-btn.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    flex: 1;
    min-width: calc(50% - 0.5rem);
}

.action-btn:hover {
    background-color: #e5e5e5;
}

.tool-settings-toggle {
    background-color: #f8f8f8;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
    user-select: none;
}

.tool-settings-toggle h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #333;
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.tool-settings {
    padding: 1rem;
    background-color: #f8f8f8;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section h5 {
    margin-bottom: 0.75rem;
    color: #4285f4;
    font-size: 0.95rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.setting-item label {
    flex: 1;
}

.setting-item select, .setting-item input[type="number"] {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.color-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-btn {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.theme-btn.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
}

.premium-feature {
    opacity: 0.7;
}

.premium-tag {
    background-color: #ffd700;
    color: #333;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.wheel-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.wheel-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.wheel-title h2 {
    color: #4285f4;
    margin-bottom: 0.5rem;
}

.wheel-title p {
    color: #666;
}

.wheel-canvas-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.5rem;
}

#wheel-canvas {
    width: 100%;
    height: auto;
    display: block;
}

.center-button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background-color: white;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* 右侧指针标记样式 */
.marker-right {
    position: absolute;
    right: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 32px solid white;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
    z-index: 15;
}

/* 隐藏旧的指针样式 */
.pointer-right, .pointer {
    display: none;
}

/* 右侧指针相关样式 */
/* .pointer-right {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
}

.pointer {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 24px solid #2196F3;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
} */

/* 隐藏顶部指针 */
.marker-top {
    display: none;
}

#spin-button {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 0;
    background-color: #2196F3;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

#spin-button:hover, #stop-button:hover {
    background-color: #1976D2;
    transform: scale(1.05);
}

#stop-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 0;
    background-color: #f44336;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

#stop-button:hover {
    background-color: #d32f2f;
}

.result-section {
    margin-top: 1.5rem;
    text-align: center;
}

#result-display {
    margin-bottom: 1rem;
    min-height: 80px; /* 固定高度，避免布局跳动 */
    padding: 1rem;
    background-color: #f8f8f8;
    border-radius: 8px;
}

#result-display h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

#result-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: #888; /* 默认灰色 */
}

#open-results {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#save-title {
    padding: 0.5rem 1rem;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

#save-title:hover {
    background-color: #3367d6;
}

.results-content {
    max-width: 600px;
}

#results-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

.results-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: white;
}

#share-results {
    background-color: #4285f4;
}

#download-results {
    background-color: #34a853;
}

#clear-results {
    background-color: #ea4335;
}

.results-actions button:hover {
    opacity: 0.9;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1200;
}

.popup.show {
    opacity: 1;
    pointer-events: all;
}

.popup-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 22px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.popup-close:hover {
    color: #333;
}

#popup-message {
    margin-bottom: 1rem;
    color: #666;
}

#popup-result {
    font-size: 2.5rem;
    color: #4285f4;
}

/* Show button */
.show-toggle {
    position: fixed;
    top: 50%;
    right: 0;
    left: auto;
    transform: translateY(-50%);
    background-color: #4285f4;
    color: white;
    padding: 15px 5px;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s;
}

.show-toggle:hover {
    background-color: #3367d6;
    padding-left: 10px;
}

/* 移除移动设备上的触摸高亮效果 */
button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent; /* 移除iOS上的点击高亮 */
    outline: none; /* 移除点击时的轮廓 */
}

/* 确保按钮在按下时有反馈效果 */
button:active, a:active {
    opacity: 0.8; /* 按下时轻微降低不透明度作为视觉反馈 */
}

/* 自定义选项样式 */
.custom-options-section {
    width: 100%;
}

.custom-options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.custom-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-option-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.remove-option-btn {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-option-btn:hover {
    background-color: #d32f2f;
}

#add-option-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

#add-option-btn:hover {
    background-color: #388E3C;
}

/* 更新模式和集合选择按钮样式 */
.mode-selection, .sets-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn, .sets-btn {
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active, .sets-btn.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
}

.control-section h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

/* 自定义选项文本区域样式 */
.options-textarea-container {
    width: 100%;
    margin-bottom: 15px;
}

#custom-options-textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

/* 移除选项按钮样式 */
#remove-option-button {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

#remove-option-button:hover {
    background-color: #d32f2f;
}

/* 自定义通知样式 */
.custom-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 15px 25px;
    z-index: 2000;
    max-width: 90%;
    width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.custom-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    position: relative;
}

.notification-close {
    position: absolute;
    top: -10px;
    right: -15px;
    font-size: 20px;
    cursor: pointer;
    color: #888;
}

#notification-message {
    margin: 0;
    color: #444;
    font-weight: 500;
    font-size: 15px;
}

/* 不同类型的通知样式 */
.custom-notification.info {
    border-left: 4px solid #2196F3;
}

.custom-notification.warning {
    border-left: 4px solid #FF9800;
}

.custom-notification.error {
    border-left: 4px solid #F44336;
}

.custom-notification.success {
    border-left: 4px solid #4CAF50;
}

/* Default theme colors for the wheel */
:root {
    --color-yes: #4CAF50;
    --color-no: #F44336;
    --color-maybe: #FFC107;
}

footer {
    background-color: #333;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    color: #4285f4;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: white;
}

footer a {
    color: #4285f4;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

/* How-it-works section */
.how-it-works {
    background-color: #f8f9fa;
    padding: 3rem 1rem;
    margin-top: 2rem;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2196F3;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.step {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2196F3;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step h3 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

.step p {
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* Enhanced FAQ Section */
.faq-section {
    padding: 4rem 1rem;
    background-color: #f8f9fa;
    margin-top: 3rem;
    text-align: center;
}

.faq-section h2 {
    position: relative;
    display: inline-block;
    color: #2196F3;
    font-size: 2rem;
    margin: 0 auto 4rem;
    padding-bottom: 10px;
    width: auto;
    text-align: center !important;
}

.faq-section h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background-color: #2196F3;
    border-radius: 2px;
}

.faq-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.faq-section .faqs {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: white;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background-color: #f5f5f5;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    flex: 1;
}

.faq-icon {
    margin-left: 1rem;
    transition: transform 0.3s;
    color: #2196F3;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.faq-item.active .faq-icon i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 500px; /* 增加高度以适应中文内容 */
    padding: 1rem 1.5rem 1.5rem;
}

/* 中文FAQ样式修复 */
html[lang="zh"] .faq-section h2 {
    position: relative;
    display: inline-block;
    color: #2196F3;
    font-size: 2rem;
    margin: 0 auto 4rem;
    padding-bottom: 10px;
    width: auto;
    text-align: center !important;
}

html[lang="zh"] .faq-section h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background-color: #2196F3;
    border-radius: 2px;
}

html[lang="zh"] .faq-section .faqs {
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
    text-align: left;
}

html[lang="zh"] .faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: white;
    transition: all 0.3s ease;
    text-align: left;
    border: 1px solid #e0e0e0;
}

html[lang="zh"] .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

html[lang="zh"] .faq-question:hover {
    background-color: #f9f9f9;
}

html[lang="zh"] .faq-question h3 {
    margin: 0;
    padding: 0;
    font-size: 1.1rem;
    color: #333;
    flex: 1;
    text-align: left;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

html[lang="zh"] .faq-icon {
    color: #2196F3;
    transition: transform 0.3s;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

html[lang="zh"] .faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #fafafa;
}

html[lang="zh"] .faq-answer p {
    color: #666;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    font-size: 1rem;
}

/* Fix for spacing in Chinese FAQ */
html[lang="zh"] .faq-item.active .faq-answer {
    max-height: 600px;
    padding: 1rem 1.5rem 1.5rem;
}

html[lang="zh"] .faq-item.active .faq-icon i {
    transform: rotate(180deg);
}

/* 修复中文FAQ样式 - 确保箭头和状态正确 */
html[lang="zh"] .faq-section .faq-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

html[lang="zh"] .faq-section .faq-item.active {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

html[lang="zh"] .faq-section .faq-icon i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

html[lang="zh"] .faq-section .faq-item.active .faq-icon i {
    transform: rotate(180deg);
}

html[lang="zh"] .faq-section .faq-item.active .faq-question {
    border-bottom: 1px solid #f0f0f0;
    background-color: #f8f8f8;
}

html[lang="zh"] .faq-section .faq-item .faq-question {
    background-color: #fff;
}

/* 优化蓝色线条显示 */
html[lang="zh"] .faq-section h2::after {
    height: 4px;
    background-color: #2196F3;
    width: 120px;
    bottom: -20px;
}

/* 调整FAQ标题容器 */
.faq-section .container {
    text-align: center;
}

/* 确保标题居中 */
.faq-section h2 {
    text-align: center;
    display: inline-block;
    margin: 0 auto 3rem;
    padding-bottom: 30px;
    position: relative;
    width: auto;
}

html[lang="zh"] .faq-section h2 {
    text-align: center;
    display: inline-block;
    margin: 0 auto 3rem;
    padding-bottom: 30px;
    position: relative;
    width: auto;
}

/* Footer Navigation */
.footer-nav {
    margin-top: 1rem;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 1.5rem;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: white;
    text-decoration: underline;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

button:focus, a:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .steps {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        width: 100%;
        max-width: 100%;
    }
    
    .footer-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        min-width: 100%;
    }
}

/* Rich snippets optimization */
.stars-container {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.stars {
    color: #FFC107;
    margin-right: 0.5rem;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

/* Footer pages styles */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.page-content h1 {
    color: #2196F3;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
}

/* About page */
.about-section {
    line-height: 1.6;
}

.about-section h2 {
    color: #333;
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.about-section p {
    margin-bottom: 1rem;
    color: #444;
}

.about-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.about-section li {
    margin-bottom: 0.5rem;
}

.about-image {
    text-align: center;
    margin: 2rem 0;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Contact page */
.contact-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-method i {
    font-size: 2rem;
    color: #2196F3;
    margin-bottom: 0.5rem;
}

.contact-method h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-form h2 {
    margin-bottom: 1.5rem;
}

.submit-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #1976D2;
}

/* Policy pages (Privacy & Terms) */
.policy-content {
    max-width: 900px;
    margin: 0 auto;
}

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.policy-section h3 {
    color: #444;
    margin: 1.5rem 0 0.5rem;
    font-size: 1.2rem;
}

.policy-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #444;
}

.policy-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.policy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Back to tool button */
.back-to-tool {
    text-align: center;
    margin-top: 2rem;
}

.button {
    display: inline-block;
    background-color: #2196F3;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #1976D2;
}

/* Responsive design for the footer pages */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    .page-content {
        padding: 1.5rem;
    }
    
    .contact-section {
        flex-direction: column;
    }
    
    .contact-form, .contact-info {
        width: 100%;
    }
}

/* Language Selector Styles */
.language-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.current-language {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: background-color 0.3s;
}

.current-language:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lang-icon {
    margin-right: 6px;
    font-size: 16px;
}

.dropdown-arrow {
    margin-left: 8px;
    font-size: 10px;
    transition: transform 0.3s;
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 1000;
}

.language-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-item {
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s;
}

.language-item:hover {
    background-color: #f0f0f0;
}

.language-item.active {
    background-color: #e6f7ff;
    color: #1890ff;
    font-weight: 500;
}

/* For smaller screens */
@media (max-width: 768px) {
    .language-selector {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 10px;
        text-align: center;
    }
    
    .current-language {
        justify-content: center;
        margin: 0 auto;
        display: inline-flex;
    }
    
    .language-dropdown-menu {
        right: 50%;
        transform: translateX(50%) translateY(-10px);
    }
    
    .language-dropdown-menu.show {
        transform: translateX(50%) translateY(0);
    }
}

/* Responsive styling for FAQ */
@media (max-width: 768px) {
    .faq-section {
        padding: 3rem 1rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    html[lang="zh"] .faq-question h3 {
        font-size: 1rem;
    }
    
    html[lang="zh"] .faq-answer p {
        font-size: 0.95rem;
    }
    
    html[lang="zh"] .faq-section .faq-question {
        padding: 1.2rem;
    }
    
    html[lang="zh"] .faq-section .faq-item.active .faq-answer {
        padding: 0.8rem 1.2rem 1.2rem;
    }
}

/* 修复中文FAQ标题布局问题 */
html[lang="zh"] .faq-section .container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

html[lang="zh"] .faq-section h2 {
    display: block;
    text-align: center;
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
    color: #2196F3;
    font-size: 2rem;
}

html[lang="zh"] .faq-section .faqs {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* 强制中文FAQ标题居中显示 */
html[lang="zh"] .faq-section .container > h2 {
    /* 强制居中 */
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    position: relative !important;
    display: block !important;
    max-width: 90%;
}

/* 修复常见问题标题下方蓝线 */
html[lang="zh"] .faq-section h2::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 120px !important;
    height: 4px !important;
    bottom: -15px !important;
    background-color: #2196F3 !important;
    border-radius: 2px !important;
    display: block !important;
}

/* 修复整个FAQ容器布局 */
html[lang="zh"] .faq-section .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* 响应式样式适配 */
@media (max-width: 768px) {
    html[lang="zh"] .faq-section .container > h2 {
        font-size: 1.8rem !important;
        margin-bottom: 3.5rem !important;
    }
    
    html[lang="zh"] .faq-section h2::after {
        width: 100px !important;
        height: 3px !important;
    }
}

@media (max-width: 480px) {
    html[lang="zh"] .faq-section .container > h2 {
        font-size: 1.6rem !important;
        margin-bottom: 3rem !important;
    }
    
    html[lang="zh"] .faq-section h2::after {
        width: 80px !important;
    }
}

/* 防止标题被其他元素覆盖 */
html[lang="zh"] .faq-section {
    position: relative;
    z-index: 1;
}

html[lang="zh"] .faq-section h2 {
    z-index: 2;
    position: relative;
}

/* 强制移除可能的浮动影响 */
html[lang="zh"] .faq-section .container::before,
html[lang="zh"] .faq-section .container::after {
    content: "";
    display: table;
    clear: both;
}

/* 中文FAQ标题居中修复 - 使用更高优先级 */
body[lang="zh"] .faq-section > .container > h2,
html[lang="zh"] .faq-section > .container > h2,
html[lang="zh"] .faq-section .container h2 {
    display: block !important;
    margin: 0 auto 3rem auto !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

/* 修复蓝色下划线 */
body[lang="zh"] .faq-section > .container > h2::after,
html[lang="zh"] .faq-section > .container > h2::after,
html[lang="zh"] .faq-section .container h2::after {
    content: '' !important;
    display: block !important;
    width: 120px !important;
    height: 4px !important;
    background-color: #2196F3 !important;
    position: absolute !important;
    bottom: -15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 2px !important;
}

/* 修复标题文字自身 */
body[lang="zh"] .faq-section > .container > h2 *,
html[lang="zh"] .faq-section > .container > h2 *,
html[lang="zh"] .faq-section .container h2 * {
    text-align: center !important;
}

/* 为替换的result label和popup-result添加样式 */
.result-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    margin-bottom: 0.5rem;
}

#popup-result {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
    text-align: center;
    color: #333;
}

/* 为模态框标题添加样式 */
.modal-heading {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
}

/* 为轮盘标题文本添加样式 */
.wheel-title-text {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    text-align: center;
    color: #333;
}
