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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.compile-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.compile-button:hover {
    background-color: #2980b9;
}

.compile-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-pane, .right-pane {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    margin: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.left-pane {
    flex: 1;
    margin-right: 0.5rem;
}

.right-pane {
    flex: 1;
    margin-left: 0.5rem;
}

.divider {
    width: 4px;
    background-color: #ecf0f1;
    cursor: col-resize;
    margin: 1rem 0;
}

.pane-header {
    background-color: #34495e;
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.pane-header h3 {
    font-weight: 500;
}

#editor-container {
    flex: 1;
    border: none;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
}

#pdf-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #f8f9fa;
    overflow: auto;
    padding: 1rem;
}

#pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: white;
    display: none;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ecf0f1;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #e74c3c;
    background-color: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem;
    max-width: 90%;
    text-align: center;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ecf0f1;
    background-color: #fafafa;
}

.tab {
    appearance: none;
    border: none;
    background: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: #34495e;
    border-bottom: 2px solid transparent;
}

.tab.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab + .tab {
    margin-left: 0.25rem;
}

.tab-panels {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.tab-panel {
    flex: 1;
    overflow: auto;
    height: 100%;
}

#source-tab {
    display: flex;
    flex-direction: column;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
    padding: 1rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    padding: 1rem;
}

.form-section h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.5rem 1rem;
}

.form-grid label {
    font-size: 0.9rem;
    color: #34495e;
}

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="tel"],
.form-grid input[type="number"],
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 0.95rem;
}

.form-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.defaults-buttons {
    display: flex;
    gap: 0.5rem;
}

.preset-button {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid #3498db;
    border-radius: 4px;
    background-color: #ffffff;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.preset-button:hover {
    background-color: #3498db;
    color: white;
}

.preset-button:active {
    transform: translateY(1px);
}

/* Responsive form layout */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .left-pane, .right-pane {
        flex: none;
        height: 50vh;
        margin: 0.5rem;
    }
    
    .divider {
        height: 4px;
        width: auto;
        margin: 0 0.5rem;
    }
    
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
} 