/* Reset and base styles */
:root {
    --glass-color: #87CEFA;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

/* Main content */
main {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

/* Controls section */
.controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.controls h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.control-group input[type="number"] {
    -moz-appearance: textfield;
}

/* Color pair layout for inside/outside */
.control-group.color-pair > label {
    margin-bottom: 8px;
}

.color-row {
    display: flex;
    gap: 10px;
}

.color-col {
    flex: 1;
}

.color-col .sub-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 3px;
    font-weight: normal;
}

.color-col select {
    width: 100%;
    font-size: 0.85rem;
    padding: 8px;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #27ae60;
    color: white;
    margin-top: 10px;
}

.btn-secondary:hover {
    background-color: #219a52;
}

.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.98);
}

/* Preview section */
.preview {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    min-height: 500px;
}

#window-canvas {
    background: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #ddd;
    color: #7f8c8d;
}

/* Batch input styles */
.control-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    min-height: 120px;
}

.control-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.format-info {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #555;
}

.format-info pre {
    margin-top: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow-x: auto;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Batch preview styles */
.batch-preview {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.batch-preview h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

#batch-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.batch-item {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.batch-item h4 {
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.batch-item canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    background: white;
}

.batch-item .batch-actions {
    margin-top: 10px;
}

.batch-item .btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.batch-item .btn-small:hover {
    background: #219a52;
}

/* Responsive */
@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .controls {
        order: 2;
    }
    
    .preview {
        order: 1;
    }
}
