/* =========================================
   Global Variables & Reset
========================================= */
:root {
    --primary-color: #4361EE; 
    --secondary-color: #F72585; 
    --bg-color: #F4F7FE; 
    --card-bg: #FFFFFF;
    --text-main: #2B2D42;
    --text-muted: #8D99AE;
    --border-radius: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    --bg-color: #0F172A; 
    --card-bg: #1E293B; 
    --text-main: #F8FAFC; 
    --text-muted: #94A3B8; 
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   Navbar (Header)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--card-bg);
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

.logo {
    font-size: 20px;
    font-weight: 800;
}

.highlight {
    color: var(--primary-color);
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.2) rotate(15deg);
}

/* =========================================
   Main Tool Layout
========================================= */
.tool-container {
    display: flex;
    justify-content: center;
    padding: 40px 5%;
}

.tool-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: background-color 0.3s ease;
}

.card-header {
    margin-bottom: 10px;
}

.tool-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* =========================================
   Textarea Input
========================================= */
.input-group {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 20px;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-main);
    border: 2px solid transparent;
    border-radius: 15px;
    outline: none;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
    line-height: 1.5;
}

textarea:focus {
    border-color: var(--primary-color);
}

/* =========================================
   Action Buttons
========================================= */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.action-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    flex: 1;
    max-width: 200px;
}

.secondary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.secondary-btn:hover {
    background-color: #324edb;
    transform: translateY(-3px);
}

.clear-btn {
    background-color: #ef476f;
    color: white;
    box-shadow: 0 5px 15px rgba(239, 71, 111, 0.3);
}

.clear-btn:hover {
    background-color: #d13054;
    transform: translateY(-3px);
}

/* =========================================
   Real-time Stats Grid
========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.stat-box {
    background: var(--bg-color);
    padding: 20px 10px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(141, 153, 174, 0.3);
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   SEO Content & FAQ
========================================= */
.content-section {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.content-section p, .content-section ol {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.content-section ol {
    padding-left: 20px;
}

.content-section ol li {
    margin-bottom: 10px;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(141, 153, 174, 0.2);
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

footer {
    text-align: center;
    padding: 30px 5%;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Mobile Responsiveness
========================================= */
@media (max-width: 600px) {
    .tool-card {
        padding: 25px 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr); /* মোবাইলে ২ কলাম */
    }

    .button-group {
        flex-direction: column;
    }

    .action-btn {
        max-width: 100%;
        width: 100%;
    }
}