* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
}

.constructor-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 400px;
    background: white;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1;
}

.preview {
    flex: 1;
    padding: 20px;
    background: #e0e0e0;
}

.preview-frame {
    width: 100%;
    height: calc(100vh - 40px);
    border: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.templates-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.template-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.template-card.selected {
    border-color: #e30613;
    background: #fff5f5;
}

.template-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.car-item {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #e30613;
}

.car-item input {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-car {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.add-car-btn, .publish-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.add-car-btn {
    background: #28a745;
    color: white;
    margin-top: 10px;
}

.publish-btn {
    background: #e30613;
    color: white;
    font-size: 16px;
    margin-top: 20px;
}

.add-car-btn:hover, .publish-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.result {
    margin-top: 20px;
    padding: 15px;
    background: #d4edda;
    border-radius: 6px;
    display: none;
}

.result.show {
    display: block;
}