:root {
    --primary: #5E3BEE;
    --primary-dark: #4A2EBE;
    --primary-light: rgba(94, 59, 238, 0.1);
    --text-primary: #0F0F0F;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --bg-white: #FFFFFF;
    --bg-gray: #F9FAFB;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --danger: #DC2626;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Compact Hero */
.hero-compact {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-left {
    flex-shrink: 0;
}

.hero-left h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-left p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 48px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-mini {
    text-align: center;
    min-width: 80px;
}

.stat-mini:last-child {
    min-width: 150px;
    max-width: 200px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-mini:last-child .stat-value {
    font-size: 16px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    min-height: 20px;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* App Container */
.app-container {
    padding: 24px 0;
    min-height: calc(100vh - 100px);
}

/* App Layout - 3 Column */
.app-layout {
    display: grid;
    grid-template-columns: 240px 1fr 600px;
    gap: 24px;
    align-items: start;
}

/* Workflow Panel */
.workflow-panel {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.workflow-steps {
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
}

.step-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.step-content p {
    font-size: 12px;
    color: var(--text-muted);
}

.quick-actions {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px; /* Einheitlicher Abstand zwischen Buttons */
}

/* Einheitliches Button-Design */
.quick-actions .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Nur transform & shadow animieren -> kein Background-Blinken */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Primary Button (Meta-Tags kopieren) */
.quick-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}
.quick-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); /* fix gegen Weiß */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 59, 238, 0.4);
}

/* Secondary Button (Schema.org) */
.quick-actions .btn-secondary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}
.quick-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #6366f1, #4f46e5); /* fix gegen Weiß */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Danger Button (Zurücksetzen) */
.quick-actions .btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--error));
    color: white;
}
.quick-actions .btn-danger:hover {
    background: linear-gradient(135deg, var(--danger), var(--error)); /* fix gegen Weiß */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Icons in Buttons */
.quick-actions .btn::before {
    font-size: 18px;
}


/* Content Panel */
.content-panel {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    min-height: 600px;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 8px;
    background: var(--bg-gray);
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    background: var(--bg-gray);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(94, 59, 238, 0.3);
    transform: translateY(-1px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Preview Panel */
.preview-panel {
    position: sticky;
    top: 100px;
}

.preview-sticky {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
}


.preview-panel h2 {
    font-size: 18px;
    margin-bottom: 16px;
}


/* Device Toggle */
.device-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg-gray);
    padding: 6px;
    border-radius: 10px;
}

.device-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.device-btn:hover {
    background: var(--bg-gray);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.device-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(94, 59, 238, 0.3);
    transform: translateY(-1px);
}

/* SERP Preview */
.serp-preview {
    font-family: arial, sans-serif;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

/* Mobile Preview */
.serp-preview.mobile-preview {
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    max-width: 360px;
}

.mobile-preview .serp-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.mobile-preview .serp-favicon {
    width: 18px;
    height: 18px;
    font-size: 9px;
}

.mobile-preview .serp-domain {
    font-size: 12px;
    line-height: 16px;
}

.mobile-preview .serp-breadcrumb {
    font-size: 10px;
    line-height: 14px;
}

.mobile-preview .serp-title {
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-preview .serp-description {
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Desktop Preview */
.serp-preview.desktop-preview {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    max-width: 600px;
}

.desktop-preview .serp-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.desktop-preview .serp-favicon {
    width: 26px;
    height: 26px;
    font-size: 13px;
}

.desktop-preview .serp-domain {
    font-size: 14px;
    line-height: 18px;
}

.desktop-preview .serp-breadcrumb {
    font-size: 12px;
    line-height: 16px;
}

.desktop-preview .serp-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.desktop-preview .serp-description {
    font-size: 14px;
    line-height: 1.43;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Shared SERP Styles */
.serp-favicon {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.serp-url-info {
    display: flex;
    flex-direction: column;
}

.serp-domain {
    color: #202124;
    font-weight: 400;
}

.serp-breadcrumb {
    color: #5f6368;
}

.serp-title {
    color: #1a0dab;
    cursor: pointer;
    text-decoration: none;
    font-weight: 400;
}

.serp-title:hover {
    text-decoration: underline;
}

.serp-description {
    color: #4d5156;
    font-weight: 400;
}

/* Sections */
.keyword-section,
.content-section,
.meta-section,
.country-section,
.affix-section {
    margin-bottom: 32px;
}

.section-header-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-header-inline h2 {
    font-size: 18px;
    margin: 0;
}

.required-badge {
    background: var(--error);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.optional-badge {
    background: var(--text-muted);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-keyword {
    font-size: 16px;
    font-weight: 600;
    border-color: var(--primary);
}

.keyword-helper {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.textarea-large {
    min-height: 120px;
    resize: none;
}

#description {
    resize: none;
}

/* Affix Section (Präfix + Suffix) */
.affix-section {
    padding: 20px;
    background: linear-gradient(135deg, rgba(94, 59, 238, 0.03), rgba(94, 59, 238, 0.01));
    border-radius: 12px;
    border: 1px dashed var(--border);
}

.affix-controls {
    display: grid;
    grid-template-columns: 150px 1fr 150px;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.affix-input {
    font-family: 'Courier New', monospace;
    text-align: center;
}

.title-placeholder {
    text-align: center;
    padding: 10px;
    background: var(--bg-gray);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    border: 2px dashed var(--border);
}

.affix-preview {
    padding: 12px;
    background: var(--bg-gray);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.preview-label {
    color: var(--text-muted);
    margin-right: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-example {
    font-family: 'Google Sans', arial, sans-serif;
    color: var(--text-primary);
}

.preview-prefix,
.preview-suffix {
    color: var(--primary);
    font-weight: 600;
}

.affix-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.affix-warning.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.affix-warning.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.affix-warning.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

#availableChars {
    font-weight: 700;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-gray);
}

.upload-zone:hover,
.upload-zone.dragging {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.upload-zone h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.upload-zone p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
    font-size: 13px;
    color: var(--text-muted);
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Character Info */
.char-info {
    text-align: right;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.char-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.char-count {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

.char-count.optimal {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.char-count.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.char-count.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.length-indicator {
    font-size: 16px;
}

.length-indicator.optimal {
    color: var(--success);
}

.length-indicator.error {
    color: var(--error);
}

/* Progress Bar */
.progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.progress-fill.optimal {
    background: var(--success);
}

.progress-fill.warning {
    background: var(--warning);
}

.progress-fill.error {
    background: var(--error);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

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

.btn-danger:hover {
    background: var(--error);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

/* Keyword Check */
.keyword-check {
    background: var(--bg-gray);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
}

.keyword-check h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

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

/* SERP Analysis */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-gray);
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.stat-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.common-words {
    background: var(--bg-gray);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.common-words h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.word-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* SERP Results */
.serp-result-item {
    background: var(--bg-gray);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.serp-result-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.serp-position {
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.serp-url {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.serp-result-title {
    color: #1a0dab;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

.serp-result-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.serp-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* AI Suggestions */
.ai-analysis {
    background: linear-gradient(135deg, var(--primary-light), rgba(94, 59, 238, 0.05));
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.suggestion-group {
    margin-bottom: 24px;
}

.suggestion-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    background: var(--bg-gray);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.suggestion-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

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

.suggestion-type {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
    padding: 3px 8px;
    border-radius: 6px;
}

.suggestion-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.apply-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    background: var(--primary-dark);
}

/* Schema Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

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

.modal-close:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Schema Fields */
.schema-type-selector {
    margin-bottom: 24px;
}

.schema-fields {
    margin-bottom: 24px;
}

.field-group {
    margin-bottom: 16px;
}

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.schema-preview {
    background: var(--bg-gray);
    border-radius: 8px;
    padding: 16px;
}

.schema-preview h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.schema-preview pre {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    overflow-x: auto;
    max-height: 300px;
}

/* FAQ Builder */
.faq-builder {
    margin-bottom: 16px;
}

.faq-items {
    margin-top: 16px;
}

.faq-item {
    background: var(--bg-gray);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.faq-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.btn-remove {
    background: var(--error);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-question {
    margin-bottom: 8px;
}

.faq-answer {
    min-height: 60px;
    resize: vertical;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

.loading-progress {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.loading-step.active {
    color: var(--primary);
    font-weight: 600;
}

.loading-step.done {
    color: var(--success);
}

.loading-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.loading-step.active .loading-icon {
    border-color: var(--primary);
    animation: pulse 1s infinite;
}

.loading-step.done .loading-icon {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    animation: slideUp 0.3s ease-out;
    z-index: 1000;
    font-size: 14px;
}

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

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

.toast.info {
    background: var(--primary);
}

.toast.show {
    display: block;
}

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

/* Pixel Measurer (Hidden) */
.pixel-measurer {
    position: absolute;
    visibility: hidden;
    height: auto;
    width: auto;
    white-space: nowrap;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 400;
}

.site-footer {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #fff;
}

.footer-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-label {
    opacity: 0.9;
}

.footer-dev {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.footer-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 6px;
}

.footer-name,
.footer-agency {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.footer-privacy {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
}

.footer-credit a:hover {
    text-decoration: underline;
}

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

    .workflow-panel {
        position: static;
        margin-bottom: 24px;
    }

    .preview-panel {
        position: static;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-stats {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .hero-inner {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .affix-controls {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}
