@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2d5f5d;
    --accent-green: #4caf50;
    --accent-yellow: #ffd54f;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.form-section,
.preview-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-section:hover,
.preview-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent-yellow);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

input::placeholder {
    color: #adb5bd;
}

select {
    cursor: pointer;
}

.signature-preview {
    min-height: 250px;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#signatureCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button-group {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green) 0%, #45a049 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
}

.copy-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-message.show {
    opacity: 1;
}

.copy-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.copy-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Signature Styles */
.email-signature {
    font-family: Arial, sans-serif;
    max-width: 600px;
}

.signature-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.signature-logo {
    width: 120px;
    height: auto;
}

.signature-divider {
    width: 2px;
    height: 60px;
    background: var(--primary-green);
}

.signature-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-green);
    margin: 0 0 4px 0;
}

.signature-info p {
    font-size: 14px;
    color: var(--text-dark);
    margin: 0;
}

.signature-contact {
    margin-left: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-dark);
}

.contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
}

.signature-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 3px solid var(--primary-green);
    position: relative;
}

.footer-curve {
    position: absolute;
    right: 0;
    top: -30px;
    width: 150px;
    height: 30px;
}

.footer-logo {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: auto;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }

    .signature-header {
        flex-direction: column;
        text-align: center;
    }

    .signature-divider {
        width: 60px;
        height: 2px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .form-section,
    .preview-section {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }
}