/* Main container-letter */
.container-letter {
    max-width: 960px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    line-height: 1.2;
}

/* Header title */
.header-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

/* Form styling */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

input[type="text"] {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    background-color: #f7fafc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    outline: none;
}

/* Button group */
.button-group {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.signature-both {
    margin-top: 4rem;
    display: flex;
    gap: 4rem;
}

button {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
    transform: translateY(-1px);
}

#generateBtn {
    background-color: #2f855a;
    color: #ffffff;
}

#generateBtn:hover {
    background-color: #276749;
}

#printBtn {
    background-color: #5a67d8;
    color: #ffffff;
}

#printBtn:hover {
    background-color: #4c51bf;
}

#clearBtn {
    background-color: #e53e3e;
    color: #ffffff;
}

#clearBtn:hover {
    background-color: #c53030;
}

/* Letter output */
#letterOutput {
    display: none;
    margin-top: 1rem;
    padding: 2rem;
    background-color: #fefefe;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    font-family: 'Noto Serif Devanagari', serif;
}

.letter {
    font-size: 1.1rem;
    color: #1a202c;
}

.letter-header {
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.letter-header p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.letter-header p:first-child {
    margin-left: -2rem;
}

.letter-subject {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 1rem 0;
}

.letter-body p {
    margin-bottom: 1.25rem;
}

.letter-signature {
    margin-top: 3.5rem;
    text-align: center;
    line-height: 1.4;
    font-size: 1.1rem;
    margin-left: 15rem;
}

.letter-recommendation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.letter-recommendation h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    text-align: center;
}

/* Print-specific styles */
@media print {

    header,
    footer {
        display: none;
    }

    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #ffffff;
        padding: 0;
        font-family: 'Noto Serif Devanagari', serif;
        color: #000000;
    }

    .container-letter {
        box-shadow: none;
        padding: .5rem;
        margin: 0;
        width: 100%;
        max-width: 210mm;
    }

    .header-title,
    .form-group,
    .button-group {
        display: none;
    }

    #letterOutput {
        display: block !important;
        border: none;
        padding: 0;
        margin: 0;
        background: #ffffff;
        font-size: 12pt;
    }

    .letter {
        font-family: 'Noto Serif Devanagari', serif;
        color: #000000;
    }

    .letter-subject {
        font-size: 14pt;
        font-weight: 700;
    }

    .letter-header,
    .letter-signature,
    .letter-recommendation {
        font-size: 12pt;
    }

    .letter-header p {
        margin-left: 2rem;
    }

    .letter-recommendation {
        border-top: 1px solid #000000;
    }


    .letter-signature {
        text-align: center;
        padding-right: 10mm;
    }
}

/* Responsive adjustments */
@media screen and (max-width: 800px) {
    .container-letter {
        padding: 1.5rem;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .letter {
        font-size: 1rem;
    }

    .button-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    button {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .container-letter {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.25rem;
    }

    input[type="text"] {
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    .letter {
        font-size: 0.9rem;
    }

    .letter-subject {
        font-size: 1rem;
    }
.letter-signature {
    margin-left: 5rem;
}
    .letter-recommendation h3 {
        font-size: 1rem;
    }
}