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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

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

/* Header */
.header {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    font-size: 48px;
    color: var(--primary);
}

.header h1 {
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 5px;
}

.header p {
    color: var(--gray);
    font-size: 16px;
}

.lida-branding {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 25px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px solid var(--primary);
    border-radius: 10px;
}

.lida-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

.lida-logo-placeholder {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.lida-logo-placeholder .material-symbols-outlined {
    font-size: 22px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 6px var(--shadow);
}

.card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 .material-symbols-outlined {
    color: var(--primary);
}

/* Categories */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    color: var(--dark);
    font-weight: 500;
}

.category-btn:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateX(5px);
}

.category-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.category-btn .material-symbols-outlined {
    font-size: 24px;
}

/* Filters */
.filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.template-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 6px var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px var(--shadow);
    border-color: var(--primary);
}

.template-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-card h4 .material-symbols-outlined {
    color: var(--primary);
    font-size: 28px;
}

.template-card p {
    color: var(--gray);
    margin-bottom: 15px;
    line-height: 1.6;
}

.template-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-beginner {
    background: #dcfce7;
    color: #16a34a;
}

.badge-intermediate {
    background: #fef3c7;
    color: #d97706;
}

.badge-advanced {
    background: #fee2e2;
    color: #dc2626;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

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

/* Prompt Builder Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.modal-overlay.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.modal {
    background: white;
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    padding: 30px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-modal:hover {
    background: var(--light);
    color: var(--dark);
}

/* Wizard Progress Bar */
.wizard-progress {
    padding: 20px 30px;
    border-bottom: 2px solid var(--border);
    background: var(--light);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.progress-line-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s;
}

.progress-step.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.progress-step.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    text-align: center;
}

.progress-step.active .step-label {
    color: var(--primary);
}

.progress-step.completed .step-label {
    color: var(--success);
}

/* Wizard Body */
.modal-body {
    padding: 30px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.wizard-step.active {
    display: block;
}

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

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

.step-header h3 {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-header p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.input-hint {
    font-size: 12px;
    color: var(--gray);
    margin-top: 5px;
    font-style: italic;
}

/* Required field indicator - add red asterisk to input hints */
.form-grid > div:has(input[placeholder*="*"]) .input-hint::before,
.form-grid > div:has(textarea[placeholder*="*"]) .input-hint::before {
    content: '* ';
    color: var(--danger);
    font-weight: bold;
    font-size: 14px;
}

/* Wizard Navigation */
.wizard-navigation {
    padding: 20px 30px;
    border-top: 2px solid var(--border);
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.nav-left, .nav-right {
    display: flex;
    gap: 10px;
}

/* Generated Prompt Section */
.generated-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    color: white;
}

.generated-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.generated-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.generated-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.fast-mode-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 600;
    color: white;
    user-select: none;
}

.fast-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.fast-mode-toggle input[type="checkbox"] {
    display: none;
}

.fast-mode-toggle .material-symbols-outlined {
    font-size: 18px;
}

.fast-mode-toggle input[type="checkbox"]:checked ~ .material-symbols-outlined {
    animation: pulse 0.5s ease-in-out;
}

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

.prompt-output {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    white-space: pre-wrap;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.prompt-output[contenteditable="true"] {
    cursor: text;
    outline: none;
}

.prompt-output[contenteditable="true"]:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Typewriter cursor */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: rgba(255, 255, 255, 0.9);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.edit-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-copy, .btn-save, .btn-regenerate, .btn-edit {
    background: white;
    color: var(--primary);
}

.btn-copy:hover, .btn-save:hover, .btn-regenerate:hover, .btn-edit:hover {
    background: var(--light);
}

/* AI Reaction Box */
.ai-reaction-box {
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.ai-reaction-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ai-reaction-icon {
    font-size: 24px;
    animation: bounce 1s ease-in-out infinite;
}

.ai-reaction-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.ai-reaction-content {
    padding-left: 34px;
}

.ai-reaction-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark);
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Follow-up Suggestions */
.followup-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.followup-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.followup-suggestions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.followup-category {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 4px;
}

.followup-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    text-align: left;
    width: 100%;
}

.followup-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
}

.followup-btn .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

/* Power User Mode Toggle */
.power-user-toggle {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--border);
    border-radius: 13px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label .material-symbols-outlined {
    color: var(--primary);
    font-size: 22px;
}

.toggle-hint {
    font-size: 13px;
    color: var(--gray);
    margin-top: 8px;
    margin-left: 62px;
}

/* Power User Fields */
.power-user-fields {
    animation: slideDown 0.3s ease-out;
    margin-top: 20px;
}

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

.power-user-fields .form-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border: 2px solid #fecaca;
    border-radius: var(--radius);
    padding: 20px;
}

.power-user-fields .form-section h4 {
    color: #dc2626;
    border-bottom-color: #fecaca;
}

.power-user-fields .form-section h4 .material-symbols-outlined {
    color: #dc2626;
}

/* AI Platform Selector */
.ai-platform-selector {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.platform-selector-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 14px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    flex: 1;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.platform-selector-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.platform-selector-btn .material-symbols-outlined:first-child {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.platform-selector-btn .material-symbols-outlined:last-child {
    font-size: 22px;
    transition: transform 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.platform-selector-btn.active .material-symbols-outlined:last-child {
    transform: rotate(180deg);
}

#selectedPlatformLabel {
    flex: 1;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.platform-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
    overflow: hidden;
    animation: dropdownSlide 0.2s ease-out;
}

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

.platform-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
}

.platform-option:last-child {
    border-bottom: none;
}

.platform-option:hover {
    background: var(--light);
}

.platform-option.selected {
    background: #f0f4ff;
}

.platform-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.platform-info {
    flex: 1;
}

.platform-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.platform-url {
    font-size: 12px;
    color: var(--gray);
}

.platform-check {
    font-size: 20px;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.platform-option.selected .platform-check {
    opacity: 1;
}

.btn-copy-open {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-copy-open:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Recent Prompts List */
.recent-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    padding: 20px;
    font-style: italic;
}

.recent-prompt-item {
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.recent-prompt-item:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateX(5px);
}

.recent-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.recent-prompt-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    flex: 1;
    line-height: 1.4;
}

.recent-prompt-delete {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-prompt-delete:hover {
    background: var(--danger);
    color: white;
}

.recent-prompt-delete .material-symbols-outlined {
    font-size: 18px;
}

.recent-prompt-preview {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-prompt-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--gray);
}

.recent-prompt-meta .material-symbols-outlined {
    font-size: 14px;
}

.recent-prompt-template {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px var(--shadow);
}

.no-results .material-symbols-outlined {
    font-size: 80px;
    color: var(--gray);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--dark);
}

.no-results p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--dark);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 16px var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

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

    .header {
        flex-direction: column;
        text-align: center;
    }

    .progress-steps {
        flex-wrap: wrap;
    }

    .step-label {
        font-size: 10px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .wizard-navigation {
        flex-direction: column;
    }

    .nav-left, .nav-right {
        width: 100%;
    }

    .generated-actions {
        width: 100%;
    }

    .generated-actions .btn {
        flex: 1;
    }
}

/* Confirmation Dialog */
.confirmation-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    max-width: 500px;
    width: 90%;
    animation: scaleIn 0.3s ease-out;
}

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

.dialog-header {
    padding: 25px 30px;
    border-bottom: 2px solid var(--border);
}

.dialog-header h3 {
    font-size: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dialog-header h3 .material-symbols-outlined {
    color: var(--warning);
    font-size: 28px;
}

.dialog-header p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
}

.dialog-body {
    padding: 25px 30px;
}

.dialog-body p {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.dialog-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-option {
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.dialog-option:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateX(5px);
}

.dialog-option.danger:hover {
    border-color: var(--danger);
    background: #fef2f2;
}

.dialog-option .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
}

.dialog-option.danger .material-symbols-outlined {
    color: var(--danger);
}

.dialog-option-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.dialog-option-content p {
    font-size: 13px;
    color: var(--gray);
    margin: 0;
}

.dialog-footer {
    padding: 20px 30px;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    backdrop-filter: blur(2px);
}

.dialog-overlay.active {
    display: block;
}

/* Custom URL Dialog */
.custom-url-dialog {
    max-width: 550px;
}

.custom-url-input-group {
    margin-bottom: 25px;
}

.custom-url-input-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.custom-url-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: 'Monaco', 'Courier New', monospace;
    background: var(--light);
}

.custom-url-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

.custom-url-input::placeholder {
    color: var(--gray);
    opacity: 0.6;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.dialog-actions .btn {
    min-width: 120px;
}

/* Platform Settings Button */
.platform-settings-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.platform-settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.platform-settings-btn .material-symbols-outlined {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Prompt Profile Dialog */
.prompt-profile-dialog {
    max-width: 700px;
}

.profile-selector-group {
    margin-bottom: 25px;
}

.profile-selector-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.profile-platform-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: var(--light);
    cursor: pointer;
}

.profile-platform-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-field-group {
    display: flex;
    flex-direction: column;
}

.profile-field-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.profile-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s;
    font-family: 'Monaco', 'Courier New', monospace;
    background: var(--light);
    resize: vertical;
    min-height: 100px;
}

.profile-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

.profile-textarea::placeholder {
    color: var(--gray);
    opacity: 0.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.profile-hint {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
}

.profile-hint .material-symbols-outlined {
    color: var(--primary);
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-hint span:last-child {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.6;
}

/* Prompt Container */
.prompt-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    align-items: start;
}

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

/* Prompt Breakdown Panel */
.prompt-breakdown {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.breakdown-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.breakdown-header .material-symbols-outlined {
    font-size: 20px;
}

.breakdown-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breakdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.breakdown-toggle .material-symbols-outlined {
    font-size: 22px;
    transition: transform 0.3s;
}

.breakdown-toggle.collapsed .material-symbols-outlined {
    transform: rotate(180deg);
}

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

.breakdown-content.collapsed {
    display: none;
}

.breakdown-intro {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    font-weight: 500;
}

.breakdown-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-item {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid;
    border-radius: 8px;
    padding: 12px 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.breakdown-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.breakdown-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.breakdown-item-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.breakdown-item-label {
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breakdown-item-content {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    padding-left: 26px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Breakdown Item Colors */
.breakdown-item.project {
    border-left-color: #60a5fa;
}

.breakdown-item.project .breakdown-item-icon {
    color: #60a5fa;
}

.breakdown-item.tech {
    border-left-color: #34d399;
}

.breakdown-item.tech .breakdown-item-icon {
    color: #34d399;
}

.breakdown-item.problem {
    border-left-color: #fbbf24;
}

.breakdown-item.problem .breakdown-item-icon {
    color: #fbbf24;
}

.breakdown-item.goal {
    border-left-color: #f472b6;
}

.breakdown-item.goal .breakdown-item-icon {
    color: #f472b6;
}

.breakdown-item.tone {
    border-left-color: #a78bfa;
}

.breakdown-item.tone .breakdown-item-icon {
    color: #a78bfa;
}

.breakdown-item.context {
    border-left-color: #fb923c;
}

.breakdown-item.context .breakdown-item-icon {
    color: #fb923c;
}

.breakdown-item.constraints {
    border-left-color: #ef4444;
}

.breakdown-item.constraints .breakdown-item-icon {
    color: #ef4444;
}

.breakdown-item.requirements {
    border-left-color: #06b6d4;
}

.breakdown-item.requirements .breakdown-item-icon {
    color: #06b6d4;
}

/* Highlight effect when clicking breakdown item */
.breakdown-item.highlight {
    animation: highlightPulse 0.6s ease-out;
}

@keyframes highlightPulse {
    0%, 100% {
        background: rgba(255, 255, 255, 0.1);
    }
    50% {
        background: rgba(255, 255, 255, 0.4);
        transform: scale(1.02);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark);
}

/* ===== PROMPT QUALITY METER ===== */
.prompt-quality-meter {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    animation: fadeInUp 0.5s ease-out;
}

.quality-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quality-meter-header h4 {
    font-size: 13px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.quality-meter-header .material-symbols-outlined {
    font-size: 16px;
}

.quality-score {
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quality-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quality-bar {
    height: 100%;
    border-radius: 6px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.quality-bar.excellent {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.quality-bar.good {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.quality-bar.needs-improvement {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.quality-feedback {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.quality-feedback-text {
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.quality-feedback-text .material-symbols-outlined {
    font-size: 16px;
}

.quality-feedback-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.quality-meter-content {
    transition: all 0.3s ease;
}

.quality-meter-content.collapsed {
    display: none;
}

.quality-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quality-toggle .material-symbols-outlined {
    font-size: 20px;
    transition: transform 0.3s;
}

.quality-toggle.collapsed .material-symbols-outlined {
    transform: rotate(180deg);
}

.quality-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quality-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    transition: all 0.3s;
}

.quality-detail-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.quality-detail-item .material-symbols-outlined {
    font-size: 14px;
    flex-shrink: 0;
}

.quality-detail-item.filled {
    color: white;
}

.quality-detail-item.filled .material-symbols-outlined {
    color: #10b981;
}

.quality-detail-item.missing .material-symbols-outlined {
    color: #ef4444;
    opacity: 0.6;
}

/* ===== LIVE PREVIEW ===== */
.live-preview-toggle {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
}

.live-preview-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 25px;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.live-preview-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.live-preview-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.live-preview-header .material-symbols-outlined {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.live-preview-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.live-preview-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px #10b981;
}

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

.live-preview-content {
    padding: 20px;
    background: white;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: var(--dark);
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
}

.preview-placeholder {
    color: var(--gray);
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.live-preview-content:not(:has(.preview-placeholder)) {
    border-left: 4px solid var(--primary);
}

/* Live preview sections */
.preview-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.3s ease-out;
}

.preview-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.preview-section-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-section-title::before {
    content: '▸';
    color: var(--primary);
    font-size: 14px;
}

.preview-section-content {
    color: var(--dark);
    padding-left: 16px;
}

/* Typing indicator for live preview */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Live preview update flash effect */
.live-preview-content.updating {
    animation: flashUpdate 0.3s ease-out;
}

@keyframes flashUpdate {
    0% {
        background: #f0f4ff;
    }
    100% {
        background: white;
    }
}

/* Responsive adjustments for live preview */
@media (max-width: 768px) {
    .live-preview-panel {
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
    }
    
    .live-preview-content {
        max-height: 300px;
        font-size: 13px;
    }
}

/* ===== FLOATING AI AVATAR ===== */
.ai-avatar-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1500;
}

.ai-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    border: 3px solid white;
}

.ai-avatar:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
    animation: wave 0.6s ease-in-out;
}

.ai-avatar .material-symbols-outlined {
    font-size: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg) scale(1.1);
    }
    25% {
        transform: rotate(-15deg) scale(1.1);
    }
    75% {
        transform: rotate(15deg) scale(1.1);
    }
}

.ai-tip-bubble {
    position: absolute;
    bottom: 75px;
    left: 0;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    max-width: 320px;
    animation: bubbleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid var(--primary);
}

.ai-tip-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.ai-tip-bubble::before {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 18px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--primary);
}

@keyframes bubbleIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-tip-bubble p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark);
    font-weight: 500;
}

/* Responsive adjustments for avatar */
@media (max-width: 768px) {
    .ai-avatar-container {
        bottom: 20px;
        left: 20px;
    }
    
    .ai-avatar {
        width: 50px;
        height: 50px;
    }
    
    .ai-avatar .material-symbols-outlined {
        font-size: 28px;
    }
    
    .ai-tip-bubble {
        min-width: 240px;
        max-width: 280px;
        bottom: 65px;
    }
}

/* ===== HELP BUTTON ===== */
.help-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    margin-left: auto;
    flex-shrink: 0;
}

.help-button:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
    animation: wiggle 0.5s ease-in-out;
}

.help-button .material-symbols-outlined {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes wiggle {
    0%, 100% {
        transform: translateY(-3px) scale(1.1) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) scale(1.1) rotate(-10deg);
    }
    75% {
        transform: translateY(-3px) scale(1.1) rotate(10deg);
    }
}

/* ===== HELP GUIDE MODAL ===== */
.help-guide-overlay {
    z-index: 3000;
    transition: opacity 0.15s ease-out;
}

.help-guide-overlay:not(.active) {
    opacity: 0;
}

.help-guide-modal {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transition: opacity 0.15s ease-out;
}

.help-guide-overlay:not(.active) .help-guide-modal {
    opacity: 0;
}

.help-guide-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.help-guide-modal h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
}

.help-intro {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
}

.help-intro p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark);
    font-weight: 500;
}

.help-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.help-section {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--light);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.help-section:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateX(5px);
}

.help-section-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.help-section-icon .material-symbols-outlined {
    font-size: 28px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.help-section-content {
    flex: 1;
}

.help-section-content h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.help-section-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--dark);
    margin-bottom: 12px;
}

.help-section-content ul,
.help-section-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.help-section-content li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 8px;
}

.help-section-content li strong {
    color: var(--primary);
    font-weight: 600;
}

.help-tip {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.help-tip .material-symbols-outlined {
    color: #f59e0b;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.help-tip strong {
    color: #92400e;
}

.help-footer {
    background: var(--light);
    border-top: 2px solid var(--border);
    padding: 25px 30px;
}

.help-footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}

.help-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.help-footer-note {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

.help-guide-actions {
    padding: 20px 30px;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: center;
    background: white;
}

.help-guide-actions .btn {
    min-width: 200px;
    font-size: 16px;
    padding: 14px 32px;
}

/* Responsive adjustments for help guide */
@media (max-width: 768px) {
    .help-guide-modal {
        max-height: 95vh;
    }
    
    .help-guide-body {
        padding: 20px;
    }
    
    .help-section {
        flex-direction: column;
        padding: 20px;
    }
    
    .help-section-icon {
        width: 45px;
        height: 45px;
    }
    
    .help-section-icon .material-symbols-outlined {
        font-size: 24px;
    }
    
    .help-section-content h3 {
        font-size: 18px;
    }
    
    .help-section-content p,
    .help-section-content li {
        font-size: 14px;
    }
    
    .help-footer {
        padding: 20px;
    }
    
    .help-guide-actions {
        padding: 15px 20px;
    }
    
    .help-guide-actions .btn {
        width: 100%;
    }
    
    .help-button {
        width: 45px;
        height: 45px;
    }
    
    .help-button .material-symbols-outlined {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .help-button {
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
    
    .help-button .material-symbols-outlined {
        font-size: 22px;
    }
}

/* ===== FOOTER ===== */
.footer {

    border-radius: var(--radius);
    padding: 40px 30px;
    margin-top: 40px;
    box-shadow: 0 4px 6px var(--shadow);
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-copyright {
    font-size: 19px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.footer-version {
    font-size: 16px;
    color: #1c16c8;
    margin: 0;
}


.btn-discover {
    margin-top: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.btn-discover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.btn-discover .material-symbols-outlined {
    font-size: 20px;
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 20px;
        margin-top: 30px;
    }
    
    .footer-copyright {
        font-size: 16px;
    }
    
    .footer-version {
        font-size: 13px;
        color: #1c16c8;
    }
    
    .btn-discover {
        width: 100%;
        max-width: 300px;
    }
}

/* ===== LOADING STATES ===== */
.spinning {
    animation: spin 1s linear infinite;
}

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

button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

button.loading:hover {
    transform: none !important;
}

/* ===== CHARACTER COUNTERS ===== */
.char-counter {
    font-size: 12px;
    color: var(--gray);
    text-align: right;
    margin-top: 4px;
    font-weight: 600;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.char-counter.warning {
    color: var(--warning);
}

.char-counter.warning::before {
    content: '⚠️';
    font-size: 14px;
}

.char-counter.danger {
    color: var(--danger);
    font-weight: 700;
}

.char-counter.danger::before {
    content: '🚫';
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Input with character limit styling */
textarea[maxlength],
input[maxlength] {
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea[maxlength]:focus,
input[maxlength]:focus {
    border-color: var(--primary);
}

/* Warning state when approaching limit */
textarea[maxlength].near-limit,
input[maxlength].near-limit {
    border-color: var(--warning);
    background: #fffbeb;
}

textarea[maxlength].near-limit:focus,
input[maxlength].near-limit:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Danger state when at limit */
textarea[maxlength].at-limit,
input[maxlength].at-limit {
    border-color: var(--danger);
    background: #fef2f2;
}

textarea[maxlength].at-limit:focus,
input[maxlength].at-limit:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ===== FIELD VALIDATION ERRORS ===== */
.field-error {
    border-color: var(--danger) !important;
    background: #fef2f2 !important;
    animation: fieldErrorShake 0.5s ease-in-out;
}

.field-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

@keyframes fieldErrorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.field-error-message {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid var(--danger);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    animation: slideDown 0.3s ease-out;
}

.field-error-message::before {
    content: '⚠️';
    font-size: 16px;
    flex-shrink: 0;
}

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

/* Success state for validated fields */
.field-success {
    border-color: var(--success) !important;
}

.field-success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}
