:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-dark: #f4f7f6;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #6366f1;
    --border: rgba(0, 0, 0, 0.1);
    --glass: rgba(0, 0, 0, 0.05);

    /* Hub Button Colors from reference */
    --clr-red: #ef4444;
    --clr-green: #22c55e;
    --clr-blue: #3b82f6;
    --clr-blue-dark: #1d4ed8;
    --clr-cyan: #06b6d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.3;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -10%;
    right: -10%;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero {
    text-align: center;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 0.5rem;
}

.hero .accent {
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 32px 0 rgba(0, 0, 0, 0.4);
}

.converter-box {
    padding: 1.5rem;
}

.panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

textarea, .bijoy-div {
    width: 100%;
    height: 380px; /* ENLARGED */
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.bijoy-div:empty:before {
    content: attr(aria-placeholder);
    color: var(--text-muted);
}

textarea:focus, .bijoy-div:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #ffffff;
}

/* Font Classes */
.unicode-font {
    font-family: 'Noto Sans Bengali', sans-serif;
}

.bijoy-font {
    font-family: 'SutonnyMJ', Arial, sans-serif; /* PREVIEW ENABLED */
}

/* Control Hub */
.control-hub {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
}

.main-converters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.secondary-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hub-btn {
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    color: white;
    transition: all 0.2s;
}

.hub-btn:hover, .action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Specific Hub Colors */
.btn-red { background: var(--clr-red); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); }
.btn-green { background: var(--clr-green); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4); }
.btn-blue { background: var(--clr-blue); }
.btn-blue-dark { background: var(--clr-blue-dark); }
.btn-cyan { background: var(--clr-cyan); }

/* Options Bar */
.options-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.status-indicator {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--glass);
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

/* Icon Buttons */
.icon-btn {
    background: var(--glass);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* The Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--glass);
    transition: .4s;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider { background-color: var(--clr-green); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

footer {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .hub-btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
    textarea { height: 300px; }
}

.editor-toolbar {
    display: flex;
    gap: 0.8rem;
    padding: 8px 15px;
    background: rgba(240, 244, 250, 0.5);
    border-top: 1px solid var(--border);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    align-items: center;
    justify-content: flex-end;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.toolbar-btn.text-red:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

