/* My All Fancy Text Converter - Styles (clean build) */

.my-fancy-widget {
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Inter,Arial,sans-serif;
}

.my-fancy-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.my-fancy-label {
    display: block;
    font-size: .9rem;
    margin: 8px 0 6px;
    color: #333;
}

/* Input area - Sticky with margin */
.my-fancy-input-section {
    position: sticky;
    top: 5px;
    margin: 5px;
    margin-bottom: 20px;
    z-index: 100;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Input wrapper - contains textarea and inline buttons */
.my-fancy-input-wrapper {
    position: relative;
    display: flex;
    gap: 8px;
    border: 1.5px dashed #003467 ;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(122,167,255,.15);
    transition: border-color .2s, box-shadow .2s;
    z-index: 101;
}

.my-fancy-input-wrapper:hover {
    border-color: #007cba;
}

/* Textarea - 3 rows fixed, then scrollable */
.my-fancy-textarea {
    flex: 1;
    resize: none;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1rem;
    line-height: 1.5;
    background: #fff;
    transition: background .2s;
    height: calc(1.5em * 3 + 20px); /* 3 rows */
    overflow-y: auto;
    min-height: calc(1.5em * 3 + 20px);
    max-height: calc(1.5em * 3 + 20px);
    text-align: center; /* Center align text in input field */
}
.my-fancy-textarea:focus { 
    outline: none;
    background: #fafafa;
}

/* Inline buttons - stacked vertically inside input area */
.my-fancy-actions-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: flex-start;
}

.my-fancy-inline-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 4px !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: auto;
}

.my-fancy-inline-btn .my-fancy-btn-icon {
    font-size: 12px;
}

.my-fancy-actions-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Non-bootstrap button look */
.my-fancy-btn { padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; transition: all .15s ease; display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; }
.my-fancy-btn:hover { filter: brightness(0.98); }
.my-fancy-btn:active { transform: translateY(1px); }
.my-fancy-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,128,237,.25); }
/* Paste (dark) */
.my-fancy-btn-paste { background: #212529; color: #fff; border-color: #212529; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.my-fancy-btn-paste:hover { background: #1b1f22; }
/* Clear (red) */
.my-fancy-btn-clear { background: #dc3545; color: #fff; border-color: #dc3545; box-shadow: 0 1px 2px rgba(220,53,69,.25); }
.my-fancy-btn-clear:hover { background: #c82333; }
/* When Bootstrap is enabled, shrink paste/clear further */
#my-fancy-paste.btn, #my-fancy-clear.btn { padding: 6px 12px; font-size: 12px; line-height: 0.8; border-radius: 6px; }
#my-fancy-paste.btn { background: #212529; border: 1px solid #212529; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
#my-fancy-paste.btn:hover { background: #1b1f22; }
#my-fancy-clear.btn { background: #dc3545; border: 1px solid #dc3545; box-shadow: 0 1px 2px rgba(220,53,69,.25); }
#my-fancy-clear.btn:hover { background: #c82333; }
#my-fancy-paste .bi, #my-fancy-clear .bi,
#my-fancy-paste .my-fancy-btn-icon, #my-fancy-clear .my-fancy-btn-icon { font-size: 0.95rem; line-height: 1; display: inline-block; vertical-align: middle; }

/* Grid of styles - Always one column */
.my-fancy-styles-grid { 
    margin-top: 20px; 
    width: 100%;
    box-sizing: border-box;
}
.my-fancy-styles-title { 
    font-size: 1.2rem; 
    font-weight: 600; 
    margin: 0 0 15px; 
    color: #333; 
    text-align: center; 
}
.my-fancy-styles-container { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 15px; 
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.my-fancy-style-item { 
    border: 2px solid #d1d5f7; 
    border-radius: 12px; 
    padding: 16px; 
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 50%, #f0f4ff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    flex-direction: column; 
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12), 0 2px 4px rgba(102, 126, 234, 0.06);
    overflow: hidden;
}

.my-fancy-style-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #003467 0%, #0052cc 50%, #0066ff 100%);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform 0.3s ease;
    opacity: 0.9;
    z-index: 2;
}

.my-fancy-style-item::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 52, 103, 0.12) 0%, transparent 70%);
    pointer-events: none;
    transition: all 0.3s ease;
}

.my-fancy-style-item:hover::before {
    transform: scaleX(1);
    opacity: 1;
    height: 2px;
    box-shadow: 0 2px 8px rgba(0, 52, 103, 0.4);
}

.my-fancy-style-item:hover::after {
    background: radial-gradient(circle, rgba(0, 52, 103, 0.2) 0%, transparent 60%);
}

.my-fancy-style-item:hover { 
    border-color: #003467; 
    box-shadow: 
        0 12px 40px rgba(0, 52, 103, 0.25),
        0 0 0 4px rgba(0, 52, 103, 0.15),
        0 0 20px rgba(0, 52, 103, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e8f2ff 50%, #d6e8ff 100%);
}
.my-fancy-style-name { 
    font-size: 0.8rem; 
    font-weight: 600; 
    color: #0251a0; 
    margin-bottom: 10px; 
    text-transform: capitalize;
    display: block;
    width: 100%;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    position: relative;
    padding-left: 4px;
}

.my-fancy-style-name::before {
    content: '▸';
    position: absolute;
    left: -8px;
    color: #000000;
    font-size: 0.7rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.my-fancy-style-item:hover .my-fancy-style-name {
    color: #001988;
}

.my-fancy-style-item:hover .my-fancy-style-name::before {
    left: -12px;
    opacity: 1;
    transform: scale(1.2);
}

/* Inline more styles link beside bracket names */
.my-fancy-inline-more-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #667eea;
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 8px;
    white-space: nowrap;
}

.my-fancy-inline-more-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.my-fancy-inline-more-link i {
    font-size: 0.7rem;
}

.my-fancy-style-output-container { 
    position: relative; 
    display: flex; 
    align-items: flex-start; 
    gap: 8px; 
    min-width: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 2px;
    border: 2px solid transparent;
    transition: background 0.3s ease;
}

.my-fancy-style-item:hover .my-fancy-style-output-container {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 52, 103, 0.2);
    box-shadow: 0 2px 8px rgba(0, 52, 103, 0.15);
}
.my-fancy-style-output {
    font-size: clamp(.9rem, 2.8vw, 1rem);
    line-height: 1.5;
    min-height: calc(1.5em + 20px); /* 1 row with padding */
    max-height: calc(1.5em * 2 + 20px); /* 2 rows max */
    padding: 10px 46px 10px 10px; /* extra room for copy icon + scrollbar */
    background: #fff;
    border: 2px dashed #003467;
    border-radius: 4px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 52, 103, 0.5) rgba(0, 52, 103, 0.05);
}

.my-fancy-style-item:hover .my-fancy-style-output {
    border-style: solid;
    border-style: solid;
    box-shadow: 
        0 4px 12px rgba(0, 52, 103, 0.2),
        inset 0 2px 6px rgba(0, 52, 103, 0.05),
        0 0 0 2px rgba(0, 52, 103, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

/* Christmas style special handling - single line display */
.my-fancy-style-item[data-style^="ChristmasFancyTextStyle"] .my-fancy-style-output {
    max-height: calc(1.6em * 2 + 20px);
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Override for large screens - increase font size like other styles */
@media (min-width: 769px) {
    .my-fancy-style-item[data-style^="ChristmasFancyTextStyle"] .my-fancy-style-output {
        font-size: 1.25rem;
        line-height: 1.5;
    }
}

/* Ensure scrollbar doesn't overlap with copy button */
.my-fancy-style-output::-webkit-scrollbar {
    width: 8px;
}

.my-fancy-style-output::-webkit-scrollbar-track {
    background: rgba(0, 52, 103, 0.05);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.my-fancy-style-item:hover .my-fancy-style-output::-webkit-scrollbar-track {
    background: rgba(0, 52, 103, 0.1);
}

.my-fancy-style-output::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 52, 103, 0.4) 0%, rgba(0, 52, 103, 0.6) 100%);
    border-radius: 4px;
    border: 1px solid rgba(0, 52, 103, 0.2);
    transition: all 0.3s ease;
}

.my-fancy-style-item:hover .my-fancy-style-output::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 52, 103, 0.6) 0%, rgba(0, 52, 103, 0.85) 100%);
    border-color: rgba(0, 52, 103, 0.4);
    box-shadow: 0 2px 8px rgba(0, 52, 103, 0.4);
}

.my-fancy-style-output::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 52, 103, 0.7) 0%, #003467 100%);
    border-color: rgba(0, 52, 103, 0.5);
    box-shadow: 0 4px 12px rgba(0, 52, 103, 0.5);
}

/* Firefox scrollbar hover styling */
.my-fancy-style-item:hover .my-fancy-style-output {
    scrollbar-color: rgba(0, 52, 103, 0.7) rgba(0, 52, 103, 0.1);
}

/* Copy button inside box (works with or without Bootstrap) */
.my-fancy-copy-btn { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    width: 26px; 
    height: 26px; 
    padding: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0; 
    white-space: nowrap; 
    z-index: 5;
    margin: 0;
    box-sizing: border-box;
}
.my-fancy-copy-btn.btn { 
    padding: 0 !important; 
    width: 26px; 
    height: 26px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    line-height: 1;
    margin: 0;
    background-color: #003467 !important;
    border-color: #003467 !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0, 52, 103, 0.3) !important;
}

.my-fancy-copy-btn.btn:hover {
    background-color: #0052cc !important;
    border-color: #0052cc !important;
    box-shadow: 0 4px 12px rgba(0, 52, 103, 0.4), 0 0 0 2px rgba(0, 52, 103, 0.2) !important;
    transform: scale(1.1);
}

.my-fancy-copy-btn.btn:active,
.my-fancy-copy-btn.btn:focus {
    background-color: #0066ff !important;
    border-color: #0066ff !important;
    transform: scale(1.05);
}
.my-fancy-copy-btn:not(.btn) { 
    border: 1.5px solid #003467; 
    border-radius: 4px; 
    background: #003467; 
    color: #fff; 
    font-size: 14px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 2px 6px rgba(0, 52, 103, 0.3);
}
.my-fancy-copy-btn:not(.btn):hover { 
    background: #0052cc; 
    border-color: #0052cc;
    box-shadow: 0 4px 12px rgba(0, 52, 103, 0.4), 0 0 0 2px rgba(0, 52, 103, 0.2);
    transform: scale(1.1);
}
.my-fancy-copy-btn:not(.btn):active { 
    background: #0066ff; 
    border-color: #0066ff;
    transform: scale(1.05);
}
.my-fancy-copy-icon { font-size: .9rem; line-height: 1; display: inline-block; }

/* Notes & toast */
.my-fancy-note { font-size: .85rem; color: #555; margin: 10px 0 0; }
.my-fancy-mono { font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; background: #f3f4f6; padding: 2px 6px; border-radius: 6px; }
.my-fancy-toast { position: relative; margin-top: 10px; font-size: .85rem; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; padding: 6px 8px; display: none; }
.my-fancy-toast.my-fancy-show { display: block; }

/* Responsive */
@media (max-width: 768px) {
    .my-fancy-styles-container { gap: 10px; }
    .my-fancy-style-item { padding: 10px; }
    
    /* Adjust copy button size and position for small screens */
    .my-fancy-copy-btn { 
        width: 24px; 
        height: 24px;
        right: 10px;
        top: 6px;
    }
    .my-fancy-copy-btn.btn { 
        width: 24px; 
        height: 24px;
    }
    
    /* Adjust output field padding for smaller button */
    .my-fancy-style-output {
        padding: 10px 36px 10px 10px;
        min-height: calc(1.5em + 20px);
        max-height: calc(1.5em * 2 + 20px);
    }
    
    /* Input wrapper stacks on small screens */
    .my-fancy-input-wrapper {
        flex-direction: column;
    }
    
    .my-fancy-actions-inline {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }
    
    /* Inline more link responsive */
    .my-fancy-inline-more-link {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        font-size: 0.6rem;
    }
}

@media (min-width: 769px) {
    /* Increase font sizes on large screens */
    .my-fancy-textarea {
        font-size: 1.25rem;
        height: calc(1.5em * 3 + 20px);
        max-height: calc(1.5em * 3 + 20px);
    }
    
    .my-fancy-style-output {
        font-size: 1.25rem;
        line-height: 1.5;
        min-height: calc(1.5em + 20px);
        max-height: calc(1.5em * 2 + 20px);
        padding: 10px 50px 10px 10px; /* More space for copy button on large screens */
    }
    
    /* Add more margin to copy button on large screens */
    .my-fancy-copy-btn {
        right: 12px;
        top: 10px;
        width: 30px;
        height: 30px;
    }
    
    .my-fancy-copy-btn.btn {
        width: 30px;
        height: 30px;
    }
}

/* Category Menu Styles */
.my-fancy-category-menu-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Hamburger Menu Button (visible on small screens) */
.my-fancy-menu-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 10px;
    z-index: 1000;
    background: #fff;
    border: 2px solid #007cba;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.my-fancy-menu-toggle .my-fancy-hamburger-icon {
    width: 24px;
    height: 3px;
    background: #007cba;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.my-fancy-menu-toggle.active .my-fancy-hamburger-icon:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.my-fancy-menu-toggle.active .my-fancy-hamburger-icon:nth-child(2) {
    opacity: 0;
}

.my-fancy-menu-toggle.active .my-fancy-hamburger-icon:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Category Menu */
.my-fancy-category-menu {
    background: linear-gradient(135deg, #003467 0%, #000000 50%, #000000 100%);
    border-radius: 12px;
    padding: 16px 8px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.my-fancy-category-menu,
.my-fancy-category-menu-wrapper {
    -ms-overflow-style: none;  /* IE 10+ */
    scrollbar-width: none;     /* Firefox */
}

.my-fancy-category-menu::-webkit-scrollbar,
.my-fancy-category-menu-wrapper::-webkit-scrollbar {
    display: none;
}

.my-fancy-category-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: menuShimmer 8s ease-in-out infinite;
}

@keyframes menuShimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(180deg); }
}

.my-fancy-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.my-fancy-menu-list li {
    margin: 0 0 8px 0;
    padding: 0;
}

.my-fancy-menu-list li:last-child {
    margin-bottom: 0;
}

.my-fancy-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.my-fancy-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.my-fancy-menu-item:hover::before {
    left: 100%;
}

.my-fancy-menu-item:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.my-fancy-menu-item.active {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.my-fancy-menu-icon {
    font-size: 1.6rem;
    line-height: 1;
    display: inline-block;
    min-width: 28px;
    text-align: center;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    animation: emojiBounce 2s ease-in-out infinite;
}

.my-fancy-menu-item:hover .my-fancy-menu-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    animation: none;
}

@keyframes emojiBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.my-fancy-menu-text {
    flex: 1;
    line-height: 1.4;
}

/* Content Column */
.my-fancy-content-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

/* Styles Wrapper - for layout with menu */
.my-fancy-styles-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
}

/* Small screens: Menu as overlay/hamburger */
@media (max-width: 768px) {
    .my-fancy-menu-toggle {
        display: flex;
    }
    
    .my-fancy-category-menu {
        position: fixed;
        top: 130px;
        left: -300px;
        width: 280px;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    }
    
    .my-fancy-category-menu.active {
        left: 10px;
    }
    
    .my-fancy-styles-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .my-fancy-content-column {
        width: 100%;
        grid-column: 1;
    }
    
    .my-fancy-styles-grid {
        width: 100%;
    }
    
    .my-fancy-category-menu-wrapper {
        grid-column: 1;
        width: 100%;
        order: -1;
    }

    .my-fancy-category-menu,
    .my-fancy-category-menu-wrapper {
        -ms-overflow-style: auto;
        scrollbar-width: thin;
    }

    .my-fancy-category-menu::-webkit-scrollbar,
    .my-fancy-category-menu-wrapper::-webkit-scrollbar {
        display: initial;
        width: 8px;
    }

    .my-fancy-category-menu::-webkit-scrollbar-track,
    .my-fancy-category-menu-wrapper::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        transition: background 0.3s ease;
    }

    .my-fancy-category-menu::-webkit-scrollbar-thumb,
    .my-fancy-category-menu-wrapper::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 100%);
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
    }

    .my-fancy-category-menu::-webkit-scrollbar-thumb:hover,
    .my-fancy-category-menu-wrapper::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, #ffffff 100%);
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
    }
}

/* Large screens: Vertical menu on left */
@media (min-width: 769px) {
    .my-fancy-menu-toggle {
        display: none;
    }
    
    .my-fancy-category-menu-wrapper {
        width: 220px;
        grid-column: 1;
        position: relative;
        top: auto;
        height: auto;
        min-height: auto;
        margin-bottom: 0;
        align-self: flex-start;
        overflow: visible;
    }
    
    .my-fancy-category-menu {
        position: relative;
        left: auto;
        width: 100%;
        height: auto;
        min-height: auto;
        overflow: visible;
    }
    
    .my-fancy-styles-wrapper {
        grid-template-columns: 220px 1fr;
        gap: 20px;
    }
    
    .my-fancy-content-column {
        grid-column: 2;
        width: 100%;
        min-width: 0;
    }
    
    .my-fancy-styles-grid {
        width: 100%;
        min-width: 0;
    }
    
    /* Adjust styles container when menu is present */
    .my-fancy-styles-grid .my-fancy-styles-container {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    
    /* Ensure styles don't overflow */
    .my-fancy-style-item {
        width: 100%;
        max-width: 100%;
    }
    
    .my-fancy-style-output-container {
        width: 100%;
        max-width: 100%;
    }
}




