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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

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

.navbar {
    background: #2c2c2c;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-left {
    font-size: 20px;
    font-weight: 600;
}

.navbar-right {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.navbar-link {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-link:hover {
    color: white;
}

.main-content {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.input-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.input-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 300px;
}

.input-group-small {
    flex: 0 0 150px;
    min-width: 150px;
}

.label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.input:focus {
    outline: none;
    border-color: #5cb85c;
}

.input-optional {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #5cb85c;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #4cae4c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.result-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-label {
    color: #333;
    font-weight: 500;
    font-size: 16px;
    margin: 0;
}

.result-content {
    display: flex;
    gap: 20px;
    min-height: 400px;
}

.result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.panel-title {
    font-weight: 500;
    font-size: 14px;
    color: #666;
    margin: 0;
}

.result-textarea {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
    resize: none;
    background: #fafafa;
    color: #333;
}

.result-textarea:focus {
    outline: none;
    border-color: #5cb85c;
    background: white;
}

.result-textarea.has-content {
    background: white;
}

.preview-area {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

.preview-area.empty {
    background: #fafafa;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    color: #721c24;
    font-size: 14px;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    color: #155724;
    font-size: 14px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .navbar-right {
        gap: 15px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .input-group-small {
        flex: 1;
        min-width: auto;
    }
    
    .result-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .result-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
} 