/* ========== গ্লোবাল স্টাইল ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --secondary-color: #f59e0b;
    --border-dark: #000;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
}

html, body {
    height: 100%;
    font-family: 'Noto Sans Bengali', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
}

/* ========== মেইন কন্টেইনার ========== */
.container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    height: auto;
    min-height: calc(100vh - 30px);
}

/* ========== বাম প্যানেল: ইনপুট ========== */
.input-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    max-height: 100vh;
}

.panel-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
}

.panel-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
}

.panel-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== ফর্ম স্টাইল ========== */
.form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.required {
    color: #ef4444;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 160px;
    white-space: pre-wrap;
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ========== ফন্ট সাইজ কন্ট্রোল ========== */
.form-divider {
    height: 2px;
    background: #e5e7eb;
    margin: 25px 0;
}

.section-title {
    color: var(--primary-color);
    font-size: 16px;
    margin: 20px 0 15px 0;
    font-weight: 700;
}

.font-size-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.font-size-group label {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 13px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.font-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.font-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.font-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.font-size-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 13px;
    min-width: 45px;
    text-align: right;
}

/* ========== অ্যাকশন বাটন ========== */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* ========== ডান প্যানেল: প্রিভিউ ========== */
.preview-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.preview-controls h2 {
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
}

.export-buttons {
    display: flex;
    gap: 12px;
}

.btn-export {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 5px;
}

.btn-png {
    background: #3b82f6;
    color: white;
}

.btn-png:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-jpg {
    background: #f59e0b;
    color: white;
}

.btn-jpg:hover {
    background: #d97706;
    transform: translateY(-2px);
}

/* ========== প্রিভিউ কন্টেইনার ========== */
.preview-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
}

#preview {
    background: white;
    padding: 35px 30px;
    width: 100%;
    max-width: 650px;
    aspect-ratio: 8.5/11;
    border: 3px dashed var(--border-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    line-height: 1.1;
    text-align: center;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.placeholder {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== প্রিভিউ কন্টেন্ট স্টাইল ========== */

/* প্রোমো ট্যাগ */
.promo-tag {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin: 0 0 8px 0;
    padding: 0;
    text-transform: none;
    text-align: center;
}

/* টাইটেল */
.preview-title {
    font-weight: 700;
    color: var(--border-dark);
    margin: 0 0 6px 0;
    padding: 0 0 8px 0;
    word-wrap: break-word;
    border-bottom: 3px solid var(--border-dark);
    text-align: center;
}

/* সাবটাইটেল */
.preview-subtitle {
    color: var(--text-dark);
    margin: 0 0 12px 0;
    padding: 0;
    font-style: italic;
    text-align: center;
    font-weight: 500;
}

/* বিষয়বস্তু */
.preview-body {
    text-align: justify;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.1;
    white-space: pre-wrap;
}

.preview-body p {
    margin: 0 0 3px 0;
    padding: 0;
    line-height: 1.1;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.preview-body ul,
.preview-body ol {
    margin: 0 0 8px 0;
    padding-left: 20px;
    list-style-position: outside;
}

.preview-body li {
    margin: 0 0 2px 0;
    padding: 0;
    line-height: 1.1;
    list-style-type: disc;
}

.preview-body ol li {
    list-style-type: decimal;
}

/* বোল্ড টেক্সট স্টাইল */
.preview-body strong,
.preview-body li strong,
.preview-body p strong {
    font-weight: 700;
    color: var(--text-dark);
}

/* ফুটার */
.preview-footer {
    font-size: 11px;
    color: var(--text-muted);
    margin: 12px 0 0 0;
    padding: 8px 0 0 0;
    border-top: 1px solid #d1d5db;
    text-align: center;
}

/* ========== স্ক্রলবার স্টাইলিং ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========== রেসপন্সিভ ডিজাইন ========== */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .input-panel,
    .preview-panel {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .input-panel {
        padding: 20px;
    }

    .preview-panel {
        padding: 20px;
    }

    #preview {
        padding: 30px 25px;
        max-width: 100%;
    }

    .panel-header h1 {
        font-size: 22px;
    }

    .export-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-export {
        width: 100%;
    }
    }
