/* --- PROFESSIONAL CHECKER WORKSPACE --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --navy-dark: #0f1c2e;
    --navy-light: #1f3a5f;
    --accent-green: #42B883;
    --white: #ffffff;
    --text-gray: #aeb9cc;
    --border-color: #edf2f7;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    /* Updated to strict Poppins for all elements */
     --font-stack: 'Poppins', 'Noto Sans Sinhala', sans-serif; 
}

/* Base Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 28, 46, 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

/* Global Font Override */
* {
    font-family: var(--font-stack);
}
/* --- HEADER MAIN WRAPPER --- */
.header-main-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 1550px;
    margin: 0 auto 35px auto;
    padding: 0 20px;
    min-height: 60px;
    transition: all 0.3s ease; /* Smooth transition for fullscreen */
}

/* --- TITLE PILL --- */
.header-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.checker-header-pill {
    background: #ffffff;
    padding: 12px 35px;
    border-radius: 100px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(66, 184, 131, 0.4);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.checker-header-pill h1 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--navy-dark);
    white-space: nowrap;
    line-height: 1;
}

/* --- RIGHT SIDE CIRCLE ACTIONS --- */
.header-actions-right {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.action-circle {
    width: 46px;
    height: 46px;
    border-radius: 50px;
    background: #ffffff;
    border: 1px solid rgba(15, 28, 46, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    white-space: nowrap;
    color: #64748b;
}

.action-circle i {
    font-size: 1.1rem;
    min-width: 46px;
    text-align: center;
}

.action-label {
    max-width: 0;
    opacity: 0;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* --- HOVER ANIMATIONS --- */
.action-circle:hover {
    width: 130px;
    justify-content: flex-start;
    color: white;
    box-shadow: var(--shadow-lg);
}

.action-circle:hover .action-label {
    max-width: 90px;
    opacity: 1;
    margin-left: -6px;
}

.action-circle.report:hover { background: #ff4757; border-color: #ff4757; }
.action-circle.settings:hover { background: #42B883; border-color: #42B883; }
.action-circle.info:hover { background: #1f3a5f; border-color: #1f3a5f; }

.action-circle.settings:hover i { transform: rotate(45deg); }

/* --- ⚡ FULL SCREEN FIXES (CRITICAL) --- */

body.fullscreen-mode .header-actions-right {
    display: none !important; 
}

body.fullscreen-mode .checker-header-pill {
    display: none !important; 
}


body.fullscreen-mode .header-main-wrapper {
    margin-bottom: 0;
    min-height: 0;
    padding: 0;
}

.glass-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 184, 131, 0.3);
    position: relative;
    max-width: 450px !important;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    transition: 0.3s;
}

.modal-close-btn:hover { color: #ff4757; }

.modal-body-custom {
    text-align: left;
    margin: 20px 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
}

.modal-footer-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

/* Specific styling for the report form if needed */
.report-form textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    font-family: inherit;
}
/* Layout Container */
.checker-container {
    background: radial-gradient(circle at center, var(--navy-light) 0%, var(--navy-dark) 100%);
    min-height: 100vh;
    padding: 110px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
}

/* 1️⃣ Top Header Pill (Glassmorphism) */
.checker-header-pill {
    background: #fff;
    backdrop-filter: blur(10px);
    padding: 14px 40px;
    border-radius: 100px;
    margin-bottom: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(66, 184, 131, 0.4);
    transition: transform 0.3s ease;
}

.checker-header-pill h1 {
    color: var(--navy-dark);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.checker-header-pill h1 span {
    color: #64748b;
    font-weight: 400;
    font-size: 0.95rem;
    opacity: 0.7;
}

/* --- App Workspace --- */
.app-workspace {
    display: flex;
    width: 100%;
    max-width: 1550px;
    height: calc(100vh - 220px);
    gap: 24px;
    align-items: stretch;
}

/* 2️⃣ Side Panels (Left & Right) */
.side-panel {
    flex: 0 0 300px;
    background: var(--white);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header {
    padding: 10px 25px; 
    font-weight: 600;
    font-size: 0.85rem; 
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1.2;
    color: #64748b;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
    margin-top: 5px;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.history-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.history-item.active {
    background: #f0fdf4;
    border-color: rgba(66, 184, 131, 0.3);
}

.history-item i { color: var(--text-gray); font-size: 1.1rem; }
.history-item.active i { color: var(--accent-green); }

.history-item .details span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-dark);
}

.history-item .details small {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Sidebar Footer & Pro Button */
.sidebar-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
}

.pro-upgrade-btn {
    width: 100%;
    padding: 14px;
    background: radial-gradient(circle at center, var(--navy-light) 0%, var(--navy-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(15, 28, 46, 0.2);
}

.pro-upgrade-btn:hover {
    background: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 28, 46, 0.3);
}

/* 3️⃣ Main Editor Area */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
/* 📥 DOWNLOAD WORD BUTTON STYLE */
.btn-download {
    background: var(--white);
    color: var(--navy-dark);
    border-color: var(--white);
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none; /* Keep "Download Word" readable */
}

.btn-download i {
         color: #2b6cb0; /* Word-specific blue on hover */

    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-download:hover {
     background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
 
       color: var(--white);

     box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-download:hover i {
       color: var(--accent-green);

}
.stats {
     font-size: 0.9rem;
    color: #666;
    background: #f0f2f5;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.btn-download:active {
    transform: translateY(0);
}


.tab-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px 15px 10px;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 12px;
    gap: 2px;
}

.tab-link {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 8px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tab-link.active {
    background: var(--white);
    color: var(--navy-dark);
    opacity: 1;
    box-shadow: var(--shadow-sm);
}

/* Custom Font Selector Styling */
.font-selector {
    position: relative;
    min-width: 180px;
}

.font-selector select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    padding: 10px 40px 10px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-stack);
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2342B883'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.font-selector select:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-green);
}

.font-selector select option {
    background-color: var(--navy-dark);
    color: var(--white);
    padding: 10px;
    font-family: var(--font-stack);
}

/* Editor Shell Styling */
.editor-shell {
    background: var(--white);
    flex: 1;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.editor-toolbar {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}/* --- UPDATED TOOL BUTTONS --- */
.tool-btn {
    background: rgba(66, 184, 131, 0.1); /* Kept your brand tint */
    border: none;
    outline: none;
    /* Changed width to min-width to allow expansion */
    min-width: 42px; 
    width: auto; 
    height: 42px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px; /* Added padding for the text expansion */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px;
    overflow: hidden; /* Clips the text until hovered */
}

/* Kept your Icon styling */
.tool-icon-img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    display: block;
    transition: filter 0.2s ease, opacity 0.2s ease;
    filter: invert(61%) sepia(54%) saturate(468%) hue-rotate(105deg) brightness(92%) contrast(88%);
    opacity: 1;
}

/* NEW: Style for the sliding span text */
.btn-text-hover {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-green);
    transition: all 0.3s ease;
    margin-left: 0;
}

/* --- HOVER STATES --- */
.tool-btn:hover {
    border-radius: 12px;
    background: var(--white); 
 }

/* Reveal text on hover */
.tool-btn:hover .btn-text-hover {
    max-width: 120px; /* Adjust based on word length */
    opacity: 1;
    margin-left: 10px; /* Space between icon and text */
}

.tool-btn:hover .tool-icon-img {
    filter: invert(61%) sepia(54%) saturate(468%) hue-rotate(105deg) brightness(92%) contrast(88%);
    opacity: 1;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 10px; /* Keeps consistent spacing between buttons */
    align-items: center;
}

/* Container for the right side */
.toolbar-right {
    display: flex;
    align-items: center;
}

/* Specific styling for buttons that have text labels */
.btn-with-text {
    width: auto !important; /* Overrides the fixed 42px width */
    padding: 0 15px;        /* Adds space on the sides */
    gap: 8px;               /* Space between icon and text */
}

.btn-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;         /* Matches your panel header text color */
    transition: color 0.2s ease;
}

/* Change text color to match your green brand color on hover */
.tool-btn:hover .btn-label {
    color: var(--accent-green);
}

/* Writing Textarea */
.writing-area {
    flex: 1;
    padding: 35px 45px;
}

#mainEditor {
    display: block !important;   
    width: 100% !important;
    max-width: 100% !important;   
    min-height: 300px;
    padding: 10px;
    outline: none;
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 1.1rem;
    line-height: 1.8;
    cursor: text;

    /* ❗  ❗ */
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important; 
}

.writing-area {
    display: block !important;   
    width: 100%;
    overflow-y: auto;
    background: #ffffff;
}

#mainEditor::placeholder {
    color: #cbd5e1;
    font-weight: 300;
}

.text-zoomer {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.text-zoomer span {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 35px;
    color: var(--accent-green);
}

/* The Slider "Belt" */
#fontSizeSlider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

/* The Slider "Dot" */
#fontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-green);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(66, 184, 131, 0.5);
    transition: 0.2s;
}

#fontSizeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Bottom Action Bar */
.editor-footer {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.action-btn {
    padding: 12px 30px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    font-family: var(--font-stack);
}

.btn-clear { background: #f1f5f9; color: #64748b; }
.btn-copy {     background: var(--accent-green);;
 color: white; }
.btn-convert {
    
     background: radial-gradient(circle at center, var(--navy-light) 0%, var(--navy-dark) 100%);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(66, 184, 131, 0.3);
}

/* 4️⃣ Suggestions Panel (Right) */
.suggestion-container {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.suggestion-card.empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}


.toast-notification {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-dark);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--accent-green);
    z-index: 10000;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification i {
    color: var(--accent-green);
}

.toast-notification.fade-out {
    opacity: 0;
    transform: translate(-50%, -20px);
    transition: all 0.5s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -40px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}


.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 28, 46, 0.8);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.modal-box {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 3rem;
    color: #f59e0b; /* Amber warning color */
    margin-bottom: 15px;
}

.modal-box h3 {
    color: var(--navy-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.modal-box p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.btn-deny { background: #f1f5f9; color: #64748b; }
.btn-deny:hover { background: #e2e8f0; }

.btn-allow { background: var(--accent-green); color: white; }
.btn-allow:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(66, 184, 131, 0.3); }





/* Full Screen Mode Styles */
body.fullscreen-mode {
    overflow: hidden; /* Prevent background scrolling */
    padding: 0 !important;
}

body.fullscreen-mode nav, 
body.fullscreen-mode .checker-header-pill, 
body.fullscreen-mode .side-panel, 
body.fullscreen-mode .tab-switcher,
body.fullscreen-mode .sidebar-footer {
    display: none !important; /* Hide everything else */
}

body.fullscreen-mode .checker-container {
    padding: 0;
    justify-content: center;
}

body.fullscreen-mode .app-workspace {
    max-width: 100%;
    height: 100vh;
    gap: 0;
}

body.fullscreen-mode .editor-main {
    width: 100%;
    height: 100%;
}

body.fullscreen-mode .editor-shell {
    border-radius: 0; /* Remove rounded corners in full screen */
    height: 100vh;
}


/* Placeholder logic for div */
#mainEditor:empty:before {
    content: attr(placeholder);
    color: #888;
    pointer-events: none;
}
/* --- UPDATED PROFESSIONAL TOAST --- */
.toast-notification {
    position: fixed;
    top: 30px; /* Positioned at the top */
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-dark);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg), 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-green);
    z-index: 99999;
    pointer-events: none;
    animation: toastIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.toast-notification i {
    color: var(--accent-green);
    font-size: 1.1rem;
}

.toast-notification.fade-out {
    animation: toastOut 0.4s ease forwards;
}
/* Rotating Animation */
.fa-spin-custom {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -40px) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translate(-50%, 0) scale(1); }
    to { opacity: 0; transform: translate(-50%, -20px) scale(0.9); }
}

.misspelled {
    text-decoration: none;
    border-bottom: 2px wavy #ff3b3b; 
    
    background-color: #ffbebe ; 
    padding: 1px 2px;
    border-radius: 3px;
    
    cursor: help;
    transition: all 0.2s ease-in-out;
    position: relative;
    display: inline-block; 
}

.misspelled:hover {
    background-color: rgba(255, 59, 59, 0.2);
    border-bottom: 2px wavy #d00000;
}
 /* --- SUGGESTION MENU STYLE --- */
.suggestion-menu {
    position: absolute;
    background: #ffffff;
    min-width: 180px;
    
    max-height: 250px; 
    overflow-y: auto;  
    
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #edf2f7;
    padding: 8px;
    z-index: 999999;
    animation: menuFadeIn 0.2s ease-out;
    pointer-events: all;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.suggestion-item {
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a202c; 
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Noto Sans Sinhala', sans-serif;
}

.suggestion-item:hover {
    background: #4caf50; /* Accent green color */
    color: #ffffff;
    transform: translateX(3px);
}

.suggestion-item.no-suggest {
    color: #a0aec0;
    cursor: default;
}

.suggestion-item.no-suggest:hover {
    background: transparent;
    color: #a0aec0;
    transform: none;
}


@font-face {
    font-family: 'DL-Manel';
    src: url('fonts/dl-manel.ttf'); 
}

#mainEditor {
    /* default font */
    font-family: 'Noto Sans Sinhala', sans-serif;
    transition: font-family 0.3s ease;
}
/* Sidebar Main Style */
.side-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

/* Section Titles with Tight Letter Spacing */
.guide-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-green);
    text-transform: uppercase;
    margin: 22px 0 12px 10px;
    letter-spacing: -0.3px;
    opacity: 0.8;
}

/* History/Guide Items */
.history-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: default;
}

.history-item:hover {
    background: #f8fafc;
}

.history-item i {
    font-size: 1rem;
    margin-top: 3px;
    min-width: 20px;
    text-align: center;
}

.history-item .details span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-dark);
    letter-spacing: -0.4px; 
    margin-bottom: 2px;
}

.history-item .details small {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    display: block;
    letter-spacing: -0.2px;
}

/* Info Tags */
.info-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px;
    margin-bottom: 15px;
}

.info-tag {
    background: #f0fdf4;
    color: #166534;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Keyboard Shortcuts Style */
.shortcut-list {
    padding: 0 10px 20px 10px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #475569;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

kbd {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 2px 0 #cbd5e1;
    color: #334155;
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    min-width: 25px;
    text-align: center;
}

/* Footer & Status */
.sidebar-footer {
    padding: 15px;
    background: #fafbfc;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    justify-content: center;
}

.dot {
    height: 8px;
    width: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px rgba(66, 184, 131, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(66, 184, 131, 0); }
    100% { box-shadow: 0 0 0 0px rgba(66, 184, 131, 0); }
}

 

/* --- FULLSCREEN MODE SAFETY --- */
body.fullscreen-mode .mobile-btn-container, /* Hides the new button group */
body.fullscreen-mode .mobile-toggle-btn,
body.fullscreen-mode .header-actions-right,
body.fullscreen-mode .tab-switcher,
body.fullscreen-mode .btn-download,
body.fullscreen-mode .checker-header-pill {
    display: none !important;
}

/* Ensure the workspace takes up the full height when buttons are hidden */
body.fullscreen-mode .app-workspace {
    height: 100vh;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* --- Desktop State (Keep it clean) --- */
.tab-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px 15px 10px;
}
 

@media (max-width: 768px) {
    /* 1. Thinner & Subtle Highlight */
    .misspelled {
        border-bottom: 1.8px wavy #ff3b3b;
        padding: 0px 1px;
        background-color:#ffbebe; 
        border-radius: 2px;
        font-size: 0.92em; 
    }

    /* 2. Compact & Elegant Bottom Sheet */
    .suggestion-menu {
        position: fixed !important;
        bottom: 15px !important;   
        left: 8% !important;       
        right: 8% !important;
        top: auto !important;
        width: 84% !important;
        min-width: unset;
        
        /* Glass Effect Style */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 18px;
        padding: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(66, 184, 131, 0.25);
        
        animation: mobileSheetUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes mobileSheetUp {
        from { transform: translateY(20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    /* 3. Sleek Suggestion Items */
    .suggestion-item {
        padding: 10px 15px;      
        font-size: 0.8rem;       
        margin-bottom: 4px;
        background: #f1f5f9;      
        color: #334155;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .suggestion-item:last-child {
        margin-bottom: 0;
    }

    .suggestion-item:active {
        background: var(--accent-green);
        color: white;
        transform: scale(0.97);
    }

    /* 4. Small "No Suggestions" text */
    .suggestion-item.no-suggest {
        font-size: 0.72rem;
        background: transparent;
        color: #94a3b8;
        padding: 5px;
    }
}
/* --- Mobile Fix (The requested change) --- */
@media (max-width: 768px) {
    .tab-switcher {
        flex-direction: column;
        gap: 15px;      /* Slightly more space between font selector and tabs */
        align-items: center; /* Changed from stretch to center */
        justify-content: center;
        text-align: center;
    }

    /* Ensure the tabs container itself doesn't stretch to edges */
    .tabs {
        width: fit-content; 
        margin: 0 auto;
        display: inline-flex; /* Keeps it tight and centered */
    }

    /* If you have a font-selector or other elements inside tab-switcher */
    .font-selector {
        width: 100%;
        max-width: 280px; /* Prevents it from looking too bulky on wide phones */
    }
}
@media (max-width: 768px) {
    /* The Container */
    .mobile-btn-container {
        display: flex;
        justify-content: center; /* Centers the whole group */
        align-items: center;
        gap: 10px;               /* Space between buttons */
        width: 100%;
        padding: 10px 15px;
        margin-top: -10px; 
        margin-bottom: -15px;      /* Adjust based on your header height */
    }

    .mobile-toggle-btn {
        display: flex;
        align-items: center;     /* Vertical center */
        justify-content: center;  /* Horizontal center */
        gap: 8px;                /* Space between icon and text */
        
        flex: 1;                 /* Both buttons take equal width */
        max-width: 160px;        /* Limits width so they don't look too stretched */
        height: 33px;
         background: var(--accent-green);
        color: white;
        border: none;
        border-radius: 52px;     /* Matches your editor style */
        font-weight: 500;
        font-size: 0.83rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }

    /* Style for the Second Button (How to use) */
    .secondary-btn {
        background: var(--navy-light);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Ensure icons don't push text off-center */
    .mobile-toggle-btn i {
        font-size: 0.9rem;
        margin: 0; 
    }
}


@media (max-width: 768px) {
 

    
    .header-actions-right, 
    .tab-switcher,
    .editor-main .tabs,
    .editor-main .font-selector,
    .btn-download {
        display: none !important; 
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s ease-in-out;
    }

    body.menu-open .header-actions-right,
    body.menu-open .tab-switcher,
    body.menu-open .editor-main .tabs,
    body.menu-open .editor-main .font-selector,
    body.menu-open .btn-download {
        display: flex !important; 
        opacity: 1;
        max-height: 500px; 
        padding-top: 10px;
        padding-bottom: 10px;
    }

    body.menu-open .header-main-wrapper {
        gap: 20px;
    }
}


@media (min-width: 769px) {
    .mobile-toggle-btn { display: none; }
}
 /* --- COMPREHENSIVE MOBILE RESPONSIVENESS --- */

@media (max-width: 768px) {
    /* 1. Reset Container Padding */
    .checker-container {
        padding: 80px 10px 20px 10px;
        min-height: 100vh;
    }

    /* 2. Header & Title Adjustments */
    .header-main-wrapper {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .checker-header-pill {
        padding: 10px 20px;
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }

    .checker-header-pill h1 {
        font-size: 0.9rem; /* Reduced text size */
        flex-wrap: wrap;
        text-align: center;
        font-weight: 600;
    }

    .header-actions-right {
        position: static; /* Bring icons into flow */
        justify-content: center;
        width: 100%;
    }

    .action-circle {
        width: 40px;
        height: 40px;
    }

    /* 3. Workspace Layout (Stacking) */
    .app-workspace {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    /* 4. Sidebar (User Guide) - Made scrollable horizontally or compact */
    .side-panel {
        flex: none;
        width: 100%;
        order: 2; /* Move guide below the editor */
        max-height: 300px;
    }

    .guide-section-title {
        margin: 15px 0 8px 10px;
        font-size: 1rem;
    }

    

    .side-panel.left {
        display: none !important;
    }

    /* 5. Main Editor Adjustments */
    .editor-main {
        order: 1; /* Editor comes first on mobile */
        width: 100%;
    }

 

    .font-selector {
        width: 100%;
    }
    .text-zoomer{
        display: none;
    }

    .font-selector select {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* 6. Toolbar (Critical for Mobile) */
    .editor-toolbar {
        padding: 10px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .toolbar-left, .toolbar-right {
        gap: 5px;
    }

    .tool-btn {
        min-width: 38px;
        height: 38px;
        padding: 0 8px;
    }

    .tool-icon-img {
        width: 20px;
        height: 20px;
    }

    .btn-label, .btn-text-hover {
        display: none !important; /* Hide labels to save space */
    }

    .stats {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
/* 7. Writing Area Text Size */
.writing-area {
    padding: 15px;
    width: 100%; 
    box-sizing: border-box; 
    overflow-x: hidden; 
}

#mainEditor {
    font-size: 0.8rem !important;
    min-height: 250px;
    line-height: 1.6;
    
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block; 
    
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* 8. Footer Buttons */
.editor-footer {
    padding: 15px;
    display: flex; 
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
    .action-btn {
        padding: 10px 15px;
        font-size: 0.7rem;
        flex: 1;
        text-align: center;
    }

    /* 9. Modal Adjustments */
    .modal-box {
        width: 95%;
        padding: 20px;
    }

    .modal-icon {
        font-size: 2rem;
    }
 
.modal-scroll-content {
    -ms-overflow-style: none;  /* Internet Explorer සහ Edge සඳහා */
    scrollbar-width: none;     /* Firefox සඳහා */
}

.modal-scroll-content::-webkit-scrollbar {
    display: none;
}
}


@media (max-width: 480px) {
    .info-tag-container {
        display: flex;
        flex-direction: column; 
        align-items: center;    
        gap: 8px;              
        width: 100%;           
        padding: 5px 0;
    }

    .info-tag {
        width: fit-content;     
        justify-content: center; 
        font-size: 0.8rem;
        padding: 8px 16px;  
                border-radius: 60px;
    }
}


@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0;
        display: none;
    }

    .guide-modal {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 25px 25px 0 0 !important;
        height: auto;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        background: #ffffff;
        position: relative;
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        animation: sheet-up 0.4s ease-out;
    }

    /* Swipe Handle Bar */
    .drag-handle {
        width: 50px;
        height: 6px;
        background: #cbd5e1;
        border-radius: 10px;
        margin: 12px auto 5px auto;
        cursor: grab;
        flex-shrink: 0;
    }

    .modal-scroll-content {
        padding: 10px 20px 30px 20px;
        overflow-y: auto;
        flex: 1;
    }

    .sheet-down {
        transform: translateY(100%);
    }
}

@keyframes sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
/* --- EXTRA SMALL DEVICES (PHONES) --- */
@media (max-width: 480px) {
    .checker-header-pill h1 span {
        display: none; /* Hide English subtitle on very small screens */
    }
    
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}



/* --- MOBILE POP-UP & TOAST REFINEMENTS --- */

@media (max-width: 768px) {
    /* 1. Toast Notification (The slim message at the top) */
    .toast-notification {
        width: 90%; /* Take more width on mobile */
        top: 20px;
        padding: 10px 18px;
        font-size: 0.75rem;
        gap: 8px;
        justify-content: center;
        border-radius: 15px; /* Slightly less round for better space */
    }

    .toast-notification i {
        font-size: 1rem;
    }

 
}

 


/* --- AKURAA DYNAMIC MODAL SYSTEM --- */

/* 1. Modal Overlay */
.ak-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 28, 46, 0.85); /* Navy Dark Transparent */
    backdrop-filter: blur(8px);
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    transition: all 0.3s ease;
}

/* 2. Modal Main Wrapper (PC Default) */
.ak-modal-wrapper {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    max-height: 85vh; 
    border-radius: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(66, 184, 131, 0.3); /* Accent Green Border */
    animation: akModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

@keyframes akModalPop {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* 3. Close Button (X) */
.ak-modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}
.ak-modal-close-x:hover { color: #ff4757; }

/* 4. Icon & Title */
.ak-modal-icon-header {
    text-align: center;
    padding-top: 30px;
    font-size: 3rem;
}

.ak-modal-main-title {
    text-align: center;
    color: #0f1c2e;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 10px 0 20px 0;
    padding: 0 20px;
    letter-spacing: -0.5px;
}

.ak-modal-scroll-body {
    flex: 1;
    overflow-y: auto; /* Scrollable */
    padding: 0 30px 20px 30px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Custom Scrollbar for the modal body */
.ak-modal-scroll-body::-webkit-scrollbar {
    width: 5px;
}
.ak-modal-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(66, 184, 131, 0.3);
    border-radius: 10px;
}

/* 6. Footer & Close Button */
.ak-modal-footer {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: center;
}

.ak-modal-btn-close {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 12px 30px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.ak-modal-btn-close:hover { background: #e2e8f0; color: #0f1c2e; }

/* 7. Settings & Form Inside Modal */
.report-form textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
}
.report-form textarea:focus { border-color: #42B883; }

/* --- MOBILE RESPONSIVE (Bottom Sheet Style) --- */

@media (max-width: 768px) {
    .ak-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .ak-modal-wrapper {
        border-radius: 30px 30px 0 0; 
        max-height: 80vh; 
        animation: akSheetUp 0.4s ease-out;
    }

    @keyframes akSheetUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .ak-modal-main-title {
        font-size: 1.1rem;
    }

    .ak-modal-scroll-body {
        padding: 0 20px 20px 20px;
        font-size: 0.85rem; 
    }

    /* Mobile settings rows */
    .ak-modal-scroll-body div {
        font-size: 0.9rem;
    }

    .ak-modal-footer {
        padding: 15px 20px;
    }
}


/* --- LIGHT MODE OVERRIDES --- */

body.light-mode .checker-container {
    background: radial-gradient(circle at center, #f8fafc 0%, #e2e8f0 100%) !important;
    color: var(--navy-dark) !important;
}

body.light-mode .tab-link {
    color: var(--navy-dark);
}

body.light-mode .text-zoomer, 
body.light-mode .tabs {
    background: rgba(15, 28, 46, 0.05);
    border: 1px solid rgba(15, 28, 46, 0.1);
}

body.light-mode .tab-link.active {
    background: var(--navy-dark);
    color: white;
}

body.light-mode .font-selector select {
    background: white;
    color: var(--navy-dark);
    border-color: #cbd5e1;
}
body.light-mode .ak-settings-wrapper .setting-item-to-disable {
    opacity: 0.5;
    pointer-events: none; /* User ට click කරන්න බැරි වෙනවා */
    transition: all 0.3s ease;
}
/* =========================================
   LIGHT MODE NAVBAR - ROUNDED BOTTOM CORNERS
   ========================================= */

body.light-mode .top-nav {
    background-color: rgba(15, 28, 46, 0.95) !important;
    border-radius: 0 0 60px 60px; 
    padding-bottom: 30px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

 

body.light-mode .scroll-nav {
    background-color:rgba(15, 28, 46, 0.95) !important;
    border-radius: 100px; 
}


body.light-mode .top-nav a,
body.light-mode .scroll-nav a,
body.light-mode .mobile-nav i,
body.light-mode .mobile-nav .mobile-icon-btn img {
    color: #ffffff !important;
}

body.light-mode .search-icon-img,
body.light-mode .menu-icon-img {
    filter: brightness(0) invert(1);
}


/* =========================================
   MOBILE NAVBAR - LIGHT MODE OPTIMIZATION
   ========================================= */

@media (max-width: 768px) {
    
    body.light-mode .mobile-nav {
       
        background-color: rgba(15, 28, 46, 0.95) !important;
        border: none;
    }

    /* --- THEME TOGGLE (ICON ONLY - FIXED) --- */
.action-circle.theme-toggle {
    width: 40px !important;
    height: 40px !important; 
    box-shadow: none !important;
}

.action-circle.theme-toggle:hover {
    width: 40px !important; 
    
}

 
}
/* Base Style for Action Circle */
.action-circle.theme-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border-radius: 12px;
}
 










/* --- THEME TOGGLE (ICON ONLY - FIXED) --- */
.action-circle.theme-toggle {
    width: 46px; 
    height: 46px;
    background: #ffffff;
    border: 1px solid rgba(15, 28, 46, 0.1);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.action-circle.theme-toggle:hover {
    width: 46px; 
    background: #f1c40f; 
    border-color: #f1c40f;
    color: white;
    transform: translateY(-2px);
 }


.action-circle.theme-toggle i {
    font-size: 1.1rem;
    transition: transform 0.5s ease;
}


body.light-mode .action-circle.theme-toggle:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
}

 
.action-circle.theme-toggle .action-label {
    display: none !important;
}


/* --- AKURAA ANIMATED BRANDING --- */
.ak-guide-hero-banner {
    /* Your specific color mixed into a gradient for animation */
    background: linear-gradient(-45deg, 
        rgba(15, 28, 46, 0.95), 
        rgba(25, 48, 80, 0.95), 
        rgba(15, 28, 46, 0.95), 
        rgba(30, 58, 138, 0.95)
    );
    background-size: 400% 400%; /* Necessary for the movement effect */
    animation: ak-bg-shift 10s ease infinite;
    
    padding: 22px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* Moving Gradient Animation */
@keyframes ak-bg-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* --- INTERNAL STAR RATING STYLES --- */
.ak-guide-stars-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.ak-star-group {
    display: flex;
    flex-direction: row-reverse;
}

.ak-star-group input {
    display: none;
}

.ak-star-group label {
    font-size: 16px;
    color: #ffcc00; 
    cursor: pointer;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    line-height: 1;
    text-shadow: 0 0 3px rgba(255, 204, 0, 0.3);
}


.ak-star-group label:hover,
.ak-star-group label:hover ~ label {
    color: #ffffff; 
    transform: scale(1.2);
}

.ak-rate-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    margin-left: 2px;
}
.ak-guide-logo-circle {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(66, 184, 131, 0.2); /* Subtle green glow to match brand */
    flex-shrink: 0;
    /* Gentle floating animation for the logo */
    animation: ak-logo-float 3s ease-in-out infinite;
}

@keyframes ak-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.ak-guide-brand-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}
/* Existing layout - same as before */
.ak-guide-hero-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.ak-guide-info {
    display: flex;
    flex-direction: column;
}

.ak-guide-reactions {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

/* Button style with position relative to contain particles */
.ak-reaction-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
}

/* YouTube style "Burst" Animation */
.ak-pop {
    animation: ak-icon-pop 0.4s ease;
    color: #42B883 !important;
    background: rgba(66, 184, 131, 0.15) !important;
    border-color: #42B883 !important;
}

/* Creating the dots using box-shadow */
.ak-pop::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    z-index: -1;
    /* initial hidden dots */
    box-shadow: 0 -18px 0 0 #42B883, 12px -12px 0 0 #42B883, 18px 0 0 0 #42B883, 12px 12px 0 0 #42B883, 0 18px 0 0 #42B883, -12px 12px 0 0 #42B883, -18px 0 0 0 #42B883, -12px -12px 0 0 #42B883;
    animation: ak-dots-burst 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes ak-icon-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes ak-dots-burst {
    0% {
        transform: scale(0.2);
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
        /* Dots move further out */
        box-shadow: 0 -25px 0 0 #42B883, 18px -18px 0 0 #42B883, 25px 0 0 0 #42B883, 18px 18px 0 0 #42B883, 0 25px 0 0 #42B883, -18px 18px 0 0 #42B883, -25px 0 0 0 #42B883, -18px -18px 0 0 #42B883;
    }
}

.ak-guide-brand-name {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ak-guide-brand-tag {
    color: #42B883; /* Using your Accent Green for the sub-text */
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Header layout */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ak-modal-header-actions {
    display: flex;
    gap: 15px;
}

/* Button style - Updated with Default Blue */
.ak-header-btn {
    position: relative;
    background: transparent;
    border: none;
    /* Default color eka mehema dammahama aniwaa penawa */
    color: #747474 !important; 
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
}

/* Hover effect */
.ak-header-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Blue Burst Animation */
.ak-header-burst {
    /* Click karaddi thawa bright blue ekak hadamu */
    color: #00d2ff !important; 
    animation: ak-header-pop 0.4s ease;
}

/* Blue Dots (Burst) */
.ak-header-burst::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    z-index: 10;
    /* Neon Blue dots shadow ekath ekka */
    box-shadow: 0 -18px 0 0 #3b82f6, 12px -12px 0 0 #3b82f6, 18px 0 0 0 #3b82f6, 12px 12px 0 0 #3b82f6, 0 18px 0 0 #3b82f6, -12px 12px 0 0 #3b82f6, -18px 0 0 0 #3b82f6, -12px -12px 0 0 #3b82f6;
    animation: ak-header-dots 0.5s ease-out forwards;
}

@keyframes ak-header-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

@keyframes ak-header-dots {
    0% { transform: scale(0.2); opacity: 1; }
    100% { 
        transform: scale(1.6); 
        opacity: 0; 
        box-shadow: 0 -28px 0 0 #3b82f6, 20px -20px 0 0 #3b82f6, 28px 0 0 0 #3b82f6, 20px 20px 0 0 #3b82f6, 0 28px 0 0 #3b82f6, -20px 20px 0 0 #3b82f6, -28px 0 0 0 #3b82f6, -20px -20px 0 0 #3b82f6;
    }
}


 

 

.modal-guide-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 28px;
}

.star-rating-box {
    display: flex;
    flex-direction: row-reverse;
}

.star-rating-box input {
    display: none;
}

/* Star Styles - Default Green */
.star-rating-box label {
    font-size: 15px;
    color: #42B883; /* Your Brand Green */
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}


.star-rating-box label:hover,
.star-rating-box label:hover ~ label {
    color: #2d8a61; /* Darker Green on hover */
    transform: scale(1.2);
}

/* Rating value text - Medium grey */
.rating-text-val {
    font-size: 12px;
    color: #666666;
    font-weight: 600;
}


@media (max-width: 768px) {
    #mainEditor {
        /* Browser won't zoom if font-size is 16px or larger */
        font-size: 14px !important; 
        min-height: 250px;
        line-height: 1.6;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: block; 
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}



/* Active (Selected) State for Buttons */
/* Sidebar buttons සඳහා */
.ak-reaction-btn.active {
    background: #42B883 !important;
    color: white !important;
    border-color: #42B883 !important;
}

/* Modal header buttons සඳහා */
.ak-header-btn.active {
    color: #3b82f6 !important; /* Blue color for active */
    font-weight: bold;
}

/* Like icon එක solid (fas) කරන්න */
.ak-header-btn.active i {
    font-weight: 900; /* FontAwesome solid style */
}