:root {
    --bg-color: #0d0e15;
    --text-primary: #ffffff;
    --text-muted: #8b92a5;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #d946ef);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#app {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--input-bg);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Question Container */
.question-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.question-block {
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    pointer-events: none;
}

.question-block.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    position: relative;
}

.question-block.exiting {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
    position: absolute;
}

/* Typography */
.question-number {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-title {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.question-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Inputs */
.input-wrapper {
    position: relative;
    width: 100%;
    margin-top: 2rem;
}

.input-text {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--input-border);
    color: var(--text-primary);
    font-size: 2rem;
    font-family: inherit;
    padding: 0.5rem 0;
    outline: none;
    transition: border-color 0.3s ease;
}

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

.input-text::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.error-msg {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-size: 1rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

/* Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.option-item {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.option-item.selected {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.option-key {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.option-item.selected .option-key {
    background: var(--accent);
    color: white;
    border-color: transparent;
}

.option-label {
    font-size: 1.25rem;
}

/* Big Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: white;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    padding: 1rem 2.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 2rem;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Navigation Helpers */
.nav-helpers {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 100;
}

.nav-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.nav-hint strong {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.nav-buttons {
    display: flex;
    background: var(--input-bg);
    border-radius: 6px;
    overflow: hidden;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Final Summary */
.summary-container {
    text-align: left;
}

.summary-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 1rem;
}

.summary-question {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.summary-answer {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent);
}

/* Utilities */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* -------------------------------------
   Dashboard UI Styles
-------------------------------------- */
.dashboard-view {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    height: 100vh;
}

/* Override body overflow when in dashboard */
body.is-dashboard {
    overflow: auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-header p {
    color: var(--text-muted);
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dashboard-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.dashboard-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.question-builder-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.question-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--input-border);
}

.question-type-badge {
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-remove:hover {
    text-decoration: underline;
}

.add-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--input-border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: var(--accent);
}

.publish-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--input-border);
}

.publish-result {
    margin-top: 2rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.link-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.btn-secondary {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.preview-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-block;
}

.preview-link:hover {
    text-decoration: underline;
}

.builder-options {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--input-border);
}

.builder-option-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
