/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

/* App Layout */
.app {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: #1a1a1a;
    border-right: 1px solid #2d2d2d;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #2d2d2d;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.logo svg {
    color: #4f46e5;
}

.tagline {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.sidebar-content {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.step-nav {
    padding: 0 24px;
    flex: 1;
}

.sidebar-actions {
    padding: 16px 24px;
    border-top: 1px solid #2d2d2d;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Category Items */
.step-item.category-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 8px;
}

.step-item.category-item:hover:not(.locked) {
    background: rgba(79, 70, 229, 0.1);
}

.step-item.category-item.active {
    background: rgba(79, 70, 229, 0.2);
    color: #4f46e5;
}

.step-item.category-item.completed {
    color: #10b981;
}

.step-item.category-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.step-item.category-item.locked:hover {
    background: rgba(239, 68, 68, 0.1);
}

.step-item.category-item.hidden {
    opacity: 0.5;
    pointer-events: none;
}

.step-item .step-number {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: #4f46e5;
    color: white;
}

.step-item.completed .step-number {
    background: #10b981;
    color: white;
}

.step-item.locked .step-number {
    background: #ef4444;
    color: white;
}

.category-icon {
    font-size: 16px;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lock-icon {
    font-size: 12px;
    opacity: 0.7;
}

.step-description {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.question-count {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Sub-questions */
.sub-questions {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid rgba(79, 70, 229, 0.3);
}

.sub-question {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
    color: #888;
    transition: all 0.2s ease;
}

.sub-question.current {
    color: #4f46e5;
    font-weight: 500;
}

.sub-question.completed {
    color: #10b981;
}

.sub-question-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #444;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sub-question.current .sub-question-dot {
    background: #4f46e5;
    width: 8px;
    height: 8px;
}

.sub-question.completed .sub-question-dot {
    background: #10b981;
}

.sub-question-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Main Content */
.main-content {
    flex: 1;
    background: #0a0a0a;
    overflow-y: auto;
    position: relative;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Form Display */
.form-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.form-header {
    margin-bottom: 48px;
}

.step-indicator {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.progress-percentage {
    color: #4f46e5;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
}

.progress-label {
    color: #888;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #2d2d2d;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 400px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Form Content */
.form-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.question-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.question {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.question.active {
    opacity: 1;
    transform: translateY(0);
}

.question-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.question-description {
    font-size: 16px;
    color: #888;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Completion Actions */
.completion-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* PRD Preview Styles */
.prd-preview {
    background: #1a1a1a;
    border: 1px solid #2d2d2d;
    border-radius: 12px;
    margin: 24px 0;
    overflow: hidden;
}

.prd-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.prd-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.prd-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.prd-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e0e0e0;
    background: transparent;
}

.btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn.copied:hover {
    background: #059669;
    border-color: #059669;
}

/* AI Enhancement Loading Styles */
.ai-loading {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #2d2d2d;
    border-radius: 12px;
    margin: 24px 0;
    overflow: hidden;
}

.ai-loading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.ai-loading-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-loading-content {
    padding: 40px 20px;
    text-align: center;
}

.ai-loading-message {
    color: #888;
    margin-bottom: 24px;
    font-size: 14px;
}

.ai-loading-bar {
    width: 100%;
    height: 4px;
    background: #2d2d2d;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.ai-loading-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.ai-loading-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ai-loading-steps {
    margin-top: 16px;
    font-size: 12px;
    color: #666;
}

.ai-loading-step {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.ai-loading-step.active {
    opacity: 1;
    color: #4f46e5;
}

/* Form Controls */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(45, 45, 45, 0.5);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #4f46e5;
    background: rgba(45, 45, 45, 0.8);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #666;
}

.form-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(45, 45, 45, 0.5);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 20px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 50px;
}

.form-select:focus {
    border-color: #4f46e5;
    background-color: rgba(45, 45, 45, 0.8);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(45, 45, 45, 0.3);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.radio-option:hover, .checkbox-option:hover {
    background: rgba(45, 45, 45, 0.5);
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.radio-option input, .checkbox-option input {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
    pointer-events: none; /* Prevent double-click handling */
}

.radio-option label, .checkbox-option label {
    cursor: pointer;
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    text-transform: none;
    letter-spacing: normal;
    flex: 1;
    pointer-events: none; /* Let parent handle clicks */
}

/* Form Navigation */
.form-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    margin-top: 40px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.btn-primary.disabled {
    animation: none !important;
}

.btn-primary.incomplete {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.5), rgba(124, 58, 237, 0.5));
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
    opacity: 0.7;
}

.btn-primary.incomplete:hover {
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(45, 45, 45, 0.8);
    color: #ffffff;
    border: 1px solid #3d3d3d;
}

.btn-secondary:hover {
    background: rgba(45, 45, 45, 1);
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Builder */
.form-builder {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
}

.builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2d2d2d;
}

.builder-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

.builder-actions {
    display: flex;
    gap: 12px;
}

.builder-content {
    flex: 1;
    display: flex;
    gap: 32px;
}

.builder-sidebar {
    width: 240px;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
}

.builder-sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
}

.question-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.question-type {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.question-type:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.question-type .icon {
    font-size: 16px;
}

.builder-templates {
    border-top: 1px solid #2d2d2d;
    padding-top: 24px;
}

.template-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-item {
    padding: 12px;
    background: rgba(45, 45, 45, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-item:hover {
    background: rgba(45, 45, 45, 0.5);
    transform: translateY(-1px);
}

.template-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
}

.template-description {
    font-size: 12px;
    color: #888;
}

.builder-main {
    flex: 1;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    overflow-y: auto;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Category Headers in Builder */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 8px;
}

.category-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-header .category-icon {
    font-size: 20px;
}

.category-info {
    display: flex;
    flex-direction: column;
}

.category-title {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

.category-description {
    font-size: 14px;
    color: #888;
}

.add-question-btn {
    flex-shrink: 0;
}

.question-item {
    background: rgba(45, 45, 45, 0.3);
    border: 1px solid #2d2d2d;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-left: 32px;
}

.question-item:hover {
    background: rgba(45, 45, 45, 0.5);
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.question-item.conditional {
    border-left: 4px solid #f59e0b;
}

.question-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.question-item-title {
    font-weight: 600;
    color: #ffffff;
}

.question-item-type {
    font-size: 12px;
    color: #888;
    background: rgba(45, 45, 45, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

.question-item-description {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.question-item-conditions {
    font-size: 12px;
    color: #f59e0b;
    font-style: italic;
}

/* Flow Designer */
.flow-designer {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
}

.flow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2d2d2d;
}

.flow-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

.flow-actions {
    display: flex;
    gap: 12px;
}

.flow-content {
    flex: 1;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

.flow-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: auto;
    padding: 40px;
}

.flow-node {
    position: absolute;
    background: rgba(45, 45, 45, 0.8);
    border: 2px solid #2d2d2d;
    border-radius: 12px;
    padding: 16px;
    min-width: 200px;
    cursor: move;
    transition: all 0.2s ease;
}

.flow-node:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.flow-node.start {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.flow-node.locked {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    opacity: 0.7;
}

.flow-node.category-node {
    min-width: 200px;
    text-align: center;
}

.flow-node-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.flow-node-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.flow-node-description {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
}

.flow-node-count {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.flow-connection {
    position: absolute;
    pointer-events: none;
}

.flow-line {
    stroke: #4f46e5;
    stroke-width: 2;
    fill: none;
    marker-end: url(#arrowhead);
}

/* Conditional Logic */
.conditional-logic {
    background: rgba(45, 45, 45, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.conditional-logic h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #f59e0b;
}

.condition-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.condition-group select,
.condition-group input {
    padding: 8px 12px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #2d2d2d;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #2d2d2d;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #2d2d2d;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(45, 45, 45, 0.5);
    color: #ffffff;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #2d2d2d;
}

/* Error Messages */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(8px);
    z-index: 2000;
    max-width: 400px;
    animation: errorSlideIn 0.3s ease-out;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .app {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .question-title {
        font-size: 24px;
    }
    
    .form-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-controls .btn {
        width: 100%;
        justify-content: center;
    }
    
    .completion-actions {
        flex-direction: column;
    }
    
    .completion-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .builder-content {
        flex-direction: column;
    }
    
    .builder-sidebar {
        width: 100%;
    }
    
    .condition-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .step-indicator {
        flex-direction: column;
        gap: 4px;
    }
    
    .progress-percentage {
        font-size: 16px;
    }
    
    .error-message {
        max-width: 90%;
        margin: 0 16px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #2d2d2d;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Enhanced Progress Animation */
.progress-fill {
    position: relative;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Bolt Badge Styles */
.bolt-badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    margin-bottom: 8px;
}
.bolt-badge {
    width: 68px;
    height: 68px;
    opacity: 0.75;
    filter: grayscale(60%);
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
}
.bolt-badge:hover {
    width: 76px;
    height: 76px;
    opacity: 1;
    filter: none;
}