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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', 'Noto Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.student-info {
    background: #f0f4ff;
    border: 2px solid #667eea;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 10px;
}

.student-info h2 {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.info-field {
    margin-bottom: 15px;
}

.info-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-field input[type="text"],
.info-field input[type="email"],
.info-field input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #667eea;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Noto Sans TC', 'Noto Sans', sans-serif;
}

.info-field input[type="text"]:focus,
.info-field input[type="email"]:focus,
.info-field input[type="tel"]:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.required {
    color: #e74c3c;
    font-weight: 700;
}

.optional {
    color: #95a5a6;
    font-weight: 400;
    font-size: 12px;
}

.question-block {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.question-block:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.question-number {
    color: #667eea;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.question-text {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

.question-text-en {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 14px;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Noto Sans TC', 'Noto Sans', sans-serif;
    transition: border-color 0.3s;
    margin-top: 10px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.multiple-choice {
    margin-top: 15px;
}

.choice-option {
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.choice-option:hover {
    background: #f0f0f0;
    border-color: #667eea;
}

.choice-option.selected {
    background: #e8eeff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.choice-option input[type="radio"] {
    margin-right: 10px;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px auto;
    flex-wrap: wrap;
}

.submit-btn, .export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Noto Sans TC', 'Noto Sans', sans-serif;
    cursor: pointer;
    transition: transform 0.2s;
}

.export-btn {
    background: linear-gradient(135deg, #52c234 0%, #2ecc71 100%);
}

.submit-btn:hover, .export-btn:hover {
    transform: scale(1.05);
}

.submit-btn:hover {
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.export-btn:hover {
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.submit-btn:disabled, .export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.points {
    color: #764ba2;
    font-weight: 700;
    font-size: 12px;
}

.three-part {
    margin-top: 15px;
}

.three-part label {
    display: block;
    font-weight: 600;
    color: #667eea;
    margin-top: 15px;
    margin-bottom: 5px;
}

.big-answer-box {
    min-height: 250px;
    font-family: 'Noto Sans', monospace;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.back-to-top.show {
    display: flex;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
    }

    .submit-btn, .export-btn {
        width: 100%;
        max-width: 300px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}