:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-main: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --input-bg: #f8fafc;
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --input-bg: #1e293b;
}

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

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 40px 20px;
    transition: background-color 0.3s, color 0.3s;
}

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

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-radius: 50%;
    filter: blur(80px);
    animation: move 20s infinite alternate;
}

.blob-1 { top: -100px; right: -100px; }
.blob-2 { bottom: -100px; left: -100px; animation-delay: -5s; }
.blob-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-duration: 30s; }

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

.container {
    max-width: 700px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid white;
    border-radius: 24px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
}

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

.q-num {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
}

.sub-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Custom Radio & Checkbox */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.options.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.radio-container, .checkbox-container {
    display: block;
    position: relative;
    padding: 15px 15px 15px 45px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    user-select: none;
    color: var(--text-main);
}

.radio-container:hover, .checkbox-container:hover {
    background: var(--bg-main);
    border-color: var(--primary);
}

.radio-container input, .checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark, .check {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #cbd5e1;
    transition: all 0.2s;
}

.checkmark { border-radius: 50%; }
.check { border-radius: 4px; }

.radio-container input:checked ~ .checkmark,
.checkbox-container input:checked ~ .check {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after, .check:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .checkmark:after,
.checkbox-container input:checked ~ .check:after {
    display: block;
}

.radio-container .checkmark:after {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.checkbox-container .check:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.other-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.full-width { grid-column: span 2; }

.inline-text-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.inline-text-input:focus {
    border-color: var(--primary);
}

textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    background: #f8fafc;
}

textarea:focus {
    border-color: var(--primary);
}

/* NPS Scale */
.nps-scale {
    margin-top: 20px;
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.nps-options {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

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

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

.nps-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.nps-item:hover .nps-box {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.nps-item input:checked ~ .nps-box {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.submit-area {
    text-align: center;
    padding-bottom: 50px;
}

.submit-btn {
    background: linear-gradient(to right, #6366f1, #4f46e5);
    color: white;
    border: none;
    padding: 18px 60px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.6);
}

.footer-note {
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-main);
}

/* Admin Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-container {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th {
    background: var(--bg-main);
    text-align: left;
    padding: 15px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

tr:hover td { 
    background: var(--bg-main); 
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score-badge {
    background: #e0e7ff;
    color: var(--primary);
}

[data-theme="dark"] .score-badge {
    background: #312e81;
    color: #e0e7ff;
}

.date { color: var(--text-muted); font-size: 0.8rem; }

.download-btn {
    display: inline-block;
    background: #10b981;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    height: 350px;
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-main);
    text-align: center;
}

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

@media (max-width: 1200px) {
    .container { max-width: 95%; }
}
