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

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;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

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

/* Component Library */
.component-library {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.component-library h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8em;
}

.category {
    margin-bottom: 25px;
}

.category h3 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.component-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.component {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: grab;
    user-select: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.component:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.component:active {
    cursor: grabbing;
}

.component.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Prompt Builder */
.prompt-builder {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.prompt-builder h2 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.8em;
}

.instruction {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.drop-zone {
    min-height: 200px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9ff;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    align-content: flex-start;
}

.drop-zone.drag-over {
    background: #e8ebff;
    border-color: #764ba2;
    border-style: solid;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.placeholder {
    width: 100%;
    text-align: center;
    color: #999;
    font-size: 1.1em;
    padding: 60px 20px;
}

.dropped-component {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: dropIn 0.3s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.remove-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #10b981;
    color: white;
    margin-top: 15px;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Result Section */
.result-section {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.result-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.generated-prompt {
    background: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2em;
    line-height: 1.6;
    color: #333;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    min-height: 60px;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.component.cloning {
    animation: pulse 0.3s ease;
}
