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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.editor-panel, .preview-panel {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.editor-panel h2, .preview-panel h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.config-section {
    margin-bottom: 20px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.config-header {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.3s;
}

.config-header:hover {
    background: #e9ecef;
}

.config-header h3 {
    color: #34495e;
    margin: 0;
    font-size: 1.2rem;
}

.toggle-icon {
    color: #7f8c8d;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.config-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.config-content {
    padding: 20px;
    background: white;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.config-content.collapsed {
    max-height: 0;
    padding: 0 20px;
}


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

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

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
}


.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
}

.social-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e1e8ed;
}

.social-section h4 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.social-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.social-item .form-group {
    flex: 1;
    margin-bottom: 0;
}

.social-item .form-group:first-child {
    flex: 0 0 auto;
    min-width: 140px;
}

.preview-container {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 25px;
    min-height: 200px;
}

.signature-preview {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: inline-block;
    width: auto;
}

.actions {
    text-align: center;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
    margin-right: 10px;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.copy-success {
    display: none;
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 500;
}

.copy-success.show {
    display: inline-block;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    color: #555;
}

/* Signature Templates based on screenshot */
.signature-style1 {
    font-family: Arial, sans-serif;
    border-bottom: 2px solid #d3d3d3;
    padding: 10px;
    padding-bottom: 15px;
    display: inline-block;
    width: auto;
    min-width: fit-content;
}

.signature-style1 .name {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 2px;
}

.signature-style1 .title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.signature-style1 .website {
    font-size: 14px;
    color: #0066cc;
    text-decoration: underline;
    margin-bottom: 5px;
}

.signature-style1 .phone {
    font-size: 14px;
    color: #000;
    margin-bottom: 10px;
}

.signature-style1 .company-logo {
    margin-top: 10px;
}

.signature-style1 .company-logo img {
    height: 30px;
    vertical-align: middle;
}

.signature-style1 .company-name {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    font-family: Arial, sans-serif;
}

.signature-style2 {
    font-family: Arial, sans-serif;
    border-bottom: 2px solid #d3d3d3;
    padding: 10px;
    padding-bottom: 15px;
    display: inline-block;
    width: auto;
    min-width: fit-content;
}

.signature-style2 .main-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    width: 100%;
}

.signature-style2 .left-column {
    flex: 1;
    padding-right: 20px;
}

.signature-style2 .right-column {
    flex-shrink: 0;
    text-align: right;
}

.signature-style2 .name {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 2px;
}

.signature-style2 .title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.signature-style2 .contact-item {
    font-size: 14px;
    color: #000;
    margin-bottom: 2px;
}

.signature-style2 .contact-item strong {
    font-weight: bold;
}

.signature-style2 .website {
    font-size: 14px;
    color: #000;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

.signature-style2 .company-logo img {
    height: 35px;
    vertical-align: middle;
}

.signature-style2 .company-logo {
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.signature-style3 {
    font-family: Arial, sans-serif;
    border-bottom: 2px solid #d3d3d3;
    padding: 10px;
    padding-bottom: 15px;
    display: inline-block;
    width: auto;
    min-width: fit-content;
}

.signature-style3 .company-logo img {
    height: 35px;
    vertical-align: middle;
    margin-bottom: 10px;
}

.signature-style3 .company-logo {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    margin-bottom: 10px;
}

.signature-style3 .name {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 2px;
}

.signature-style3 .title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.signature-style3 .contact-item {
    font-size: 14px;
    color: #000;
    margin-bottom: 2px;
}

.signature-style3 .contact-item strong {
    font-weight: bold;
}

.signature-style3 .website {
    font-size: 14px;
    color: #000;
    font-weight: bold;
    margin-top: 8px;
}

.signature-style4 {
    font-family: Arial, sans-serif;
    border-bottom: 2px solid #d3d3d3;
    padding: 10px;
    padding-bottom: 15px;
    display: inline-block;
    width: auto;
    min-width: fit-content;
    position: relative;
}

.signature-style4 .header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    width: 100%;
}

.signature-style4 .personal-info {
    flex: 1;
    padding-right: 30px;
}

.signature-style4 .social-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.signature-style4 .name {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 2px;
}

.signature-style4 .title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.signature-style4 .contact-info {
    margin-bottom: 10px;
}

.signature-style4 .contact-item {
    font-size: 14px;
    color: #000;
    margin-bottom: 2px;
}

.signature-style4 .contact-item strong {
    font-weight: bold;
}

.signature-style4 .social-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.signature-style4 .social-icon img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.signature-style4 .company-logo img {
    height: 25px;
    vertical-align: middle;
}

.signature-style4 .company-logo {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .editor-panel, .preview-panel {
        padding: 20px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}