:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color-dark: #6a11cb;
    --text-dark: #2c3e50;
    --text-light: #8492a6;
    --background-color: #f8f9fc;
    --container-bg: #ffffff;
    --border-color: #e0e7ff;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* --- Header and Navigation --- */
.main-header {
    background: var(--container-bg);
    padding: 0 5%;
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Header Logo Styles --- */
.logo {
    display: flex; /* আইটেমগুলোকে পাশাপাশি রাখে */
    align-items: center; /* উল্লম্বভাবে মাঝখানে রাখে */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo img {
    max-height: 40px; /* লোগোর উচ্চতা সীমাবদ্ধ করা হয়েছে */
    width: auto;
    margin-right: 10px; /* লোগো এবং লেখার মধ্যে ফাঁকা জায়গা */
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 15px;
    transition: all 0.3s;
    position: relative;
    border-radius: 6px;
}

.main-nav a:not(.btn-login):hover {
    background-color: #f0f2f5;
}

.main-nav a.active {
    color: white;
    background: var(--primary-gradient);
    font-weight: 500;
}

.btn-login {
    background-color: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: transparent !important;
    color: var(--primary-color-dark);
}

/* --- Main Content & Layout --- */
.main-content {
    text-align: center;
    padding: 40px 20px 20px 20px;
}

.main-content h1 {
    font-size: 2.8rem;
    
}

.main-content .subtitle {
    font-size: 1rem;
    color: var(--text-light);
}

.main-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
    align-items: stretch;
}

.content-container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-slot {
    display: flex;
    justify-content: center;
}

.ad-slot-side {
    width: 160px;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    height: 600px;
}

.ad-slot-top-bottom {
    width: 100%;
    max-width: 728px;
    margin: 20px 0;
}

/* --- Core App Container --- */
.container {
    width: 100%;
    background-color: var(--container-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px;
    background-color: #fdfdff;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.upload-area:hover {
    background-color: #f9faff;
    border-color: #667eea;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-area p {
    margin: 5px 0 0 0;
    font-size: 1.1rem;
}

.upload-area .supported-formats {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.upload-progress {
    display: none;
    margin-top: 15px;
    font-weight: 500;
    color: var(--primary-color-dark);
}

.select-files-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.select-files-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(118, 75, 162, 0.3);
}

.controls-wrapper {
    padding: 25px;
    background: #fdfdff;
    border-top: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.control-group label {
    font-weight: 500;
}

.btn-group {
    display: flex;
}

.btn-group button {
    background-color: #f0f2f5;
    border: 1px solid #d9dce1;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: all 0.3s;
}

.btn-group button.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.btn-group button:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group button:last-child {
    border-radius: 0 6px 6px 0;
}

.custom-settings {
    display: none;
    width: 100%;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.setting-item label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.resize-inputs {
    display: flex;
    gap: 10px;
}

.resize-inputs input {
    width: 100px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group label {
    color: var(--text-dark);
}

/* --- Image List Styles --- */
.image-list-container {
    padding: 0 25px 10px 25px;
}

.image-list-header {
    display: grid;
    font-weight: 700;
    padding: 15px 10px;
    border-bottom: 2px solid var(--border-color);
}

.image-row {
    display: grid;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.compression-page .image-list-header,
.compression-page .image-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
}

.convert-page .image-list-header,
.convert-page .image-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
}

.watermark-page .image-list-header,
.watermark-page .image-row {
    grid-template-columns: 3fr 1fr 1fr 1fr;
}

.col-name {
    word-break: break-all;
    padding-right: 10px;
    text-align: left;
}

.col-data,
.col-action {
    text-align: center;
}

.status-success {
    color: var(--success-color);
    font-weight: 500;
}

.status-compressing {
    color: #2563eb;
    font-weight: 500;
}

.download-btn {
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #059669;
}

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--primary-gradient); /* Changed to primary gradient */
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Added a subtle top border */
}

/* Optional: Improve button visibility on the new background */
.footer-bar .clear-list-btn,
.footer-bar .download-all-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-bar .clear-list-btn:hover,
.footer-bar .download-all-btn:not(:disabled):hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.clear-list-btn,
.download-all-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.clear-list-btn:hover,
.download-all-btn:not(:disabled):hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.download-all-btn:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: #999;
    cursor: not-allowed;
}

/* --- FEATURES PAGE STYLES --- */
.features-page-content { max-width: 1100px; margin: 0 auto; padding: 20px; }
.features-hero { text-align: center; padding: 60px 20px; }
.features-hero h1 { font-size: 2.8rem; margin-bottom: 15px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 20px; }
.feature-card { background: var(--container-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 30px; text-align: center; box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px -5px rgba(0,0,0,0.1); }
.feature-icon { width: 50px; height: 50px; margin: 0 auto 20px auto; background: var(--primary-gradient); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 28px; height: 28px; }
.feature-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-light); }
.features-cta { text-align: center; padding: 80px 20px; }
.features-cta h2 { font-size: 2.2rem; margin-bottom: 10px; }
.cta-button { display: inline-block; background: var(--primary-gradient); color: white; padding: 15px 35px; border-radius: 8px; margin-top: 20px; font-size: 1.1rem; font-weight: 500; text-decoration: none; box-shadow: 0 4px 20px rgba(118, 75, 162, 0.4); transition: all 0.3s ease; }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(118, 75, 162, 0.5); }

/* --- WATERMARK PAGE STYLES --- */
.watermark-workspace { display: flex; gap: 30px; padding: 20px; align-items: stretch; }
.preview-area { flex: 2; background-color: #f0f2f5; border: 1px solid var(--border-color); border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; min-height: 400px; }
#canvas { max-width: 100%; max-height: 100%; object-fit: contain; display: none; cursor: grab; }
#canvas:active { cursor: grabbing; }
#preview-placeholder { text-align: center; color: var(--text-light); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.controls-panel { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.control-section { background: var(--container-bg); padding: 15px; border: 1px solid var(--border-color); border-radius: 8px; }
.control-label { font-weight: 700; margin-bottom: 15px; display: block; font-size: 1.1rem; }
.control-button { width: 100%; padding: 12px; border: 1px solid var(--border-color); background: #f8f9fc; border-radius: 6px; font-weight: 500; cursor: pointer; transition: background-color 0.3s; }
.control-button:hover { background-color: #eff2f7; }
.tabs { display: flex; gap: 10px; }
.tab-button { flex: 1; padding: 10px; border: 1px solid var(--border-color); background: #f8f9fc; border-radius: 6px; font-weight: 500; cursor: pointer; }
.tab-button.active { background: var(--primary-gradient); color: white; border-color: transparent; }
.tab-content { display: none; flex-direction: column; gap: 15px; margin-top: 15px; }
.tab-content.active { display: flex; }
.control-item, .control-item-group { display: flex; flex-direction: column; gap: 8px; }
.control-item input[type="text"], .control-item input[type="number"] { width: 100%; padding: 8px; border-radius: 4px; border: 1px solid var(--border-color); }
.control-item-group { flex-direction: row; gap: 15px; }
.control-item-group > .control-item { flex: 1; }
input[type="color"] { width: 100%; height: 38px; border: 1px solid var(--border-color); padding: 2px; border-radius: 4px; cursor: pointer; }
.slider { width: 100%; }
.position-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.position-grid button { padding: 10px; font-size: 1.5rem; line-height: 1; border: 1px solid var(--border-color); background: #f8f9fc; cursor: pointer; border-radius: 4px; }
.position-grid button.active { background: var(--primary-gradient); color: white; border-color: transparent; }

/* --- PHOTO EDITOR PAGE STYLES --- */
.editor-controls-bar, .resize-controls-bar { display: flex; justify-content: center; align-items: center; gap: 15px; padding: 15px; background-color: var(--container-bg); border-bottom: 1px solid var(--border-color); }
.resize-controls-bar label { font-size: .95rem; font-weight: 500; color: var(--text-dark); }
.resize-controls-bar input[type=number] { width: 80px; padding: 5px 8px; border: 1px solid var(--border-color); border-radius: 4px; text-align: center; -moz-appearance: textfield; }
.resize-controls-bar input[type=number]::-webkit-inner-spin-button, .resize-controls-bar input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.resize-controls-bar .editor-btn.small-btn { padding: 7px 18px; font-size: .9rem; }
#tui-image-editor-container { width: 100%; }
.tui-image-editor-container .tui-image-editor-submenu { box-shadow: var(--shadow); }
.tui-image-editor-container .tui-image-editor-header-logo, .tui-image-editor-container .tui-image-editor-header-buttons { display: none; }

/* --- MOBILE MENU STYLES --- */
.menu-toggle { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 25px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001; }
.menu-toggle .bar { width: 100%; height: 3px; background-color: var(--text-dark); border-radius: 10px; transition: all .3s ease-in-out; }
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1200px) { .ad-slot-side { display: none; } .main-wrapper { padding: 0 15px; } }
@media (max-width: 900px) { .watermark-workspace { flex-direction: column; } .preview-area { min-height: 300px; max-height: 40vh; width: 100%; } .controls-panel { width: 100%; } }
@media (max-width: 768px) {
    .header-container { padding: 0 20px; }
    .main-nav { position: fixed; top: 70px; right: -100%; width: 280px; height: calc(100vh - 70px); background: white; box-shadow: -5px 0 15px rgba(0,0,0,.1); flex-direction: column; align-items: flex-start; padding: 20px; gap: 0; transition: right .35s ease-in-out; }
    .main-nav.active { right: 0; }
    .main-nav a { width: 100%; padding: 15px 20px; font-size: 1.1rem; }
    .main-nav a.active { background: #f0f2f5; color: var(--primary-color-dark); }
    .menu-toggle { display: flex; }
    .main-content h1, .features-hero h1 { font-size: 2rem; }
    .controls-wrapper { padding: 20px 15px; }
    .control-group { flex-direction: column; gap: 10px; }
    .btn-group button { padding: 8px 12px; font-size: .9rem; }
    .custom-settings { gap: 15px; }
    .image-list-header { display: none; }
    .image-row { display: block; border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .image-row > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f3f4f6; text-align: right; }
    .image-row > div:last-child { border-bottom: none; }
    .image-row > div::before { content: attr(data-label); font-weight: 500; color: var(--text-dark); padding-right: 15px; text-align: left; }
    .col-name { font-weight: 700; font-size: 1.1em; margin-bottom: 5px; display: block; text-align: left; }
    .col-name::before { display: none; }
    .col-action { justify-content: center !important; padding-top: 15px; }
    .col-action::before { display: none; }
    .download-btn { width: 100%; }
    .footer-bar { flex-direction: column; gap: 15px; }
    .ad-slot-top-bottom { max-width: 320px; height: auto; min-height: 50px; }
    .editor-controls-bar, .resize-controls-bar { flex-wrap: wrap; }
}
@media (max-width: 480px) { .header-container { padding: 0 15px; } .logo { font-size: 1.4rem; } }

/* Add this CSS code to your style.css file */

/* This will align the header text to match the content below */
.image-list-header > div:nth-child(2),
.image-list-header > div:nth-child(3),
.image-list-header > div:nth-child(4) {
  text-align: center; /* Aligns "Status", "New Size", and "Action" to the center */
}

/* This makes sure the action button looks correct */
.col-action .download-btn {
    width: auto; /* Allows the button to fit its content */
    display: inline-block;
}

/* Add this CSS code to your style.css file for the modal */
.modal {
    display: none; /* By default, it will be hidden */
    position: fixed;
    z-index: 2000; /* Ensures it's on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Black background with opacity */
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#modal-image {
    max-width: 100%;
    max-height: 70vh; /* Limits the height of the preview image */
    border-radius: 8px;
    margin-top: 15px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
}


/* Add this to style.css for a better Preview button design */
.preview-btn {
    background: var(--primary-gradient); /* Uses the main gradient from your site */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.2);
}

.preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.3);
}
/* Photo Editor Button Styles */
.editor-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.2);
}

.editor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.3);
}
/* Popup Ad Styles */
.popup-overlay {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s;
}

.popup-ad-container {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #e0e7ff;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    animation: slideIn 0.5s;
}


.popup-ad-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.popup-ad-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.popup-close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close-btn:hover,
.popup-close-btn:focus {
    color: #000;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* --- New Footer Styles --- */
.main-footer-bottom {
    background: #1e293b; /* A modern dark blue-gray */
    color: #cbd5e1;
    padding: 60px 0 20px;
    margin-top: 50px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-col {
    flex-basis: 100%; /* Default for mobile */
}

.footer-col h2 {
    color: #ffffff;
    margin-bottom: 20px;
    position: relative;
    font-size: 1.2rem;
}

.footer-col h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    position: absolute;
    left: 0;
    bottom: -8px;
    border-radius: 2px;
}

.footer-col .about-text {
    line-height: 1.7;
    max-width: 350px;
}

.footer-col .contact-info p {
    margin-bottom: 10px;
}

.footer-col .contact-info i {
    color: #667eea;
    margin-right: 10px;
    width: 20px;
}

.footer-col .quick-links li {
    list-style: none;
    margin-bottom: 12px;
}

.footer-col .quick-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-col .quick-links a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-col .social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #334155;
    color: #ffffff;
    border-radius: 50%;
    margin-right: 10px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s, transform 0.3s;
}

.footer-col .social-icons a:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
}

.footer-hr {
    border: 0;
    border-top: 1px solid #334155;
    margin: 40px 0 20px;
}

.copyright-text {
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive styles for the new footer */
@media (min-width: 768px) {
    .footer-col {
        flex-basis: 48%; /* 2 columns on tablets */
    }
}

@media (min-width: 992px) {
    .footer-col {
        flex-basis: 22%; /* 4 columns on desktops */
    }
}

/* --- Header User Actions & Dropdown --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}




.btn-signup {
    background-color: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background-color: #667eea;
    color: white;
}

.user-menu-dropdown {
    position: relative;
    display: inline-block;
}

.user-menu-dropdown .dropdown-toggle {
    background: #f0f2f5;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-menu-dropdown .dropdown-toggle .fa-chevron-down {
    font-size: 0.8em;
}

.user-menu-dropdown .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.1);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
}

.user-menu-dropdown .dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
}

.user-menu-dropdown .dropdown-content a:hover {
    background-color: #f1f1f1;
}

.user-menu-dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile responsive fixes for new buttons */
@media (max-width: 768px) {
    .header-actions {
        display: none; /* Hide actions in mobile, menu will handle it */
    }
    /* Add login/signup to mobile nav */
    .main-nav a.btn-login, .main-nav a.btn-signup {
        display: block;
        width: 100%;
    }
}



/* --- New Dropdown Header Styles --- */
.user-menu-dropdown .dropdown-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.user-menu-dropdown .dropdown-header strong {
    display: block;
    color: #333;
}
.user-menu-dropdown .dropdown-header small {
    color: #777;
    font-size: 0.85em;
}
.user-menu-dropdown .dropdown-divider {
    height: 1px;
    background-color: #f1f1f1;
    margin: 0;
    border: none;
}

/* --- New Profile Form Styles --- */
.profile-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.profile-form .form-group {
    margin-bottom: 20px;
}
.profile-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}
.profile-form input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}
.profile-form input:disabled {
    background: #f0f2f5;
    cursor: not-allowed;
}

/* Form Success/Error Messages */
.form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
}
.form-message.success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}
.form-message.error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

@media (max-width: 600px) {
    .profile-form .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* --- Style for the new Account button icon --- */
.dropdown-toggle .fa-user-circle {
    font-size: 1.3em;
    margin-right: 6px;
}

/* --- Global Form Styles for Login, Register etc. --- */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s;
    font-size: 1rem;
}
.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}
/* --- New styles for Nav Actions --- */
.nav-actions {
    margin-left: auto; /* Pushes actions to the right on desktop */
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Mobile Responsive Fixes for Nav Actions --- */
@media (max-width: 768px) {
    .nav-actions {
        margin-left: 0;
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 0;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }
    .nav-actions .btn-login,
    .nav-actions .btn-signup {
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid var(--accent-color); /* Sign Up এর মতো বর্ডার */
    display: inline-block;
    text-align: center;
}
    .nav-actions .user-menu-dropdown {
        width: 100%;
    }
    .nav-actions .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }
    /* Hide the original .header-actions if it still exists */
    .header-actions {
        display: none;
    }
}


/* --- Fix for Profile Page Stat Cards Layout --- */
.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* =============================================================================
   9. NEW Professional Profile Page Design V2
   ========================================================================== */
.dashboard-container { max-width: 1200px !important; }
.dashboard-header { display: flex; align-items: center; margin-bottom: 30px; text-align: center; flex-direction: column; }
.user-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--primary-gradient); color: white; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; }
.welcome-text h1 { font-size: 2.5rem; margin: 0; }
.welcome-text p { font-size: 1.1rem; color: var(--text-light); margin-top: 5px; }

.stat-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: var(--container-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.stat-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    height: 40px;
    width: 40px;
    line-height: 40px;
    border-radius: 8px;
    background-color: #f0f2f5;
}
.stat-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}
.stat-card p {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 5px 0 0 0;
}

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.dashboard-main { display: flex; flex-direction: column; gap: 30px; }
.container-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--border-color); }
.container-header h2 { margin: 0; font-size: 1.2rem; }
.container-body { padding: 25px; }
.action-btn { background-color: #4f46e5; color: white; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 0.9em; border:none; cursor: pointer; }

.activity-table { width: 100%; border-collapse: collapse; }
.activity-table td { padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
.activity-table tr:last-child td { border-bottom: none; }

@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}


/* =============================================================================
   10. NEWEST Professional Dashboard Design V4
   ========================================================================== */
.dashboard-container-new {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: flex-start;
}
.sidebar-user-card {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
}
.user-avatar-large {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto 15px auto;
}
.sidebar-user-card h3 { font-size: 1.2rem; margin: 0; }
.sidebar-user-card p { font-size: 0.9rem; color: var(--text-light); }

.sidebar-stats {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 12px;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.9rem;
}
.stat-item + .stat-item { border-top: 1px solid var(--border-color); }
.stat-item span { color: var(--text-light); }
.stat-item strong { font-size: 1.1rem; font-weight: 700; }

.dashboard-main-content-new {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #fdfdff;
}
.tab-link {
    padding: 15px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
}
.tab-link.active {
    color: #6a11cb; /* --primary-color-dark এর হেক্স কোড */
    border-bottom: 3px solid #6a11cb;
}
.tab-content {
    display: none;
    padding: 25px;
}
.tab-content.active { display: block; }

.profile-details-list {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px 20px;
}
.profile-details-list dt { font-weight: 500; color: var(--text-light); }
.profile-details-list dd { margin: 0; font-weight: 500; }

@media (max-width: 992px) {
    .dashboard-container-new { grid-template-columns: 1fr; }
}

/* --- Fix for Profile Page Top Margin --- */
.dashboard-container-new {
    margin-top: 40px;
}
/* --- Fix for Profile Details Spacing --- */
.profile-details-list + h3 {
    margin-top: 25px;
}

/* --- Watermark Controls Spacing Fix --- */
.tab-content > .control-item {
    margin-bottom: 15px;
}
.tab-content > .control-item:last-child {
    margin-bottom: 0;
}

/* --- Styles for Preview Modal --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    text-align: center;
}
#modal-image {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    margin-top: 15px;
}
.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover, .close-button:focus { color: #000; }



/* --- Popup Style Switcher --- */

/* This is the new modifier class for transparent mode */
.popup-overlay.transparent-mode {
    text-align: center;
}

.popup-overlay.transparent-mode .popup-ad-container {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 15px;
    width: auto;
    max-width: none;
    display: inline-block;
}

/* --- Buy Me a Coffee Button Style (Updated) --- */

/* ১. ডেস্কটপ স্টাইল */
.btn-bmac {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: #FFDD00;
    color: #000000;
   
}

/* ২. নতুন ডেস্কটপ হোভার স্টাইল */
    .main-nav .nav-actions .btn-bmac:hover {
        background-color: #008cff; /* হোভারের জন্য সামান্য গাঢ় হলুদ */
        color: #000000; /* লেখার রঙ কালোই থাকবে */
    }

/* ৩. মোবাইল স্টাইল */
    @media (max-width: 768px) {
    .main-nav .nav-actions .btn-bmac {
        background: #f7d400;
        color: #000000;
        border: none;
    }
}


/* --- 2. Mobile Styles --- */
@media (max-width: 768px) {

    /* General container for buttons in mobile menu */
    .main-nav .nav-actions {
        display: flex;
        flex-direction: column;
        gap: 10px; /* Creates space between buttons */
    }

    /* Style for BOTH buttons to share */
    .main-nav .nav-actions .btn-signup,
    .main-nav .nav-actions .btn-bmac {
        display: block;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        padding: 12px 20px;
        font-size: 1rem;
        font-weight: 500;
        text-decoration: none;
    }

    /* Keep "Sign Up" as an outline button (like before) */
    .main-nav .nav-actions .btn-signup {
        background: transparent;
        border: 2px solid #667eea;
        color: #667eea;
    }

/* ▼▼▼ নতুন কোডটুকু এখানে যোগ করুন ▼▼▼ */
    .main-nav .nav-actions .btn-bmac:hover {
        background-color: #008cff; /* হোভারের জন্য সামান্য গাঢ় হলুদ */
        color: #000000; /* লেখার রঙ কালোই থাকবে */
    }
    /* ▲▲▲ নতুন কোড এখানেই শেষ ▲▲▲ */

}
    
    /* Remove conflicting desktop hover effects for mobile */
    .nav-actions .btn-login:hover,
    .main-nav .nav-actions .btn-bmac:hover,
    .main-nav .nav-actions .btn-signup:hover {
       background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Select Files বাটনের গ্র্যাডিয়েন্ট */
    color: white; /* লেখার রঙ সাদা */
    border-color: transparent; /* হোভারে বর্ডার নাও লাগতে পারে, প্রয়োজন অনুযায়ী রাখুন */
    /* Add any other styles from .select-files-btn if needed */
}




/* To make the ad inside the image list full-width */
.image-list-container .ad-slot-top-bottom {
    max-width: 100%;
    margin: 15px 0;
}


/* --- ফটো এডিটরের মোবাইল ভিউ টুলবার ঠিক করার চূড়ান্ত কোড --- */
@media (max-width: 480px) {
    #tui-image-editor-container .tui-image-editor-header-buttons .tui-image-editor-button {
        padding: 0 5px !important;
        min-width: auto !important;
    }
}

/* --- Processing Overlay and Spinner Styles --- */

/* Parent container needs to be relative for the overlay to work */
.container {
    position: relative;
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px; /* Matches the container's border-radius */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #667eea; /* Your primary color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- Blog & Post Page Styles --- */
.blog-listing {
    padding: 20px;
}

.post-item {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h2 a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.8rem;
    transition: color 0.3s;
}

.post-item h2 a:hover {
    color: var(--primary-color-dark);
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 5px 0 15px 0;
}

.post-excerpt p {
    color: #555;
    line-height: 1.7;
}

.read-more-btn {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
}

.read-more-btn:hover {
    text-decoration: underline;
}

.single-post-container .post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.single-post-container .post-content h1,
.single-post-container .post-content h2,
.single-post-container .post-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post-container .post-content p {
    margin-bottom: 20px;
}

.single-post-container .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* --- New Professional Blog List View Styles (Updated) --- */
.blog-list-view {
    padding: 20px 0;
}

.post-list-item {
    display: flex;
    gap: 30px;
    align-items: center;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.post-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-list-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

.post-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-list-item:hover .post-list-image img {
    transform: scale(1.05);
}

.post-list-content {
    flex-grow: 1;
}

.post-category {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.post-list-content h2 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.post-list-content h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.post-list-content h2 a:hover {
    color: var(--primary-color-dark);
}

.post-list-content .post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.post-list-content .post-meta i {
    margin-right: 5px;
}

.post-list-content .post-excerpt p {
    color: #555;
    margin: 0;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .post-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .post-list-image {
        width: 100%;
        height: 200px;
    }
    .post-list-content h2 {
        font-size: 1.5rem;
    }
}




.ad-slot-in-content {
    margin: 30px auto;
    text-align: auto;
    clear: both;
    line-height: 20px; /* <-- এই লাইনটি যোগ করা হয়েছে */
}





















/* --- New Professional Profile Page Design --- */
.dashboard-container-new {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: flex-start;
    margin-top: 40px;
}
.sidebar-user-card {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
}
.user-avatar-large {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto 15px auto;
}
.sidebar-user-card h3 { font-size: 1.2rem; margin: 0; }
.sidebar-user-card p { font-size: 0.9rem; color: var(--text-light); }
.sidebar-stats {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 12px;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.9rem;
}
.stat-item + .stat-item { border-top: 1px solid var(--border-color); }
.stat-item span { color: var(--text-light); }
.stat-item strong { font-size: 1.1rem; font-weight: 700; }

.dashboard-main-content-new {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #fdfdff;
}
.tab-link {
    padding: 15px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    border-bottom: 3px solid transparent;
}
.tab-link.active {
    color: var(--primary-color-dark);
    border-bottom-color: var(--primary-color-dark);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.container-body { padding: 25px; }

.profile-details-list { display: grid; grid-template-columns: 200px 1fr; gap: 15px 20px; }
.profile-details-list dt { font-weight: 500; color: var(--text-light); }
.profile-details-list dd { margin: 0; font-weight: 500; }
.activity-table { width: 100%; border-collapse: collapse; }
.activity-table th, .activity-table td { padding: 12px 0; border-bottom: 1px solid #f0f2f5; text-align: left; }
.activity-table tr:last-child td { border-bottom: none; }
.activity-table th { font-weight: 700; color: var(--text-dark); }

@media (max-width: 992px) {
    .dashboard-container-new { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .profile-details-list { grid-template-columns: 1fr; }
    .tabs-nav { flex-wrap: wrap; }
    .tab-link { padding: 12px 15px; font-size: 0.9rem; }
}


/* --- Mobile Font Size for Homepage Heading (Smaller) --- */
@media (max-width: 768px) {
    .main-content h1 {
        font-size: 1.2rem; /* হেডিং এর ফন্ট সাইজ আরও কমানো হলো */
        line-height: 1.5; 
    }

    .main-content .subtitle {
        font-size: 0.95rem; /* সাবটাইটেল এর ফন্ট সাইজ আরও কমানো হলো */
        padding: 0 15px; 
    }
}

/* --- Convert পেজের মোবাইল লিস্ট ভিউ ঠিক করা --- */
@media (max-width: 768px) {
    .image-list-container[data-columns="5"] .image-row .col-data,
    .image-list-container[data-columns="5"] .image-row .col-action {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px dashed #eee;
    }

    .image-list-container[data-columns="5"] .image-row .col-action {
        border-bottom: none;
    }
    
    .image-list-container[data-columns="5"] .image-row div:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }
}






/* --- সকল পেজের ফাইল লিস্টের জন্য রেসপন্সিভ স্টাইল --- */
@media (max-width: 768px) {
    /* ডেস্কটপ হেডারটি মোবাইলে লুকিয়ে ফেলা হলো */
    .image-list-header {
        display: none;
    }

    /* প্রতিটি ছবির সারিকে একটি কার্ডের মতো বানানো হলো */
    .image-row {
        display: block;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        margin-bottom: 15px;
        padding: 10px;
    }

    /* কার্ডের ভিতরের আইটেমগুলোকে লেবেল-সহ দেখানো হলো */
    .image-row .col-data,
    .image-row .col-action {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #eee;
        white-space: normal;
    }

    .image-row .col-action {
        border-bottom: none;
    }

    /* জাভাস্ক্রিপ্ট থেকে আসা data-label ব্যবহার করে লেবেল যুক্ত করা হলো */
    .image-row div[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }
}

/* --- Watermark প্রিভিউ মডালের টাইটেল মোবাইলের জন্য ছোট করা --- */
@media (max-width: 768px) {
    .modal-content h2 {
        font-size: 1.1rem; /* টাইটেলের ফন্ট সাইজ কমানো হলো */
    }
}





/* --- Mobile Responsive Table/List Styles for Tool Pages --- */

/* Apply only on smaller screens (e.g., max-width: 768px) */
@media (max-width: 768px) {

    /* Hide the header row on mobile */
    .image-list-container .image-list-header {
        display: none;
    }

    /* Style each row like a card */
    .image-list-container .image-row {
        display: block; /* Stack elements vertically */
        border: 1px solid var(--border-color);
        border-radius: 6px;
        margin-bottom: 15px;
        padding: 10px 15px;
        background-color: var(--container-bg); /* Ensure background */
        box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Add slight shadow */
    }

    /* Style individual data points within the card */
    .image-list-container .image-row > div {
        display: flex;
        justify-content: space-between; /* Label on left, value on right */
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #eee; /* Separator line */
        white-space: normal; /* Allow text wrapping */
        word-break: break-all; /* Break long filenames */
        text-align: left !important; /* Override any right/center alignment */
        flex-basis: auto !important; /* Override fixed flex basis */
        min-width: 0 !important; /* Override fixed min-width */
    }

    /* Remove border from the last item */
    .image-list-container .image-row > div:last-child {
        border-bottom: none;
        padding-bottom: 5px; /* Adjust padding for last item */
    }

    /* Add label using ::before pseudo-element */
    .image-list-container .image-row div[data-label]::before {
        content: attr(data-label); /* Get label text from data-label attribute */
        font-weight: bold;
        margin-right: 10px;
        color: #555; /* Label color */
        flex-shrink: 0; /* Prevent label from shrinking */
    }

    /* Specific adjustments for certain columns if needed */
    .image-list-container .image-row .col-name {
        font-weight: 500; /* Make filename slightly bolder */
        padding-top: 5px; /* Adjust padding for first item */
    }

     /* Ensure download button takes reasonable space */
     .image-list-container .image-row .col-action a.download-btn,
     .image-list-container .image-row .col-action button {
         padding: 6px 12px;
         font-size: 0.9em;
     }

    /* Adjust footer bar for mobile */
    .footer-bar {
        flex-direction: column;
        align-items: stretch; /* Make buttons full width */
        gap: 10px;
    }
    .footer-bar .saved-info {
        text-align: center;
        order: -1; /* Move file count to the top */
    }
    .footer-bar .clear-list-btn,
    .footer-bar .download-all-btn {
        width: 100%;
        padding: 12px; /* Make buttons larger */
    }



     /* Crop page specific mobile adjustments if needed */
     #crop-page-image-list .image-row div[data-label]:before {
         /* Styles are already applied by the general rule above */
     }
}


/* --- Mobile Responsive Font Size for Post/Page Titles --- */

@media (max-width: 768px) {
    /* Target h1 inside single post or page container */
    .single-post-container h1,
    .single-page-container h1 { /* Assuming pages might use a similar container */
        font-size: 1.2rem; /* Adjust this value as needed (e.g., 1.6rem, 2rem) */
        line-height: 1.3; /* Adjust line height for better readability */
        margin-bottom: 20px; /* Optional: Adjust spacing below title */
    }

    /* Optional: Adjust subtitle font size too if needed */
    .subtitle {
        font-size: 1rem;
    }
}

/* --- Processing Feedback Status Styles --- */

/* Default status style */
.status-text {
    font-weight: 500;
    color: #555; /* Default text color */
}

/* Processing status */
.status-processing {
    color: #667eea; /* Accent color */
    font-style: italic;
}

/* Success status */
.status-success {
    color: #16a34a; /* Green */
    font-weight: bold;
}

/* Error status */
.status-error {
    color: #dc2626; /* Red */
    font-weight: bold;
}

/* Individual file progress bar (Optional - Advanced) */
.file-progress-bar {
    width: 100%;
    height: 5px;
    background-color: #e0e7ff;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
    display: none; /* Initially hidden */
}

.file-progress-bar-inner {
    height: 100%;
    width: 0%;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}



/* --- Sticky Footer Styles --- */

/* Ensure body takes full viewport height and uses flex column */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Minimum height is 100% of viewport height */
}

/* Make the main content wrapper grow to fill available space */
.main-wrapper {
    flex-grow: 1; /* Allows this element to grow */
}

/* Optional: Ensure footer doesn't grow or shrink */
.main-footer-bottom {
    flex-shrink: 0; /* Prevents footer from shrinking */
}

/* Optional: If header is part of the flex body, prevent it from shrinking */
.main-header {
     flex-shrink: 0;
 }
/* --- End Sticky Footer Styles --- */

/* মোবাইল অপটিমাইজেশন: 768px এর নিচের স্ক্রিনের জন্য */
@media screen and (max-width: 768px) {
    .main-content h1 {
        font-size: 1.3em; /* মোবাইলে h1 এর সাইজ ছোট রাখা হলো */
    }
    
    .main-content h2 {
        font-size: 1em; /* মোবাইলে h2 এর সাইজ h1 এর চেয়ে আরও ছোট রাখা হলো */
    }
}


/* "100% free." - এর পরের গ্যাপ কমানো (যা p.subtitle ট্যাগের মার্জিন) */
.main-content p.subtitle {
    margin-bottom: 2px; /* এই মান আপনার পছন্দ অনুযায়ী বাড়াতে বা কমাতে পারেন */
}