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

body {
    font-family: 'Ubuntu', Arial, sans-serif;
    background: linear-gradient(135deg, #5659D3 0%, #6980FB 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    background: linear-gradient(135deg, #5659D3 0%, #6980FB 100%);
    padding: 32px;
    text-align: left;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header h1 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.bricksyflow-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-block;
    object-fit: contain;
    background: none;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 4px;
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: white;
    width: 33.33%;
    transition: width 0.3s ease;
}

.progress-fill.step-2 {
    width: 66.66%;
}

.progress-fill.step-3 {
    width: 100%;
}

.content {
    padding: 32px;
}

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

.step.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 32px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #5659D3 0%, #6980FB 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin: 0 auto 16px;
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.step-description {
    font-size: 16px;
    color: #718096;
}

.framework-select {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

.framework-select:hover {
    border-color: #cbd5e0;
}

.framework-select label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.framework-select select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.framework-select select:focus {
    outline: none;
    border-color: #5659D3;
    box-shadow: 0 0 0 3px rgba(86, 89, 211, 0.1);
}

.framework-select select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.paste-area {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.paste-area:hover {
    border-color: #5659D3;
    background: #edf2f7;
}

.paste-area.dragover {
    border-color: #5659D3;
    background: #edf2f7;
    transform: scale(1.02);
}

.paste-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.paste-text {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 8px;
}

.paste-subtext {
    font-size: 14px;
    color: #718096;
}

.paste-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    background: white;
    resize: vertical;
    transition: all 0.2s ease;
    line-height: 1.5;
    margin-top: 20px;
}

.paste-textarea:focus {
    outline: none;
    border-color: #5659D3;
    box-shadow: 0 0 0 3px rgba(86, 89, 211, 0.1);
}

.process-btn {
    background: linear-gradient(135deg, #5659D3 0%, #6980FB 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    width: 100%;
}

.process-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(86, 89, 211, 0.3);
}

.process-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sections-container {
    background: #f7fafc;
    border-radius: 16px;
    padding: 24px;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.section-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.section-card:hover {
    border-color: #5659D3;
    box-shadow: 0 8px 25px rgba(86, 89, 211, 0.1);
}

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

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5659D3 0%, #6980FB 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.section-info {
    flex: 1;
}

.section-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.section-category {
    font-size: 11px;
    color: #ffffff;
    background: #4a5568;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-order {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #5659D3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.section-input {
    margin-bottom: 12px;
}

.input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
}

.input-field:hover {
    border-color: #cbd5e0;
}

.input-field:focus {
    outline: none;
    border-color: #5659D3;
    box-shadow: 0 0 0 3px rgba(86, 89, 211, 0.1);
    background: #fafbfc;
}

.order-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.order-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s ease;
}

.order-btn:hover {
    border-color: #5659D3;
    background: #f7fafc;
    color: #5659D3;
    transform: translateY(-1px);
}

.order-btn:active {
    transform: translateY(0);
}

.order-btn.left-btn {
    border-radius: 6px 0 0 6px;
}

.order-btn.right-btn {
    border-radius: 0 6px 6px 0;
}

.order-btn:only-child {
    border-radius: 6px;
}

.generate-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.generate-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    border: 2px solid #FF9843;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 67, 0.3);
    background: white;
    border-color: #FF9843;
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.output-section {
    background: #f7fafc;
    border-radius: 16px;
    padding: 24px;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.output-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

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

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn {
    background: #5659D3;
    color: white;
}

.copy-btn:hover {
    background: #6980FB;
    transform: translateY(-1px);
}

.download-btn {
    background: #48bb78;
    color: white;
}

.download-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.output-json {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.error-container {
    margin-top: 20px;
}

.error-item {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    color: #e53e3e;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.error-message {
    flex: 1;
}

.error-close {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.error-close:hover {
    background: rgba(229, 62, 62, 0.1);
}

.success-message {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border: 1px solid #9ae6b4;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

.success-message.show {
    display: block;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    background: #e2e8f0;
    color: #4a5568;
}

.back-btn:hover {
    background: #cbd5e0;
}

.next-btn {
    background: #5659D3;
    color: white;
}

.next-btn:hover {
    background: #6980FB;
}

.next-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .content {
        padding: 20px;
    }
}
