/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Korean text styling - displayed below English with clear line break */
.ko {
    display: block;
    color: #888;
    font-size: 0.8em;
    font-weight: 400;
    margin-top: 12px;
    line-height: 1.5;
}

/* For inline elements like buttons */
.btn .ko {
    font-size: 0.7em;
    margin-top: 8px;
    color: rgba(255,255,255,0.8);
}

/* For headings */
h1 .ko {
    font-size: 0.55em;
    margin-top: 16px;
    color: #777;
}

h2 .ko, h3 .ko {
    font-size: 0.7em;
    margin-top: 8px;
}

/* For list items - more spacing */
li .ko {
    margin-top: 8px;
    margin-bottom: 16px;
    padding-left: 0;
}

/* For labels */
label .ko {
    font-size: 0.8em;
    margin-top: 6px;
    color: #999;
}

/* For field notes */
.field-note .ko {
    margin-top: 6px;
}

/* For paragraphs */
p .ko {
    margin-top: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.container.wide {
    max-width: 1200px;
}

/* Typography */
h1 {
    font-size: 28px;
    margin-bottom: 24px;
    color: #1a1a2e;
    text-align: center;
}

h2 {
    font-size: 18px;
    color: #555;
}

h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

/* Consent Screen */
.consent-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.consent-box ul {
    margin: 16px 0;
    padding-left: 24px;
}

.consent-box li {
    margin-bottom: 8px;
}

.consent-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.consent-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.consent-check label {
    cursor: pointer;
    font-weight: 500;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.field-note {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

/* Instructions */
.instructions-box {
    background: #f0f4ff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.instructions-box ul {
    margin: 16px 0;
    padding-left: 24px;
}

.instructions-box li {
    margin-bottom: 12px;
}

.instructions-box .note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d0d8f0;
    font-style: italic;
    color: #666;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Bar */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 10%;
}

.progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

/* Chat Panels */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.chat-panel {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}

.panel-label {
    background: #e8eaf6;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    color: #3f51b5;
}

.chat-content {
    padding: 20px;
    min-height: 350px;
    max-height: 500px;
    overflow-y: auto;
}

/* Chat Messages */
.chat-message {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-start;
}

.chat-message.agent {
    align-items: flex-end;
}

.message-sender {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 90%;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.5;
}

.chat-message.user .message-bubble {
    background: #e3f2fd;
    border-bottom-left-radius: 4px;
}

.chat-message.agent .message-bubble {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

/* GIF Container */
.gif-container {
    position: relative;
    width: 100%;
}

.gif-container video,
.gif-container img {
    width: 100%;
    border-radius: 8px;
}

.gif-container img.hidden {
    display: none;
}

.gif-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #5c6bc0;
}

.gif-placeholder.hidden {
    display: none;
}

.gif-placeholder .play-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.gif-placeholder .play-text {
    font-size: 14px;
    color: #7986cb;
}

.replay-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.replay-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gif-replay-btn {
    display: block;
    width: auto;
    margin: 16px auto;
    padding: 12px 32px;
}

/* Questions */
.questions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.question {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.question-text {
    margin-bottom: 12px;
    font-size: 14px;
}

.options {
    display: flex;
    gap: 12px;
}

.options.center {
    justify-content: center;
    margin-top: 24px;
}

.option-btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option-btn.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.attention-option {
    width: 100px;
    flex: none;
}

/* Attention Screen */
.attention-text {
    text-align: center;
    font-size: 18px;
    margin-bottom: 20px;
}

/* Complete Screen */
.complete-box {
    text-align: center;
}

.thank-you {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 24px;
}

.debrief {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.debrief p {
    margin-bottom: 12px;
}

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

/* Responsive */
@media (max-width: 900px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }

    .questions-container {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 22px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}
