/* Font Face Definition */
@font-face {
    font-family: 'Priyanka';
    src: url('../fonts/priyaanka.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #0066ff;
    /* A clean, modern blue */
    --hover: #0056e0;
    --border: #dee2e6;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --card-bg: #fff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --focus-ring: rgba(0, 102, 255, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.main-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 3rem 1.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Card Styling */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    /* Slightly tighter radius */
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 500px;
    /* Fixed height for consistency */
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--card-bg);
    /* Clean white header */
}

.card-header label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.card-body {
    flex: 1;
    padding: 0;
    position: relative;
}

textarea {
    width: 100%;
    height: 100%;
    border: none;
    padding: 1.25rem;
    resize: none;
    font-size: 1.1rem;
    line-height: 1.6;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    /* Inherit unless overwritten for Anu */
    color: #333;
}

/* Anu Font styling for output ONLY */
/* Prioritize the embedded font first */
#anuOutput {
    font-family: 'Priyanka', 'AnuScript', 'Apple', sans-serif;
    font-size: 1.4rem;
    /* Slightly larger for readability */
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafbfc;
    /* Extremely light grey footer */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--hover);
    border-color: var(--hover);
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-dark);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: #f1f3f5;
    border-color: #ccedff;
    color: var(--primary);
}

/* Mapping Select */
.mapping-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: #fff;
    color: var(--text-dark);
    font-size: 0.9rem;
    outline: none;
}

select:focus {
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }

    .card {
        height: auto;
        min-height: 300px;
    }
}