/* 1. Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

/* 2. Global Variables */
:root {
    --primary-red: #E33F2B;
    --primary-hover: #c0392b;
    --dark-text: #2c3e50;
    --light-text: #666;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
}

/* 3. Basic Setup */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 4. Navbar */
.navbar {
    background: #fff;
    padding: 10px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--dark-text);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo-text .highlight {
    color: var(--primary-red);
    font-weight: 800;
}

/* Navbar Right Side */
.nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 15px;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--primary-red);
}

/* Login Button */
.btn-login {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 15px;
    cursor: pointer;
}

.btn-login:hover {
    color: var(--primary-red);
}

/* Sign Up Button */
.btn-signup {
    background-color: var(--primary-red);
    color: white !important;
    padding: 8px 20px;
    border-radius: 6px;
    transition: 0.3s;
    font-weight: 600;
    font-size: 14px;
}

.btn-signup:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Menu Icon */
.menu-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    color: #333;
    margin-left: 5px;
}

.menu-icon svg {
    width: 32px;
    height: 32px;
}


/* 5. Hero Section (Gap Reduced Here) */
.hero {
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, #fcfcfc);

    /* পরিবর্তন: উপরের প্যাডিং 60px থেকে কমিয়ে 30px করা হয়েছে */
    padding: 30px 20px 0px !important;

    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 40px;
    margin: 0 0 10px;
    color: var(--dark-text);
    letter-spacing: -0.5px;
    font-weight: 800;
    line-height: 1.2;
}

.hero h2 {
    font-size: 18px;
    color: var(--light-text);
    font-weight: 400;
    margin: 0 auto 20px;
    line-height: 1.5;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0px !important;
    padding-bottom: 20px;
}

.filter-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--dark-text);
    color: #fff;
    border-color: var(--dark-text);
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.2);
}

/* 6. Main Container (No Gap) */
.main-container {
    max-width: 1450px;
    width: 95%;
    margin: 0 auto;
    padding: 0px 0 40px !important;
    margin-top: 0px !important;
    flex: 1;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
}

/* Responsive Breakpoints */
@media (min-width: 600px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1350px) {
    .tools-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 7. Premium Card Style */
.tool-card {
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background-color: #fcfcfc;
}

.tool-card.hidden {
    display: none;
}

.tool-card.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icons & Colors */
.card-icon {
    width: 45px;
    height: 45px;
    margin-bottom: 15px;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-red {
    background: #ffeceb;
    color: #E33F2B;
}

.icon-blue {
    background: #eaf6ff;
    color: #4A90E2;
}

.icon-green {
    background: #e6f9ed;
    color: #27ae60;
}

.icon-orange {
    background: #fff5e6;
    color: #F5A623;
}

.icon-purple {
    background: #f3e5f5;
    color: #9c27b0;
}

.icon-teal {
    background: #e0f2f1;
    color: #009688;
}

.icon-dark {
    background: #eceff1;
    color: #455a64;
}

.icon-pink {
    background: #fce4ec;
    color: #e91e63;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--dark-text);
}

.card-desc {
    font-size: 13px;
    color: var(--light-text);
    margin: 0;
    line-height: 1.5;
}

/* Footer */
footer {
    background: #fff;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #888;
    margin-top: auto;
}

.footer-links a {
    margin: 0 10px;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }

    .nav-right {
        gap: 15px;
    }

    .nav-link {
        display: none;
    }

    .menu-icon {
        display: flex;
    }

    .hero h1 {
        font-size: 30px;
    }

    .main-container {
        padding: 0 15px 20px !important;
    }
}

/* Inner Page Styles */
.tool-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.tool-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.tool-header p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.upload-box {
    background: white;
    width: 100%;
    max-width: 650px;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px dashed #ddd;
}

.upload-box:hover {
    border-color: var(--primary-red);
    background-color: #fffbfb;
    transform: scale(1.01);
}

.btn-upload,
.btn-main {
    background-color: var(--primary-red);
    color: white;
    font-size: 22px;
    padding: 15px 50px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
    margin-top: 25px;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(227, 63, 43, 0.3);
}

.btn-upload:hover,
.btn-main:hover {
    background-color: #c0392b;
}

input[type="file"] {
    display: none;
}

.result-area {
    margin-top: 30px;
    display: none;
    text-align: center;
}

.preview-img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto 25px auto;
    border: 1px solid #ddd;
}

.btn-download {
    background-color: #27ae60;
    color: white;
    font-size: 18px;
    padding: 12px 35px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-download:hover {
    background-color: #219150;
}

.options-area {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.file-info {
    margin-bottom: 20px;
    color: #555;
    font-weight: 500;
}

.slider-container {
    margin: 30px 0;
    text-align: left;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #444;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary-red);
}

.size-comparison {
    margin-bottom: 20px;
    font-size: 18px;
    color: #2c3e50;
}

.size-comparison span {
    font-weight: bold;
    color: #27ae60;
}