/* Global Styles */
:root {
    --primary-color: #4a6bff;
    --primary-hover: #3a5bef;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #28a745;
    --card-bg: #ffffff;
    --animation-speed: 0.3s;
    --light-bg: #f5f7fa;
    --muted-text: #666;
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

/* Language Toggle Styles */
.language-toggle {
    position: absolute;
    top: 0;
    right: 1rem;
    z-index: 10;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Instructions Section Styles */
.instructions-section .card {
    margin-bottom: 2rem;
}

.instructions-content p {
    margin-bottom: 0.8rem;
}

/* Site Navigation Styles */
.site-navigation {
    background-color: var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    overflow: hidden;
}

.site-navigation ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.site-navigation li {
    position: relative;
}

.site-navigation li.active {
    background-color: rgba(74, 107, 255, 0.1);
}

.site-navigation li.active a {
    color: var(--primary-color);
    font-weight: 500;
}

.site-navigation a {
    display: block;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--animation-speed);
    white-space: nowrap;
}

.site-navigation a:hover {
    color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.05);
}

.disclaimer {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: rgba(255, 247, 230, 0.7);
    border: 1px solid rgba(255, 193, 7, 0.3);
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.disclaimer::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1.5rem;
    color: rgba(255, 153, 0, 0.8);
}

.disclaimer p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    padding-left: 3rem;
    text-align: justify;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.title-container {
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
}

.title-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.title-chinese {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.title-english {
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: #666;
    letter-spacing: 1px;
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform var(--animation-speed), box-shadow var(--animation-speed);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 1.2rem 1.5rem;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 0.8rem;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* File Upload Styles */
.file-upload {
    position: relative;
    width: 100%;
}

.file-upload-placeholder {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--animation-speed), background-color var(--animation-speed);
}

.file-upload-placeholder:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.03);
}

.file-upload-placeholder i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.file-upload-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.file-format-hint {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(74, 107, 255, 0.05);
    margin-top: 1rem;
}

.file-details {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.file-details i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 0.8rem;
}

.participant-count {
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Draw Section Styles */
.winner-count-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.winner-count-container label {
    margin-right: 1rem;
    font-weight: 500;
}

.number-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.number-input button {
    background-color: var(--secondary-color);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color var(--animation-speed);
}

.number-input button:hover {
    background-color: #e9ecef;
}

.number-input input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 1.1rem;
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--animation-speed);
    border: none;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
}

/* Results Section Styles */
.winners-container {
    margin-bottom: 1.5rem;
}

.winner-item {
    background-color: rgba(74, 107, 255, 0.05);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
    text-align: center;
}

.winner-item i {
    color: gold;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.winner-name {
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

/* Content Pages Styles */
.content-section {
    margin-bottom: 2rem;
}

.guide-content, .policy-content, .faq-content, .contact-content {
    color: var(--text-color);
}

/* Guide Page Styles */
.guide-section {
    margin-bottom: 2rem;
}

.guide-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.guide-section p, .guide-section ul, .guide-section ol {
    margin-bottom: 1rem;
}

.guide-section ul, .guide-section ol {
    padding-left: 1.5rem;
}

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

.example-box {
    background-color: rgba(74, 107, 255, 0.05);
    border: 1px solid rgba(74, 107, 255, 0.1);
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

.example-box h5 {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.example-box pre {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.5rem;
    border-radius: 3px;
    overflow-x: auto;
}

/* Policy Page Styles */
.policy-section {
    margin-bottom: 1.5rem;
}

.policy-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.policy-section p, .policy-section ul {
    margin-bottom: 1rem;
}

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

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

/* FAQ Page Styles */
/* Features Section Styles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform var(--animation-speed), box-shadow var(--animation-speed);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

.feature-item p {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Use Cases Section Styles */
.use-cases-content {
    padding: 0.5rem 0;
}

.use-cases-content > p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.use-case-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all var(--animation-speed);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.use-case-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.use-case-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

.use-case-item p {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Testimonials Section Styles */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.testimonial-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all var(--animation-speed);
}

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

.testimonial-content {
    margin-bottom: 1.2rem;
    position: relative;
}

.testimonial-content p {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
}

.testimonial-content::before {
    content: '\201C';
    font-size: 3rem;
    color: rgba(74, 107, 255, 0.2);
    position: absolute;
    top: -1.5rem;
    left: -0.5rem;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
}

.author-info h5 {
    font-size: 1rem;
    margin: 0;
    color: var(--text-color);
}

.author-info p {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin: 0;
}

/* About Tool Section Styles */
.about-content {
    padding: 0.5rem 0;
}

.about-content p {
    margin-bottom: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
}

.about-content h4 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.philosophy-list {
    list-style-type: none;
    padding-left: 0.5rem;
    margin-bottom: 1.5rem;
}

.philosophy-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.philosophy-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0.2rem;
}

.algorithm-steps {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.algorithm-steps li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

/* FAQ Preview Section Styles */
.faq-preview-content {
    padding: 0.5rem 0;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    position: relative;
    cursor: pointer;
    padding-right: 1.5rem;
}

.faq-question::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary-color);
    transition: transform var(--animation-speed);
}

.faq-answer {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.view-more-faq {
    text-align: center;
    margin-top: 2rem;
}

/* Contact Page Styles */
.contact-intro {
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-method {
    flex: 1;
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform var(--animation-speed), box-shadow var(--animation-speed);
}

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

.contact-method i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.contact-method h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

.contact-method p {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform var(--animation-speed);
}

.social-icon:hover {
    transform: scale(1.1);
}

.contact-form-container {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.contact-form-container h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
}

.contact-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--animation-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-success {
    text-align: center;
    padding: 2rem;
}

.form-success i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    display: block;
}

.form-success p {
    font-size: 1.1rem;
    color: var(--text-color);
}

.faq-link {
    text-align: center;
    margin-top: 1rem;
    color: var(--muted-text);
    font-size: 0.95rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .features-grid,
    .use-cases-grid,
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    .feature-item,
    .use-case-item,
    .testimonial-item {
        padding: 1.2rem;
    }
    
    .about-content h4 {
        font-size: 1.2rem;
    }
    
    .faq-question {
        font-size: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .language-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    header {
        margin-top: 4rem;
        margin-bottom: 2rem;
    }
    
    .title-chinese {
        font-size: 1.8rem;
    }
    
    .title-english {
        font-size: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1.2rem;
    }
    
    .file-upload-placeholder {
        padding: 2rem 1rem;
    }
    
    .file-upload-placeholder i {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
    }
    
    .disclaimer h4 {
        font-size: 1rem;
    }
    
    .disclaimer p {
        font-size: 0.9rem;
    }
    
    .site-navigation ul {
        flex-direction: column;
    }
    
    .site-navigation a {
        padding: 0.8rem 1rem;
        text-align: center;
    }
    
    .contact-methods {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-form-container {
        margin-top: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

*/
.faq-question {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    position: relative;
    cursor: pointer;
    padding-right: 1.5rem;
}

.faq-question::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary-color);
    transition: transform var(--animation-speed);
}

.faq-answer {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.view-more-faq {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .language-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    header {
        margin-top: 4rem;
        margin-bottom: 2rem;
    }
    
    .title-chinese {
        font-size: 1.8rem;
    }
    
    .title-english {
        font-size: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1.2rem;
    }
    
    .file-upload-placeholder {
        padding: 2rem 1rem;
    }
    
    .file-upload-placeholder i {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
    }
    
    .disclaimer h4 {
        font-size: 1rem;
    }
    
    .disclaimer p {
        font-size: 0.9rem;
    }
    
    .site-navigation ul {
        flex-direction: column;
    }
    
    .site-navigation a {
        padding: 0.8rem 1rem;
        text-align: center;
    }
    
    .contact-methods {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-form-container {
        margin-top: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}