/* ==========================================================================
   ১. গ্লোবাল রিসেট এবং বেস স্টাইলিং (Global Reset & Base Styles)
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #121214; /* ডিপ ডার্ক ব্যাকগ্রাউন্ড, যা ইমেজের সাথে সামঞ্জস্যপূর্ণ */
    color: #e2e8f0;
    font-family: 'Hind Siliguri', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   ২. অ্যাপ হেডার (Application Header)
   ========================================================================== */
.app-header {
    background-color: #1a1a1e;
    border-bottom: 1px solid #2d2d34;
    padding: 0 24px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 22px;
}

.app-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.5px;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #38bdf8;
}

.divider {
    color: #475569;
    font-size: 12px;
}

/* ==========================================================================
   ৩. মেইন ওয়ার্কস্পেস লেআউট গ্রিড (Main Workspace Grid Layout)
   ========================================================================== */
.ide-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    gap: 20px;
}

/* দুই কলাম বিশিষ্ট গ্রিড লেআউট */
.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    flex: 1;
    min-height: 500px;
}

/* ==========================================================================
   ৪. এডিটর প্যানেল এবং হেডার (Editor Panel & Headers)
   ========================================================================== */
.panel {
    background-color: #16161a; /* ইমেজের মতো ডার্ক প্যানেল কালার */
    border: 1px solid #24242b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    /* [FIXED HEIGHT]: ডেস্কটপ মোডে প্যানেলের মোট ফিক্সড হাইট সেট করা হলো */
    height: 500px !important; 
}

.panel-header {
    background-color: #1a1a1f;
    border-bottom: 1px solid #24242b;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.tab-indicator {
    font-size: 15px;
    font-weight: 600;
    color: #38bdf8; /* ইমেজের স্কাই ব্লু টেক্সট কালার */
    display: flex;
    align-items: center;
}

/* ==========================================================================
   ৫. কোড উইন্ডো এবং lijn নাম্বার (Editor Windows & Line Numbers)
   ========================================================================== */
.editor-body {
    display: flex;
    flex: 1;
    position: relative;
    background-color: #16161a;
    /* [FIXED HEIGHT]: ৫00px প্যানেল থেকে ৪৮px হেডার বাদ দিয়ে মেইন কোড এরিয়া ফিক্সড করা হলো */
    height: 452px !important;
    max-height: 452px !important;
    overflow: hidden;
}

/* কাস্টম বাম ও ডান পাশের লাইন নাম্বার গাটার (Gutter) */
.line-numbers-wrapper {
    background-color: #16161a;
    color: #4a4a5a; /* একটু হালকা টেক্সট কালার যেন কোডের চেয়ে ড্রপড দেখায় */
    text-align: right;
    padding: 16px 12px 16px 16px;
    user-select: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre;
    overflow: hidden;
    min-width: 52px;
}

/* স্ক্রল কন্ট্রোল র‍্যাপার */
.textarea-scroll-wrapper {
    flex: 1;
    overflow: auto;
    height: 100%;
}

/* বাংলা কোড ইনপুট টেক্সট এরিয়া */
textarea.code-area {
    background-color: transparent;
    color: #f8f8f2;
    border: none;
    padding: 16px 16px 16px 4px;
    resize: none;
    font-family: 'JetBrains Mono', 'Hind Siliguri', monospace;
    font-size: 14px;
    line-height: 1.6;
    width: 100%;
    height: 100%;
    white-space: pre;
    outline: none;
    overflow: hidden; /* স্ক্রলবার শুধুমাত্র স্ক্রল র‍্যাপার কন্ট্রোল করবে */
}

/* কনভার্টেড কোড কন্টেইনার */
.converted-code-wrapper {
    width: 100%;
    height: 100%;
}

.converted-code-wrapper pre {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.converted-code-wrapper code {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

/* ==========================================================================
   ৬. কাস্টম স্ক্রলবার ডিজাইন (Custom Premium Scrollbars)
   ========================================================================== */
.textarea-scroll-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.textarea-scroll-wrapper::-webkit-scrollbar-track {
    background: #16161a;
}
.textarea-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #2a2a35;
    border-radius: 4px;
}
.textarea-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #3f3f4e;
}

/* ==========================================================================
   ৭. বাটন এবং ইউটিলিটি অ্যাকশনবার (Interactive Controls)
   ========================================================================== */
.action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.btn-convert {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
}

.btn-convert:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.btn-convert:active {
    transform: translateY(1px);
}

.btn-icon {
    font-size: 16px;
}

/* কপি বাটন স্টাইল (ইমেজের মতো বর্ডার এবং প্যাডিং ট্র্যাকিং) */
.copy-button {
    background-color: #24242b;
    border: 1px solid #32323d;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.copy-button:hover {
    background-color: #2d2d36;
    color: #ffffff;
    border-color: #4a4a5a;
}

/* ==========================================================================
   ⑧. ফুটার টুলস প্যানেল (Footer Online Runner Tools)
   ========================================================================== */
.footer-tools {
    background-color: #16161a;
    border: 1px solid #24242b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: auto;
}

.compiler-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.run-label {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}

.compiler-buttons {
    display: flex;
    gap: 12px;
}

.compiler-link {
    background-color: #1a1a1f;
    color: #cbd5e1;
    border: 1px solid #24242b;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.compiler-link:hover {
    background-color: #24242b;
    color: #38bdf8;
    border-color: #38bdf8;
}

/* ==========================================================================
   ৯. রেস্পন্সিভ মোবাইল মোড ওভাররাইড (Strict Mobile Constraints - Fixed 350px)
   ========================================================================== */
@media (max-width: 900px) {
    .workspace {
        grid-template-columns: 1fr; /* মোড পরিবর্তন হয়ে কলামগুলো নিচে নিচে বসবে */
        min-height: auto;
        gap: 16px;
    }

    /* মোট হাইট রুল সেট করা হচ্ছে (৩৫০ পিক্সেল কোড ভিউ + ৪৮ পিক্সেল প্যানেল হেডার) */
    .panel {
        height: 398px !important;
    }

    /* উভয় কোড এরিয়ার হাইট ৩৫০ পিক্সেল ফিক্সড করা হলো */
    .editor-body {
        height: 350px !important;
        max-height: 350px !important;
        flex: none;
    }
}
