.zellige-simulator-container {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.zellige-simulator-wrapper {
    display: flex;
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.zellige-sidebar {
    width: 280px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
    max-height: 800px;
}

.zellige-sidebar h3 {
    margin: 0 0 15px 0;
    color: #1E40AF;
    font-size: 18px;
    border-bottom: 2px solid #1E40AF;
    padding-bottom: 10px;
}

.zellige-shape-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.category-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.category-btn:hover {
    background: #f0f0f0;
}

.category-btn.active {
    background: #1E40AF;
    color: white;
    border-color: #1E40AF;
}

.zellige-shapes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.shape-item {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    text-align: center;
}

.shape-item:hover {
    border-color: #1E40AF;
    transform: scale(1.05);
}

.shape-item.selected {
    border-color: #1E40AF;
    background: #e3f2fd;
}

.shape-item svg {
    width: 50px;
    height: 50px;
    fill: currentColor;
}

.shape-item .shape-name {
    font-size: 11px;
    margin-top: 5px;
    color: #666;
}

.zellige-colors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.color-item {
    width: 100%;
    height: 45px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.color-item:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-item.selected {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3);
}

.color-item .color-name {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-size: 10px;
    text-align: center;
    color: #666;
}

.zellige-patterns-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pattern-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    transition: all 0.3s;
}

.pattern-item:hover {
    border-color: #1E40AF;
    background: #f0f7ff;
}

.pattern-item .pattern-name {
    font-weight: 500;
    color: #333;
}

.pattern-item .pattern-category {
    font-size: 12px;
    color: #666;
}

.zellige-canvas-area {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.zellige-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.btn-tool {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-tool:hover {
    background: #f0f0f0;
}

.btn-tool.btn-primary {
    background: #1E40AF;
    color: white;
    border-color: #1E40AF;
}

.btn-tool.btn-primary:hover {
    background: #1e3a8a;
}

.btn-tool.btn-success {
    background: #059669;
    color: white;
    border-color: #059669;
}

.btn-tool.btn-success:hover {
    background: #047857;
}

.zellige-canvas-wrapper {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: inline-block;
    background: white;
}

#zellige-canvas {
    display: block;
    cursor: crosshair;
    background: #ffffff;
}

.zellige-instructions {
    margin-top: 20px;
    padding: 15px;
    background: #f0f7ff;
    border-left: 4px solid #1E40AF;
    border-radius: 4px;
}

.zellige-instructions p {
    margin: 0 0 10px 0;
    color: #1E40AF;
    font-weight: 600;
}

.zellige-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.zellige-instructions li {
    color: #666;
    margin-bottom: 5px;
}

.zellige-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zellige-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.zellige-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.zellige-modal-close:hover {
    color: #333;
}

.zellige-modal h2 {
    margin: 0 0 20px 0;
    color: #1E40AF;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1E40AF;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #047857;
}

@media (max-width: 768px) {
    .zellige-simulator-wrapper {
        flex-direction: column;
    }
    
    .zellige-sidebar {
        width: 100%;
        max-height: 400px;
    }
}
