* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: url('https://clairevoyantdemo.wordpress.com/wp-content/uploads/2025/05/9cc2e-post-img-4-1.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    text-align: center;
    max-width: 800px;
    width: 90%;
}

header h1 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header p {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* 语言选择区域 */
.language-selection {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.language-selection h3 {
    color: #495057;
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: bold;
}

.language-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

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

.language-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b6b;
}

.language-option input[type="checkbox"]:checked + span {
    color: #ff6b6b;
    font-weight: bold;
}

.card-container {
    margin: 30px 0;
}

.word-card {
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    border-radius: 15px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid #ff6b6b;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.word-card .simplified-chinese,
.word-card .traditional-chinese {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}
.word-card .word-text {
    font-size: 4em;
    font-weight: bold;
    color: #d63031;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: bounce 2s ease-in-out infinite;
}

.word-card .pinyin-text,
.word-card .cantonese-text {
    font-size: 1.2em;
    color: #666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 5px;
}

.word-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.simplified-chinese {
    font-size: 4em;
    font-weight: bold;
    color: #d63031;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.traditional-chinese {
    font-size: 3em;
    color: #6c5ce7;
    margin: 15px 0;
    font-weight: bold;
}

.english {
    font-size: 2.5em;
    color: #00b894;
    margin: 15px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 字卡选择区域 */
.word-selection {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.word-selection h3 {
    color: #495057;
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: bold;
}

.word-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.word-option {
    position: relative;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.word-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.word-content {
    padding: 20px;
    text-align: center;
}

/* 字库选择样式 */
.wordbank-selection {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.wordbank-selection h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.wordbank-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.wordbank-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    background: white;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 500;
}

.wordbank-option:hover {
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
}

.wordbank-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #ff6b6b;
}

.wordbank-option input[type="radio"]:checked + span {
    color: #ff6b6b;
    font-weight: 600;
}

.wordbank-option:has(input[type="radio"]:checked) {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.simplified-text {
    font-size: 2.5em;
    font-weight: bold;
    color: #d63031;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.traditional-text {
    font-size: 2em;
    color: #6c5ce7;
    margin: 10px 0;
    font-weight: bold;
}

.english-text {
    font-size: 1.5em;
    color: #00b894;
    margin: 10px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.option-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 选择状态样式 */
.word-option.selected {
    border-color: #28a745;
    transform: scale(1.05);
}

.word-option.correct {
    border-color: #28a745;
    background: #d4edda;
    animation: correctPulse 0.6s ease-in-out;
}

.word-option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    animation: incorrectShake 0.6s ease-in-out;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 反馈信息样式 */
.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.feedback.neutral {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

.controls {
    margin: 30px 0;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.play-btn, .next-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-weight: bold;
}

.play-btn:hover, .next-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.play-btn:active, .next-btn:active {
    transform: translateY(0);
}

.next-btn {
    background: linear-gradient(45deg, #00b894, #00a085);
}

.next-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.progress {
    font-size: 1.2em;
    color: #666;
    margin: 20px 0;
    font-weight: bold;
}

.settings {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.auto-play-btn, .pause-btn {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.auto-play-btn:hover, .pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}


/* 登录界面样式 */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://clairevoyantdemo.wordpress.com/wp-content/uploads/2025/05/9cc2e-post-img-4-1.jpg') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
}

.login-box h1 {
    color: #ff6b6b;
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.login-box p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* 第三方登录按钮样式覆盖 */
#g_id_onload,
.g_id_signin {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Google登录按钮容器样式 */
.g_id_signin {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* 确保Google按钮与自定义按钮样式一致 */
.g_id_signin iframe {
    width: 100% !important;
    height: 50px !important;
    border-radius: 50px !important;
}

/* 登录选项容器样式调整 */
.login-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

/* 确保Google按钮容器在登录选项中正确显示 */
.login-options .g_id_signin {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.google-btn {
    background: linear-gradient(45deg, #4285f4, #34a853);
    color: white;
}

.guest-btn {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-icon {
    font-size: 1.2em;
}

/* 用户信息样式 */
.header-content {
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.1em;
}

.logout-btn {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* 字库选择页面样式 */
.wordbank-selection-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://clairevoyantdemo.wordpress.com/wp-content/uploads/2025/05/9cc2e-post-img-4-1.jpg') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.wordbank-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.wordbank-header {
    margin-bottom: 30px;
}

.wordbank-header h1 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.wordbank-header p {
    color: #666;
    font-size: 1.2em;
}

.wordbank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.wordbank-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.wordbank-item:hover {
    border-color: #ff6b6b;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
}

.wordbank-item.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.wordbank-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.wordbank-item.disabled::after {
    content: "🔒";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2em;
}

.wordbank-item h3 {
    color: #495057;
    font-size: 1.2em;
    margin-bottom: 8px;
    font-weight: bold;
}

.wordbank-item p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.wordbank-item .word-count {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 0.9em;
}

.wordbank-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* 当前字库显示 */
.current-wordbank {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 20px;
    margin-bottom: 20px;
    font-size: 1em;
    color: #495057;
}

.current-wordbank span:first-child {
    color: #666;
}

.current-wordbank span:last-child {
    color: #ff6b6b;
    font-weight: bold;
}

/* 更换字库按钮 */
.btn-icon {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* 主应用界面 */
.main-app {
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* 第三方登录按钮样式覆盖 */
#g_id_onload,
.g_id_signin {
    margin: 10px 0;
}




/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .simplified-chinese {
        font-size: 3em;
    }
    
    .traditional-chinese {
        font-size: 2.5em;
    }
    
    .english {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .play-btn, .next-btn {
        width: 200px;
    }
    
    .word-options {
        flex-direction: column;
        align-items: center;
    }
    
    .word-option {
        width: 100%;
        max-width: 300px;
    }

    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h1 {
        font-size: 1.8em;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
    }

    .wordbank-container {
        padding: 20px;
        margin: 10px;
    }
    
    .wordbank-header h1 {
        font-size: 2em;
    }
    
    .wordbank-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
    
    .wordbank-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 200px;
    }

    .kofi-button {
        font-size: 1em;
        padding: 10px 20px;
    }
    
    .kofi-icon {
        width: 20px;
        height: 20px;
    }

    .feedback-modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .feedback-option-btn {
        font-size: 0.9em;
        padding: 10px 15px;
    }
}

/* 加载动画 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .word-card {
    animation: pulse 1s ease-in-out infinite;
}

/* 赞赏支持区域 - 方案1 */
.support-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    text-align: center;
}

.support-text {
    font-size: 1.1em;
    color: #495057;
    margin-bottom: 20px;
    font-weight: 500;
}

.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FF5E5B;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 94, 91, 0.3);
}

.kofi-button:hover {
    background: #FF4542;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 94, 91, 0.4);
}

.kofi-icon {
    width: 24px;
    height: 24px;
    animation: bounce 2s infinite;
}

/* 反馈模态框样式 */
.feedback-modal-content h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.feedback-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.feedback-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(23, 162, 184, 0.3);
}

.feedback-option-btn:hover {
    background: linear-gradient(45deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.feedback-close-btn {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.feedback-close-btn:hover {
    background: linear-gradient(45deg, #495057, #343a40);
    transform: translateY(-1px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

