:root {
    /* Palette - Soft & Neutral */
    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;

    /* --text-primary: #333333; */
    --text-secondary: #6b7280;
    --text-placeholder: #384254;

    --border-light: #e5e7eb;
    --border-focus: #d1d5db;

    /* Enhanced Colors */
    /* --gradient-primary: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); */
        --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-primary-hover: linear-gradient(135deg, #334155 0%, #1e293b 100%);

    --color-danger: #ef4444;

    --font-ui: 'Lexend', sans-serif;
    --font-bn: 'Hind Siliguri', sans-serif;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-fab: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-fab-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-main: 24px;
    --anim-speed: 0.3s;
}



.app-wrapper {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

/* Title (Subtle) */
.app-title {
    text-align: center;
    /* font-size: 1.5rem; */
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.8;
    font-family: var(--font-bn);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* 
         * PROGRESSIVE UI COMPONENTS 
         */

/* Textarea Container */
.text-area-container {
    position: relative;
    background: transparent !important;
    border-radius: var(--radius-main);
    box-shadow: var(--shadow-soft);
    transition: all var(--anim-speed) ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    /* Added for absolute positioning context consistency */
    flex-direction: column;
}

.text-area-container:focus-within {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-color);
    transition: border-color 0.3s ease-in-out;
}

textarea {
    width: 100%;
    min-height: 300px;
    padding: 2rem;
    padding-bottom: 6rem;
    /* Space for buttons */
    border: none;
    outline: none;
    resize: none;
    font-size: 1.25rem;
    line-height: 1.8;
    background: transparent;
    font-family: var(--font-bn);
}


textarea:focus {
    background: transparent;
    transition: border-color 0.3s ease-in-out;
    box-shadow: none !important;
    transition: box-shadow 0.3s ease-in-out;
}

textarea::placeholder {
    color: var(--text-placeholder);
    font-family: var(--font-ui);
    font-weight: 300;
}

/* Inputs specifically */
#inputArea {
    /* Default Bijoy fonts often look messy if not set, generic sans helps readability */
}

/* FAB Action Bar */
.action-bar {
    position: absolute;
    bottom: 1.0rem;
    right: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy transition */
    z-index: 10;
}

.action-bar.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* FAB Buttons */
.btn-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-fab);
}

.btn-fab .material-symbols-outlined {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.btn-fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-fab-hover);
}

.btn-fab:active {
    transform: scale(0.95);
}

/* Secondary FAB (White/Outlined) */
.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover .material-symbols-outlined {
    color: var(--color-danger);
    /* X turns red on hover */
}

/* Specific override for Back button in secondary style */
.btn-secondary.btn-back:hover .material-symbols-outlined {
    color: var(--text-primary);
    /* Arrow stays dark */
}

/* Primary FAB (Dark Gradient) */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: 1px solid transparent;
    /* To match box model if needed */
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
}

.btn-primary .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* View Management */
.view-section {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tooltip behavior (Simple) */
.btn-fab::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-fab:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}