:root, [data-theme="dark"] {
    --bg-base: #0a0e1a;
    --bg-card: rgba(18, 24, 43, 0.78);
    --bg-card-hover: rgba(28, 38, 68, 0.9);
    --bg-input: rgba(13, 19, 36, 0.9);
    --border-color: rgba(99, 102, 241, 0.2);
    --border-active: #6366f1;
    --border-focus: #818cf8;
    --text-main: #f1f5f9;
    --text-title: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --opt-bg: rgba(255, 255, 255, 0.03);
    --opt-bg-hover: rgba(255, 255, 255, 0.07);
    --opt-border: rgba(255, 255, 255, 0.08);
    --nps-bg: rgba(255, 255, 255, 0.04);
    --nps-border: rgba(255, 255, 255, 0.1);
    --shadow-card: 0 12px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
    --glow-opacity: 0.45;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.88);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-input: #ffffff;
    --border-color: rgba(99, 102, 241, 0.22);
    --border-active: #4f46e5;
    --border-focus: #6366f1;
    --text-main: #1e293b;
    --text-title: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    --accent-cyan: #0891b2;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --opt-bg: rgba(241, 245, 249, 0.7);
    --opt-bg-hover: rgba(238, 242, 255, 0.95);
    --opt-border: rgba(203, 213, 225, 0.8);
    --nps-bg: rgba(241, 245, 249, 0.8);
    --nps-border: rgba(203, 213, 225, 0.9);
    --shadow-card: 0 10px 30px -5px rgba(99, 102, 241, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
    --glow-opacity: 0.2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    padding: 40px 20px 80px;
    position: relative;
    overflow-x: hidden;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Background Ambient Glows */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: var(--glow-opacity);
    transition: opacity var(--transition-fast);
}
.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4f46e5, transparent 70%);
    top: -100px;
    left: -100px;
}
.bg-glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #9333ea, transparent 70%);
    bottom: 50px;
    right: -150px;
}
.bg-glow-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 40%;
    left: 60%;
}

/* Floating Theme Switcher */
.theme-switch-wrapper {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-fast);
    outline: none;
}

.theme-toggle-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.theme-icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform var(--transition-bounce);
}

[data-theme="dark"] .sun-icon { display: inline-block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: inline-block; }

.container {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 36px;
    padding: 0 10px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary-light);
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

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

.main-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-title);
    margin-bottom: 12px;
}

[data-theme="dark"] .main-title {
    background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .main-title {
    background: linear-gradient(135deg, #0f172a 40%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.02rem;
    color: var(--text-muted);
    line-height: 1.65;
    word-break: keep-all;
    max-width: 580px;
    margin: 0 auto 28px;
}

/* Progress Bar */
.progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
}
[data-theme="dark"] .progress-bar-bg {
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

/* Question Cards */
.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.question-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.question-card.active-focus {
    border-color: var(--border-active);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

.question-card.has-error {
    border-color: var(--accent-rose) !important;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.q-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.q-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.12);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.q-title-wrap {
    flex: 1;
}

.q-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-title);
    margin-bottom: 6px;
}

.req-star {
    color: var(--accent-rose);
    font-weight: 700;
}

.q-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Grid & Option Items */
.options-grid {
    display: grid;
    gap: 12px;
}
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-1 {
    grid-template-columns: 1fr;
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.option-item {
    position: relative;
    cursor: pointer;
    display: block;
}

.option-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--opt-bg);
    border: 1px solid var(--opt-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.option-item:hover .option-box {
    background: var(--opt-bg-hover);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
}

.option-item input:checked + .option-box {
    background: rgba(99, 102, 241, 0.14);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.opt-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.opt-label {
    flex: 1;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--text-main);
}

.opt-label small {
    color: var(--text-muted);
    font-size: 0.82rem;
    display: block;
    margin-top: 2px;
}

.check-mark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.checkbox-item .check-mark {
    border-radius: 6px;
}

.option-item input:checked + .option-box .check-mark {
    border-color: var(--primary);
    background: var(--primary);
}

.option-item input:checked + .option-box .check-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Rating styles pills */
.rating-style .option-box {
    padding: 16px 20px;
}
.tag-pill {
    font-size: 0.76rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    margin-right: 8px;
}
.tag-great { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.tag-good { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.tag-neutral { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }
.tag-warn { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.tag-danger { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

/* Other text inputs */
.other-input-wrap {
    margin-top: 14px;
    animation: fadeIn 0.3s ease;
}

.text-input, .text-area {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-main);
    font-size: 0.98rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.text-input:focus, .text-area:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.3);
}

.text-area {
    resize: vertical;
    min-height: 100px;
}

.textarea-wrap {
    position: relative;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 6px;
}

/* NPS Scale 0 - 10 */
.nps-container {
    padding: 10px 0;
}

.nps-scale {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 12px;
}

.nps-item {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.nps-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    min-height: 48px;
    background: var(--nps-bg);
    border: 1px solid var(--nps-border);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition-bounce);
}

.nps-item:hover .nps-btn {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-4px);
}

.nps-item input:checked + .nps-btn {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
    transform: translateY(-4px) scale(1.08);
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-bottom: 16px;
}

.nps-feedback-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    animation: fadeIn 0.3s ease;
}

.nps-selected-badge strong {
    color: var(--primary-light);
    font-size: 1.05rem;
}

.nps-comment {
    color: var(--text-main);
    font-weight: 500;
}

@media (max-width: 600px) {
    .nps-scale {
        flex-wrap: wrap;
        gap: 8px;
    }
    .nps-item {
        flex: 0 0 calc(18% - 4px);
    }
    .nps-btn {
        aspect-ratio: auto;
        padding: 10px 0;
        font-size: 1rem;
    }
    .nps-feedback-box {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

/* Errors */
.field-error {
    color: var(--accent-rose);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    display: none;
}
.field-error.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Submit Card */
.submit-card {
    text-align: center;
    margin-top: 36px;
    padding: 20px;
}

.submit-note {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

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

.btn-submit {
    min-width: 240px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.15);
}

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

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.submission-error {
    margin-top: 14px;
    padding: 12px 20px;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid var(--accent-rose);
    border-radius: var(--radius-md);
    color: var(--accent-rose);
    font-size: 0.92rem;
    font-weight: 500;
}

/* Success Card */
.success-card {
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 50px 30px;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.checkmark-icon {
    color: #fff;
    font-size: 2.4rem;
    font-weight: 800;
}

.success-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 12px;
}

.success-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Inactive Card */
.inactive-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px 24px;
    text-align: center;
}
.inactive-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Footer */
.footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-links a:hover {
    color: var(--primary-light);
}

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

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
