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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.controls {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.section {
    margin-bottom: 25px;
}

.edge-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.edge-controls label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edge-controls select {
    width: 150px;
}

.action-areas {
    display: grid;
    gap: 20px;
}

.action-area {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.action-area label {
    display: inline-block;
    margin-right: 20px;
}

select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 12px 24px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#generate-btn {
    background: #3498db;
    color: white;
}

#generate-btn:hover {
    background: #2980b9;
}

#download-btn {
    background: #27ae60;
    color: white;
}

#download-btn:hover {
    background: #229954;
}

#randomize-btn {
    background: #e74c3c;
    color: white;
}

#randomize-btn:hover {
    background: #c0392b;
}

.preview {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

#tile-container {
    display: inline-block;
    margin: 20px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
}

#tile-svg {
    display: block;
}

.tile-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: left;
}

#tile-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.prompt-display {
    margin-top: 30px;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 8px;
}

.prompt-display h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.prompt-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#prompt-text {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    background: white;
}

#copy-prompt-btn {
    align-self: flex-start;
    padding: 10px 20px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#copy-prompt-btn:hover {
    background: #8e44ad;
}

/* Responsive design */
@media (max-width: 768px) {
    .edge-controls {
        grid-template-columns: 1fr;
    }
    
    .action-area label {
        display: block;
        margin-bottom: 10px;
    }
    
    button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}