/* --- 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; }

/* ১. বডি ব্যাকগ্রাউন্ড (হোম পেজের সাথে মিল) */
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 Styling */
.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; /* Alignment Fix */
}
.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 Classes */
.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: 900px; width: 95%; margin: 60px auto; padding: 0; flex: 1; }

/* ৪. টুল কন্টেইনার (কার্ডে হোভার ইফেক্ট নেই) */
.tool-container {
    position: relative;
    padding: 40px 30px;
    border-radius: 20px;
    overflow: hidden;
    
    /* Animation (No Hover Effect) */
    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);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

@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);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 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;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}


/* ৬. কনভার্টার বক্স স্টাইল */
.converter-box {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; position: relative; z-index: 2;
    flex-wrap: wrap;
}

/* ইনপুট ব্লক */
.input-block {
    flex: 1; min-width: 250px; display: flex; flex-direction: column; gap: 10px;
}
.input-block label {
    font-weight: 500; color: #cbd5e1; font-size: 0.95rem; margin-left: 5px;
}

/* ইনপুট এবং সিলেক্ট ফিল্ড (Glass Style) */
input[type="number"], select {
    width: 100%; padding: 15px;
    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-size: 1rem; outline: none; transition: 0.3s;
}

/* ইনপুটে ফোকাস হলে হোভার ইফেক্ট */
input:focus, select:focus {
    border-color: #3b82f6; background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* এক্সচেঞ্জ বাটন (বাটনে হোভার ইফেক্ট আছে) */
.exchange-icon {
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #3b82f6; font-size: 1.2rem; cursor: pointer;
    transition: all 0.3s ease; margin-top: 30px; /* Align with inputs */
}

/* BUTTON HOVER EFFECT */
.exchange-icon:hover {
    background: #3b82f6; color: white;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* ৭. ফর্মুলা বক্স */
.formula-box {
    margin-top: 30px; padding: 15px; text-align: center;
    background: rgba(15, 23, 42, 0.5); border-radius: 10px;
    color: #94a3b8; font-family: monospace; font-size: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    position: relative; z-index: 2;
}

/* ফুটার */
footer {
    text-align: center; padding: 25px; color: #94a3b8; background-color: #0b0f19;
    margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* রেসপন্সিভ */
@media (max-width: 768px) {
    .converter-box { flex-direction: column; gap: 15px; }
    .exchange-icon { margin-top: 0; transform: rotate(90deg); }
    .exchange-icon:hover { transform: rotate(270deg) scale(1.1); }
    .tool-header { flex-direction: column; gap: 10px; text-align: center; }
}