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

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

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

.btn-danger:hover {
    background: #dc2626;
}

/* ===== LANDING PAGE ===== */
.landing-page {
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary) !important;
    color: white !important;
    padding: 8px 20px;
    border-radius: var(--radius);
}

.btn-nav:hover {
    background: var(--primary-dark) !important;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 100px 60px 60px;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(37, 99, 235, 0.15);
    border-radius: 4px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-actions {
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

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

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.mock-builder {
    width: 480px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(3deg);
    transition: transform 0.5s ease;
}

.mock-builder:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mock-sidebar {
    width: 60px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    float: right;
}

.mock-tool {
    width: 44px;
    height: 44px;
    background: var(--border-light);
    border-radius: 8px;
    animation: pulse 2s infinite;
}

.mock-tool:nth-child(2) { animation-delay: 0.3s; }
.mock-tool:nth-child(3) { animation-delay: 0.6s; }
.mock-tool:nth-child(4) { animation-delay: 0.9s; }
.mock-tool:nth-child(5) { animation-delay: 1.2s; }

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.mock-canvas {
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-block {
    border-radius: 8px;
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

.mock-block.block-header {
    height: 40px;
    background: var(--primary);
    opacity: 0.8;
    animation-delay: 0.2s;
}

.mock-block.block-text {
    height: 60px;
    background: var(--border-light);
    animation-delay: 0.5s;
}

.mock-block.block-image {
    height: 80px;
    background: linear-gradient(135deg, var(--border-light), var(--border));
    animation-delay: 0.8s;
}

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

/* ===== FEATURES ===== */
.features, .how-it-works {
    padding: 80px 60px;
    text-align: center;
}

.features h2, .how-it-works h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== HOW IT WORKS ===== */
.steps {
    display: flex;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 80px;
    right: 80px;
    height: 2px;
    background: var(--border);
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
}

.step h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CTA ===== */
.cta-section {
    padding: 80px 60px;
    text-align: center;
    background: var(--bg-secondary);
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 18px;
}

/* ===== FOOTER ===== */
.footer {
    padding: 24px 60px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== BUILDER PAGE ===== */
.builder-page {
    overflow: hidden;
    height: 100vh;
}

.builder-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 52px;
    z-index: 50;
}

.builder-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link {
    font-size: 18px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 8px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.builder-layout {
    display: flex;
    height: calc(100vh - 52px);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 240px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    border: none;
}

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

.sidebar-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.tool-category {
    margin-bottom: 16px;
}

.tool-category h4 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding: 0 4px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: grab;
    transition: var(--transition);
    background: var(--surface);
    user-select: none;
}

.tool-item:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
    transform: translateY(-1px);
}

.tool-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.tool-icon {
    font-size: 18px;
    color: var(--primary);
    line-height: 1;
}

.tool-item span {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== CANVAS ===== */
.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    overflow: hidden;
}

.canvas-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.canvas-toolbar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.device-btn {
    padding: 6px 12px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 16px;
    border: 1px solid transparent;
}

.device-btn:hover {
    background: var(--bg-tertiary);
}

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

.canvas {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.canvas-inner {
    width: 100%;
    max-width: 900px;
    min-height: 100%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

.canvas-inner.drag-over {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.canvas-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

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

.canvas-empty h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.canvas-empty p {
    font-size: 14px;
}

/* ===== CANVAS ELEMENTS ===== */
.canvas-element {
    position: relative;
    border: 2px solid transparent;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 4px;
}

.canvas-element:hover {
    border-color: var(--primary-light);
}

.canvas-element.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.element-actions {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.canvas-element:hover .element-actions,
.canvas-element.selected .element-actions {
    opacity: 1;
}

.el-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.el-action-btn.delete {
    background: var(--danger);
}

.el-action-btn.delete:hover {
    background: #dc2626;
}

.element-drag-handle {
    position: absolute;
    top: 4px;
    right: -28px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0;
    transition: var(--transition);
}

.canvas-element:hover .element-drag-handle {
    opacity: 1;
}

/* Element Types */
.el-heading {
    padding: 20px;
}

.el-heading h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    outline: none;
    min-height: 36px;
}

.el-text {
    padding: 16px 20px;
}

.el-text p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    outline: none;
    min-height: 24px;
}

.el-image {
    padding: 12px 20px;
}

.el-image .image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.el-image .image-placeholder:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.el-image .image-placeholder .upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.el-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
}

.el-button {
    padding: 16px 20px;
}

.el-button button {
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.el-button button:hover {
    background: var(--primary-dark);
}

.el-divider {
    padding: 8px 20px;
}

.el-divider hr {
    border: none;
    height: 1px;
    background: var(--border);
}

.el-spacer {
    height: 40px;
}

.el-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    min-height: 80px;
}

.el-columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
}

.el-columns-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
}

.column-slot {
    min-height: 80px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.el-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.el-hero h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: white;
    outline: none;
}

.el-hero p {
    font-size: 16px;
    opacity: 0.9;
    outline: none;
    margin-bottom: 20px;
}

.el-hero button {
    padding: 12px 32px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.el-features {
    padding: 32px 20px;
}

.el-features h3 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    outline: none;
}

.features-grid-builder {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-item-builder {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.feature-item-builder .fi-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.feature-item-builder h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    outline: none;
}

.feature-item-builder p {
    font-size: 12px;
    color: var(--text-secondary);
    outline: none;
}

.el-pricing {
    padding: 32px 20px;
}

.el-pricing h3 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    outline: none;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pricing-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.03);
}

.pricing-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    outline: none;
}

.pricing-card .price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

.pricing-card ul {
    list-style: none;
    text-align: right;
    margin-bottom: 16px;
}

.pricing-card li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pricing-card button {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
}

.el-testimonial {
    padding: 24px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.el-testimonial p {
    font-size: 15px;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 12px;
    outline: none;
    line-height: 1.8;
}

.el-testimonial .author {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    outline: none;
}

.el-contact {
    padding: 32px 20px;
}

.el-contact h3 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    outline: none;
}

.contact-form-builder {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form-builder input,
.contact-form-builder textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--surface);
}

.contact-form-builder input:focus,
.contact-form-builder textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form-builder textarea {
    min-height: 100px;
    resize: vertical;
}

.contact-form-builder button {
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.el-footer {
    padding: 24px 20px;
    background: var(--text);
    color: white;
    text-align: center;
    border-radius: var(--radius);
}

.el-footer p {
    font-size: 14px;
    opacity: 0.8;
    outline: none;
}

/* ===== PROPERTIES PANEL ===== */
.properties-panel {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}

.properties-panel.collapsed {
    width: 0;
    border: none;
}

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

.panel-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.panel-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.panel-placeholder {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 32px 0;
}

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

.prop-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.prop-group input,
.prop-group select,
.prop-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.prop-group input:focus,
.prop-group select:focus,
.prop-group textarea:focus {
    border-color: var(--primary);
}

.prop-group textarea {
    min-height: 60px;
    resize: vertical;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

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

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.preview-modal {
    width: 90vw;
    height: 85vh;
}

.publish-modal {
    width: 440px;
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.preview-frame {
    width: 100%;
    height: calc(85vh - 60px);
    border: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.publish-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    color: white;
    font-size: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.publish-success h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.publish-success p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.publish-link-box {
    display: flex;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 8px;
    border-radius: var(--radius);
}

.publish-link-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    outline: none;
    background: var(--surface);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--text);
    color: white;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* ===== DROP INDICATOR ===== */
.drop-indicator {
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin: 2px 0;
    animation: pulse-width 1s infinite;
}

@keyframes pulse-width {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding: 100px 20px 40px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
    }

    .steps::before {
        display: none;
    }

    .navbar {
        padding: 12px 20px;
    }

    .nav-links a:not(.btn-nav) {
        display: none;
    }

    .features, .how-it-works {
        padding: 60px 20px;
    }

    .sidebar {
        width: 200px;
    }

    .properties-panel {
        width: 220px;
    }
}

/* ===== DRAGGING STATE ===== */
.tool-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.canvas-element.drag-over-element {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.03);
}

/* Hidden file input */
.hidden-input {
    display: none;
}
