/* Layout and grid structure */

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

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.input-panel, .output-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.panel-header {
    background: #f8f9fa;
    color: #495057;
    padding: 15px 20px;
    font-weight: 500;
    font-size: 1.1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-content {
    padding: 20px;
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
}

.textarea-container {
    flex: 1;
    position: relative;
}

.output-container {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    overflow: auto;
    background: #fafbfc;
    position: relative;
    scroll-behavior: smooth;
}

/* Ensure images in output container maintain their aspect ratio */
.output-container img {
    display: block;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 70vh;
    }
    
    .input-panel, .output-panel {
        min-height: 300px;
        max-height: 50vh;
        height: auto;
    }
    
    .panel-content {
        height: auto;
        min-height: 250px;
        max-height: 45vh;
        overflow: hidden;
    }
    
    .tab-content {
        height: 100%;
        min-height: 200px;
        max-height: 35vh;
    }
    
    .textarea-container {
        min-height: 200px;
        max-height: 35vh;
        height: 100%;
        overflow: hidden;
    }
    
    .code-editor {
        height: 100% !important;
        max-height: 100%;
        overflow: hidden;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
}
