:root {
    /* Default Dark Theme Variables */
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --bg-main: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #ec4899;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.07);
}

[data-theme="light"] {
    --bg-main: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-main: #1e293b;
    --text-dim: #64748b;
    --card-bg: rgba(0, 0, 0, 0.03);
    --card-hover: rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 20px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Animated Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.5;
}

[data-theme="light"] .background-blobs { opacity: 0.2; }

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #3b82f6;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 100px) scale(1.1); }
}

/* Glass Container */
.survey-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 700px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

.survey-header {
    margin-bottom: 32px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p#surveySubtitle {
    color: var(--text-dim);
    font-size: 1rem;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.step.active {
    display: block;
}

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

.question-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

.question-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Option Cards */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.option-card {
    position: relative;
    cursor: pointer;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.card-content {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.option-card:hover .card-content {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-card input:checked + .card-content {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.option-card.checkbox input:checked + .card-content::after {
    content: '✓';
    float: right;
    color: var(--primary);
    font-weight: bold;
}

/* Other Input */
.other-option input, .input-container textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-family: inherit;
    transition: all 0.2s ease;
}

.other-option input:focus, .input-container textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
}

.input-container textarea {
    min-height: 120px;
    resize: vertical;
}

/* Rating Slider */
.rating-container {
    padding: 20px 0;
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.rating-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.1s;
}

.rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.rating-value {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-top: 20px;
    color: var(--primary);
}

/* Success State */
.success-content {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.success-content p {
    color: var(--text-dim);
    margin-bottom: 32px;
}

/* Footer Buttons */
.survey-footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

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

@media (max-width: 600px) {
    .survey-container {
        padding: 24px;
    }
    h1 { font-size: 1.5rem; }
}
