body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.generator-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.image-input {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.image-input input[type="file"] {
    display: none;
}

.image-input label {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.preview-area {
    margin-top: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview-image {
    max-width: 100%;
    max-height: 300px;
}

.text-input {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.text-input textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.font-selector {
    margin-top: 10px;
}

.font-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.controls-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.control-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.control-group h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.control-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.control-item label {
    width: 100px;
    color: #666;
}

.control-item input[type="number"],
.control-item input[type="text"],
.control-item select {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.control-item input[type="range"] {
    flex: 1;
}

.control-item input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 0;
    border: none;
}

.output-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.output-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.output-header h3 {
    margin: 0;
}

.output-controls {
    display: flex;
    gap: 10px;
}

.output-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #28a745;
    color: white;
    cursor: pointer;
}

.ascii-art {
    padding: 20px;
    margin: 0;
    white-space: pre;
    font-family: monospace;
    overflow-x: auto;
}

.gallery-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item pre {
    margin: 0;
    font-size: 8px;
    line-height: 8px;
    overflow: hidden;
}

.gallery-item .item-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
} 