/* --- Global & Theme Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

/* ১. বডি ব্যাকগ্রাউন্ড (Home Page EXACT Match) */
body {
    background-color: #0f172a; 
    background-image: radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.1) 0, transparent 50%), 
                      radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.1) 0, transparent 50%);
    background-attachment: fixed;
    color: #f1f5f9;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ২. ন্যাভবার */
.navbar {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    padding: 10px 5%;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 70px; position: sticky; top: 0; z-index: 1000;
}
.navbar .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; height: 100%; }
.navbar .logo .icon-box {
    width: 40px; height: 40px; border-radius: 8px; background: transparent;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    margin-top: 5px; 
}
.navbar .logo .icon-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.navbar .logo-text {
    font-size: 1.5rem; font-weight: 700; color: #3b82f6; display: flex; align-items: center; line-height: 1;
}

/* Logo Animation */
.logo-letter {
    display: inline-block; opacity: 0; transform: translate(0, 0);
    animation-duration: 0.5s; animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes comeFromTop { 0% { opacity: 0; transform: translateY(-30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes comeFromBottom { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes comeFromRight { 0% { opacity: 0; transform: translateX(30px); } 100% { opacity: 1; transform: translateX(0); } }
.anim-top { animation-name: comeFromTop; }
.anim-bottom { animation-name: comeFromBottom; }
.anim-right { animation-name: comeFromRight; }


/* ৩. মেইন কন্টেইনার */
.main-container { max-width: 1000px; width: 95%; margin: 60px auto; padding: 0; flex: 1; }

/* ৪. টুল কন্টেইনার (Theme Fixed) */
.tool-container {
    position: relative;
    padding: 40px 30px;
    border-radius: 20px;
    overflow: hidden;
    /* Animated Gradient Background */
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #1e1b4b 75%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientFlowNormal 15s ease infinite; 
    border: 1px solid rgba(255, 255, 255, 0.05);
}
@keyframes gradientFlowNormal {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ৫. টুল হেডার */
.tool-header {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; margin-bottom: 40px; padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; z-index: 2;
}
.tool-logo {
    width: 64px; height: 64px; border-radius: 14px;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden; flex-shrink: 0;
}
.tool-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-title {
    margin: 0; color: #ffffff; font-size: 1.8rem; font-weight: 600;
}


/* ৬. টেক্সট এরিয়া */
.pdf-box { position: relative; z-index: 2; }

textarea {
    width: 100%; height: 350px; padding: 20px;
    background-color: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px; line-height: 1.6; resize: vertical; outline: none;
    transition: all 0.3s ease;
}
textarea:focus {
    border-color: #3b82f6; background-color: rgba(15, 23, 42, 0.9);
}

/* ৭. বাটনস (NO SHADOW / NO GLOW) */
.action-buttons {
    display: flex; justify-content: center; gap: 20px; margin-top: 30px; flex-wrap: wrap;
}
.btn {
    padding: 12px 30px; border: none; border-radius: 8px;
    font-size: 16px; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    transition: transform 0.2s ease, background 0.3s ease; /* Only smooth color/transform */
    min-width: 140px; justify-content: center;
    /* Shadow Removed */
    box-shadow: none !important; 
}

/* Primary (Download) - Flat Gradient */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: white;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
    transform: translateY(-2px);
}

/* Secondary (Clear) - Flat Color */
.btn-secondary {
    background-color: #334155;
    color: #e2e8f0; border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover {
    background-color: #ef4444; color: white; border-color: #ef4444; 
    transform: translateY(-2px);
}

/* Warning (Preview) - Flat Gradient */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}


/* ৮. মোডাল (Responsive Fix) */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #1e293b;
    margin: 5% auto; padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 80%; height: 85%;
    border-radius: 15px;
    display: flex; flex-direction: column;
}
.modal-header {
    padding: 15px 25px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { color: #f1f5f9; font-weight: 500; }
.close-btn { color: #94a3b8; font-size: 28px; cursor: pointer; }
.close-btn:hover { color: #ef4444; }
.modal-body { flex: 1; padding: 0; background-color: #525659; } /* PDF viewer styling */

iframe { width: 100%; height: 100%; border: none; }

/* Footer */
footer {
    text-align: center; padding: 25px; color: #94a3b8; background-color: #0b0f19;
    margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 10px; height: auto; padding: 15px; }
    textarea { height: 250px; }
    .action-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    /* Modal Fullscreen on Mobile (if used) */
    .modal-content { width: 95%; height: 90%; margin: 5% auto; }
}