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

body {
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    padding: 30px 0;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.section {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.intro-card,
.form-card,
.complete-card,
.waiting-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.intro-card h2,
.form-card h2,
.complete-card h2,
.waiting-card h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #333;
}

.intro-card p,
.complete-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.intro-card ul {
    list-style: none;
    margin: 20px 0;
}

.intro-card li {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 8px;
    color: #555;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.gender-selector {
    display: flex;
    gap: 15px;
}

.gender-btn {
    flex: 1;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gender-btn:hover {
    border-color: #667eea;
}

.gender-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.gender-btn[data-gender="MALE"].selected {
    border-color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
}

.gender-btn[data-gender="FEMALE"].selected {
    border-color: #ea4335;
    background: rgba(234, 67, 53, 0.1);
}

.gender-icon {
    font-size: 2rem;
}

.gender-btn[data-gender="MALE"] .gender-icon {
    color: #4285f4;
}

.gender-btn[data-gender="FEMALE"] .gender-icon {
    color: #ea4335;
}

.gender-btn .already-selected {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

.gender-btn:disabled {
    background: #f5f5f5;
    border-color: #ddd;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.category-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.questions-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.question-card {
    margin-bottom: 25px;
}

.question-card:last-child {
    margin-bottom: 0;
}

.question-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

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

.option-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.option-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.option-text {
    flex: 1;
    color: #333;
    line-height: 1.4;
}

.short-answer-input,
.number-answer-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.short-answer-input:focus,
.number-answer-input:focus {
    outline: none;
    border-color: #667eea;
}

.number-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-input-wrapper .number-answer-input {
    flex: 1;
    text-align: right;
    font-weight: 600;
}

.number-unit {
    font-size: 1rem;
    color: #666;
    white-space: nowrap;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-buttons .btn {
    flex: 1;
}

.complete-icon,
.waiting-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
}

.complete-icon {
    color: #34a853;
}

.waiting-icon {
    font-size: 3rem;
}

.share-link-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.share-link {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    background: #f8f9fa;
}

.hint {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .intro-card,
    .form-card,
    .complete-card,
    .questions-container {
        padding: 20px;
    }

    .gender-btn {
        padding: 15px;
    }
}
