/* =============================================================================
   CarrotKernel - Professional UI Styling ✨

   Inspired by BunnyMoTags Professional Design:
   - Uses native SillyTavern theme variables for consistent theming
   - Responsive design that prevents horizontal scrolling
   - Enhanced accessibility and smooth interactions
   - Beautiful status panels with subtle animations
   ============================================================================= */

/* Import Repository Manager Styles */
@import url('./repo-manager-styles.css');

/* =============================================================================
   WORLDINFO-INFO COPY STYLING (exact copy of original extension styling)
   ============================================================================= */

.stwii--trigger {
    position: absolute;
    bottom: 0.125em;
    left: 0.25em;
    font-size: 2em;
    opacity: 0.25;
    transition: opacity 200ms;
    cursor: pointer;
    z-index: 3010;
    filter: drop-shadow(2px 4px 6px black);
    display: block;
    anchor-name: --stac--wiAnchor;
    color: #ff8c00;
}

.ck-trigger:not([data-ck-badge-count="0"]):hover::after {
    opacity: 1;
}

.ck-trigger:not([data-ck-badge-count="0"])::after {
    content: attr(data-ck-badge-count);
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: calc(0.65 * var(--mainFontSize));
    font-weight: bold;
    font-family: var(--mainFontFamily);
    color: white;
    background: black;
    line-height: 1;
    padding: 0.25em;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    height: 1lh;
    text-align: center;
    pointer-events: none;
    transition: 200ms;
}

.ck-trigger:not([data-ck-badge-count="0"]).ck-badge--in::after {
    animation: stwii--badge-popin 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ck-trigger:not([data-ck-badge-count="0"]).ck-badge--out::after {
    animation: stwii--badge-popin 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) reverse;
}

.ck-trigger:not([data-ck-badge-count="0"]).ck-badge--bounce::after {
    animation: stwii--badge-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation-iteration-count: 2;
}

.stwii--panel {
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.4));
    z-index: 30000;
    overflow: hidden;
    border-radius: 16px;
    padding: 0;
    display: none;
    flex-direction: column;
    font-size: 14px;
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 2px solid #4ecdc4;
    position: fixed;
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(78, 205, 196, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stwii--panel.stwii--isActive {
    display: flex;
    overflow-y: auto;
}

/* CarrotKernel Header */
.stwii--panel-header {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    padding: 16px 20px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.stwii--panel-content {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.stwii--world {
    font-weight: bold;
    font-size: 15px;
    color: #4ecdc4;
    padding: 12px 16px 8px 16px;
    margin: 8px 0 4px 0;
    border-left: 4px solid #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 6px;
}

.stwii--entry {
    gap: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.stwii--entry:hover {
    background: rgba(78, 205, 196, 0.08);
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-1px);
}

.stwii--entry.stwii--expanded {
    background: rgba(78, 205, 196, 0.12);
    border-color: rgba(78, 205, 196, 0.4);
}

.stwii--entry.stwii--isBroken {
    background-color: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
}

.stwii--strategy {
    font-size: 20px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.stwii--title {
    flex: 1;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.4;
}

.stwii--sticky {
    font-size: 12px;
    color: #4ecdc4;
    font-weight: bold;
    flex-shrink: 0;
}

.stwii--note .stwii--strategy::before {
    opacity: 0.5;
}

.stwii--messages .stwii--strategy {
    position: relative;
}

.stwii--messages .stwii--strategy::after {
    content: attr(data-stwii--count);
    font-family: var(--mainFontFamily);
    position: absolute;
    inset: 0;
    text-shadow: -1px -1px 1px black, 1px 1px 1px black, -1px 1px 1px black, 1px -1px 1px black;
    font-size: 0.75em;
    padding-top: 0.25em;
}

.stwii--messages .stwii--strategy::before {
    opacity: 0.5;
}

.stwii--messages .stwii--title {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    font-size: 0.5em;
    width: 0;
}

.stwii--messages .stwii--title .stwii--first,
.stwii--messages .stwii--title .stwii--last {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stwii--messages .stwii--title .stwii--sep {
    opacity: 0.75;
    flex: 0 0 auto;
    line-height: 0.125em;
    padding-bottom: 0.6em;
}

.stwii--configRow {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0.5em;
    cursor: pointer;
    opacity: 0.5;
    transition: 200ms;
}

.stwii--configRow:hover {
    opacity: 1;
}

@keyframes stwii--badge-popin {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    48% {
        transform: scale(1.2);
        opacity: 1;
    }
    80% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes stwii--badge-bounce {
    0% {
        opacity: 0.5;
        transform: scale(1) translateY(0);
    }
    10% {
        opacity: 1;
        transform: scale(1.1, 0.9) translateY(0);
    }
    30% {
        opacity: 1;
        transform: scale(0.9, 1.1) translateY(-0.5em);
    }
    50% {
        opacity: 1;
        transform: scale(1.05, 0.95) translateY(0);
    }
    57% {
        opacity: 1;
        transform: scale(1) translateY(-0.125em);
    }
    64% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    90% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0.5;
        transform: scale(1) translateY(0);
    }
}

/* TUTORIAL HIGHLIGHT SYSTEM - Responsive highlighting for all devices */
.carrot-tutorial-highlight {
    box-shadow: 0 0 0 2px var(--active, #ffd700) !important;
    border-radius: 4px !important;
    position: relative !important;
    z-index: 1000 !important;
    animation: carrot-tutorial-glow 3s ease-in-out infinite !important;
    scroll-margin-top: 80px !important; /* Ensure element is visible below headers */
    scroll-margin-bottom: 40px !important;
}

@keyframes carrot-tutorial-glow {
    0%, 100% {
        box-shadow: 0 0 0 2px var(--active, #ffd700);
    }
    50% {
        box-shadow: 0 0 0 2px var(--active, #ffd700), 0 0 8px rgba(255, 215, 0, 0.4);
    }
}

/* Mobile-specific tutorial highlighting - stronger visibility on small screens */
@media (max-width: 768px) {
    .carrot-tutorial-highlight {
        box-shadow: 0 0 0 3px var(--active, #ffd700) !important;
        border-radius: 6px !important;
        scroll-margin-top: 100px !important; /* More space for mobile headers */
        scroll-margin-bottom: 60px !important;
    }
    
    @keyframes carrot-tutorial-glow {
        0%, 100% { 
            box-shadow: 0 0 0 3px var(--active, #ffd700);
        }
        50% { 
            box-shadow: 0 0 0 3px var(--active, #ffd700), 0 0 12px rgba(255, 215, 0, 0.6);
        }
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .carrot-tutorial-highlight {
        animation-duration: 2s !important; /* Faster animation on touch devices */
        scroll-margin-top: 120px !important; /* Extra space for touch interfaces */
    }
}

/* MAIN CONTAINER */
.carrot-extension-settings {
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* DISABLED STATE SYSTEM */
.carrot-disabled {
    opacity: 0.6;
    position: relative;
    filter: grayscale(0.4);
}

/* Disable everything EXCEPT the master enable area */
.carrot-disabled .carrot-card:not(.carrot-enable-card) {
    pointer-events: none;
    position: relative;
}

.carrot-disabled .carrot-card:not(.carrot-enable-card)::after {
    content: "🥕 Enable CarrotKernel to unlock features";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 95%, black);
    color: #ff7e5f;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9em;
    z-index: 100;
    pointer-events: none;
    border: 1px solid var(--active);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 20%, transparent);
    white-space: nowrap;
    /* Optimized backdrop filter for performance */
    backdrop-filter: blur(1px);
    contain: layout style paint;
}

/* Master enable card stays fully functional when disabled */
.carrot-disabled .carrot-enable-card {
    opacity: 1;
    filter: none;
    pointer-events: auto;
    border: 2px solid var(--active);
    box-shadow: 0 0 12px color-mix(in srgb, var(--active) 25%, transparent);
    animation: carrot-pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes carrot-pulse-glow {
    0% { box-shadow: 0 0 12px color-mix(in srgb, var(--active) 25%, transparent); }
    100% { box-shadow: 0 0 16px color-mix(in srgb, var(--active) 35%, transparent); }
}

/* PROFESSIONAL CARDS */
.carrot-card {
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid color-mix(in srgb, var(--active) 15%, var(--SmartThemeBorderColor));
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px color-mix(in srgb, black 10%, transparent);
}

.carrot-card:hover {
    border-color: #ff7e5f;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--active) 15%, transparent);
    transform: translateY(-2px);
}

.carrot-card-header {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 8%, transparent) 0%, 
        color-mix(in srgb, var(--active) 3%, transparent) 100%);
    padding: 20px 24px;
    border-bottom: 1px solid color-mix(in srgb, var(--active) 10%, transparent);
}

.carrot-card-header h3 {
    margin: 0 0 8px 0;
    color: #e0e0e0;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carrot-card-subtitle {
    margin: 0;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 0.9em;
    font-style: italic;
}

.carrot-card-body {
    padding: 24px;
    background: var(--SmartThemeBlurTintColor);
}

/* ENHANCED STATUS PANELS SECTION */
.carrot-status-section {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 2%, transparent) 0%, 
        color-mix(in srgb, var(--active) 1%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--active) 10%, transparent);
    border-radius: 12px;
    box-shadow: 0 2px 8px color-mix(in srgb, black 8%, transparent);
}

.carrot-status-panels {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 1200px) {
    .carrot-status-panels {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .carrot-status-panels {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .carrot-status-panels {
        grid-template-columns: 1fr;
    }
}

/* INDIVIDUAL STATUS PANELS */
.carrot-status-panel {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 4%, var(--SmartThemeBlurTintColor)) 0%, 
        color-mix(in srgb, var(--active) 2%, var(--SmartThemeBlurTintColor)) 100%);
    border: 1px solid color-mix(in srgb, var(--active) 15%, transparent);
    border-left: 4px solid var(--active);
    border-radius: 12px;
    padding: 20px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    min-height: 120px;
}

.carrot-status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        color-mix(in srgb, var(--active) 30%, transparent) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carrot-status-panel:hover {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 8%, var(--SmartThemeBlurTintColor)) 0%, 
        color-mix(in srgb, var(--active) 4%, var(--SmartThemeBlurTintColor)) 100%);
    transform: translateY(-3px) scale(1.02);
    border-color: color-mix(in srgb, var(--active) 25%, transparent);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--active) 15%, transparent);
}

.carrot-status-panel:hover::before {
    opacity: 1;
}

/* STATUS PANEL ICONS */
.carrot-status-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 15%, transparent) 0%, 
        color-mix(in srgb, var(--active) 8%, transparent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7e5f;
    font-size: 1.2em;
    border: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.carrot-status-panel:hover .carrot-status-icon {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 20%, transparent) 0%, 
        color-mix(in srgb, var(--active) 12%, transparent) 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 20%, transparent);
}

/* STATUS CONTENT */
.carrot-status-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.carrot-status-title {
    font-weight: 600;
    color: #ff7e5f;
    margin: 0 0 6px 0;
    font-size: 0.9em;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.carrot-status-value {
    color: #e0e0e0;
    font-size: 0.85em;
    font-weight: 500;
    margin: 0 0 4px 0;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
}

.carrot-status-detail {
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 0.75em;
    line-height: 1.3;
    margin: 0;
    font-style: italic;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
}

/* ENHANCED STATUS INDICATORS */
.carrot-status-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--SmartThemeBorderColor);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 2px 6px color-mix(in srgb, black 15%, transparent);
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.carrot-status-indicator.active {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 80%, white) 100%);
    border-color: color-mix(in srgb, var(--active) 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, var(--active) 40%, transparent);
    /* Reduced animation frequency and intensity for performance */
    animation: carrot-status-pulse 4s ease-in-out infinite;
    will-change: opacity;
}

.carrot-status-indicator.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: color-mix(in srgb, #22c55e 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, #22c55e 40%, transparent);
}

.carrot-status-indicator.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: color-mix(in srgb, #f59e0b 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, #f59e0b 40%, transparent);
}

.carrot-status-indicator.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: color-mix(in srgb, #ef4444 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, #ef4444 40%, transparent);
    /* Reduced animation frequency for performance */
    animation: carrot-error-pulse 3s ease-in-out infinite;
    will-change: opacity;
}

/* PULSE ANIMATIONS */
.carrot-pulse-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    /* Reduced animation frequency and use opacity-only for performance */
    animation: carrot-dot-pulse 4s ease-in-out infinite;
    will-change: opacity;
}

@keyframes carrot-status-pulse {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.85;
    }
}

@keyframes carrot-error-pulse {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.8;
    }
}

@keyframes carrot-dot-pulse {
    0%, 100% { 
        opacity: 0.7;
    }
    50% { 
        opacity: 1;
    }
}

/* STATUS PANEL STATES */
.carrot-status-system.initialized .carrot-status-indicator {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: color-mix(in srgb, #22c55e 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, #22c55e 40%, transparent);
}

.carrot-status-repository.loaded .carrot-status-indicator {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: color-mix(in srgb, #3b82f6 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, #3b82f6 40%, transparent);
}

.carrot-status-injection.injecting .carrot-status-indicator {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 80%, white) 100%);
    border-color: color-mix(in srgb, var(--active) 40%, white);
    box-shadow: 0 0 12px color-mix(in srgb, var(--active) 40%, transparent);
    /* Reduced animation frequency for performance */
    animation: carrot-status-pulse 3s ease-in-out infinite;
    will-change: opacity;
}

/* RESET PANEL STYLING */
.carrot-status-reset:hover {
    background: linear-gradient(135deg,
        color-mix(in srgb, #f59e0b 8%, var(--SmartThemeBlurTintColor)) 0%,
        color-mix(in srgb, #f59e0b 4%, var(--SmartThemeBlurTintColor)) 100%);
    border-color: color-mix(in srgb, #f59e0b 25%, transparent);
    box-shadow: 0 8px 20px color-mix(in srgb, #f59e0b 15%, transparent);
}

.carrot-status-reset:hover .carrot-status-icon {
    background: linear-gradient(135deg,
        color-mix(in srgb, #f59e0b 25%, transparent) 0%,
        color-mix(in srgb, #f59e0b 15%, transparent) 100%);
    color: #f59e0b;
    box-shadow: 0 4px 12px color-mix(in srgb, #f59e0b 25%, transparent);
}

/* SETTINGS GRID */
.carrot-settings-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .carrot-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.carrot-setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

/* Ensure all toggles have consistent height */
.carrot-setting-item .carrot-toggle,
.carrot-setting-item .carrot-label {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Reserve space for help text even when not present */
.carrot-setting-item {
    min-height: 90px;
}

.carrot-setting-item .carrot-help-text {
    min-height: 40px;
    display: flex;
    align-items: flex-start;
}

/* For items without help text, add spacing */
.carrot-setting-item:not(:has(.carrot-help-text)) {
    padding-bottom: 40px;
}

/* PROFESSIONAL TOGGLE SWITCHES */
.carrot-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 50%, transparent);
    border: 1px solid color-mix(in srgb, var(--SmartThemeBorderColor) 50%, transparent);
}

.carrot-toggle:hover {
    background: color-mix(in srgb, var(--active) 5%, transparent);
    border-color: color-mix(in srgb, var(--active) 30%, transparent);
}

.carrot-toggle input[type="checkbox"] {
    display: none;
}

.carrot-toggle-slider {
    width: 48px;
    height: 24px;
    background: var(--SmartThemeBorderColor);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px color-mix(in srgb, black 20%, transparent);
}

.carrot-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px color-mix(in srgb, black 25%, transparent);
}

.carrot-toggle input:checked + .carrot-toggle-slider {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    box-shadow: 0 0 12px color-mix(in srgb, var(--active) 30%, transparent);
}

.carrot-toggle input:checked + .carrot-toggle-slider::after {
    transform: translateX(24px);
    box-shadow: 0 2px 8px color-mix(in srgb, black 30%, transparent);
}

.carrot-toggle-label {
    font-weight: 500;
    color: var(--SmartThemeBodyColor);
    flex: 1;
}

/* FORM ELEMENTS */
.carrot-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.carrot-label-text {
    font-weight: 500;
    color: var(--SmartThemeBodyColor);
    font-size: 0.95em;
}

.carrot-label-hint {
    font-size: 0.8em;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 65%, transparent);
    line-height: 1.4;
}

.carrot-select, .carrot-input {
    padding: 12px 16px;
    border: 2px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    background: var(--SmartThemeBlurTintColor);
    color: #e0e0e0;
    font-family: var(--mainFontFamily);
    font-size: var(--mainFontSize);
    transition: all 0.3s ease;
}

.carrot-select:focus, .carrot-input:focus {
    outline: none;
    border-color: #ff7e5f;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--active) 20%, transparent);
}

.carrot-select:hover, .carrot-input:hover {
    border-color: color-mix(in srgb, var(--active) 60%, var(--SmartThemeBorderColor));
}

/* Slider styling */
/* Slider container styling */
.carrot-slider-container {
    background: rgba(255, 126, 95, 0.08);
    border: 1px solid rgba(255, 126, 95, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.carrot-slider-container:hover {
    background: rgba(255, 126, 95, 0.12);
    border-color: rgba(255, 126, 95, 0.3);
    box-shadow: 0 2px 8px rgba(255, 126, 95, 0.15);
}

.carrot-slider-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-weight: 600;
}

.carrot-slider-icon {
    font-size: 18px;
}

.carrot-slider-title {
    font-size: 14px;
    color: var(--SmartThemeEmText);
}

.carrot-slider-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 10px;
    line-height: 1.3;
}

.carrot-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid var(--SmartThemeBorderColor);
    outline: none;
    transition: all 0.3s ease;
}

.carrot-slider:hover {
    border-color: color-mix(in srgb, var(--active) 60%, var(--SmartThemeBorderColor));
}

.carrot-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff7e5f;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.carrot-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(255, 126, 95, 0.6);
}

.carrot-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff7e5f;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.carrot-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(255, 126, 95, 0.6);
}

/* LOREBOOK MANAGEMENT */
.carrot-search-container {
    margin-bottom: 20px;
}

.carrot-search-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--SmartThemeBorderColor);
    border-radius: 10px;
    background: var(--SmartThemeBlurTintColor);
    color: #e0e0e0;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.carrot-search-input:focus {
    border-color: #ff7e5f;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--active) 15%, transparent);
}

.carrot-lorebook-container {
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 10px;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.carrot-lorebook-list {
    padding: 0;
}

.carrot-lorebook-item {
    border-bottom: 1px solid color-mix(in srgb, var(--active) 10%, var(--SmartThemeBorderColor));
    padding: 16px;
    transition: all 0.2s ease;
    color: #e0e0e0;
}

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

.carrot-lorebook-item:hover {
    background: color-mix(in srgb, var(--active) 8%, transparent);
    transform: translateX(4px);
}

.carrot-lorebook-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrot-lorebook-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.carrot-status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--SmartThemeBorderColor);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px color-mix(in srgb, black 15%, transparent);
}

.carrot-status-indicator.active {
    background: var(--active);
    border-color: color-mix(in srgb, var(--active) 60%, white);
    box-shadow: 0 0 8px color-mix(in srgb, var(--active) 40%, transparent);
}

.carrot-lorebook-name {
    font-weight: 500;
    color: #e0e0e0;
}

.carrot-lorebook-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.carrot-repo-btn {
    padding: 8px 12px;
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 6px;
    background: var(--SmartThemeBlurTintColor);
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 36px;
    text-align: center;
}

.carrot-repo-btn:hover {
    border-color: #ff7e5f;
    background: color-mix(in srgb, var(--active) 10%, transparent);
    transform: translateY(-1px);
}

.carrot-repo-btn.active {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    border-color: #ff7e5f;
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 30%, transparent);
}

.carrot-lorebook-status {
    font-size: 0.8em;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 65%, transparent);
    font-style: italic;
}

/* PROFESSIONAL BUTTONS */
.carrot-action-bar {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 20px;
}

.carrot-primary-btn, .carrot-secondary-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    font-family: var(--mainFontFamily);
}

.carrot-primary-btn {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 126, 95, 0.4);
}

.carrot-primary-btn:hover {
    background: linear-gradient(135deg, #ff9a70 0%, #ffc56b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 126, 95, 0.6);
}

.carrot-primary-btn:disabled {
    background: var(--SmartThemeBorderColor);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.carrot-secondary-btn {
    background: var(--SmartThemeBlurTintColor);
    color: #e0e0e0;
    border: 2px solid var(--SmartThemeBorderColor);
}

.carrot-secondary-btn:hover {
    background: color-mix(in srgb, var(--active) 10%, transparent);
    border-color: #ff7e5f;
    transform: translateY(-1px);
}

/* LOADING & EMPTY STATES */
.carrot-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    gap: 16px;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 60%, transparent);
}

.carrot-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ff7e5f;
    border-right: 3px solid #feb47b;
    border-radius: 50%;
    animation: carrot-spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(255, 126, 95, 0.3);
    margin: 0 auto;
}

@keyframes carrot-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.carrot-empty-state {
    padding: 48px;
    text-align: center;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 60%, transparent);
    font-style: italic;
}

/* USAGE GUIDE */
.carrot-usage-guide {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 3%, transparent) 0%, 
        color-mix(in srgb, var(--active) 1%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--active) 15%, transparent);
    border-left: 4px solid var(--active);
    border-radius: 10px;
    padding: 24px;
    margin-top: 24px;
}

.carrot-usage-guide h4, .carrot-usage-guide h5 {
    color: #e0e0e0;
    margin-top: 0;
}

.carrot-usage-guide h4 {
    color: #ff7e5f;
    font-size: 1.1em;
}

.carrot-usage-guide ol {
    margin: 16px 0;
    padding-left: 24px;
}

.carrot-usage-guide li {
    margin: 12px 0;
    color: #e0e0e0;
    line-height: 1.5;
}

.carrot-usage-guide code {
    background: color-mix(in srgb, var(--active) 10%, var(--SmartThemeBlurTintColor));
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    color: #ff7e5f;
    border: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
}

/* RESPONSIVE DESIGN */
/* Scope box-sizing to CarrotKernel elements only to avoid affecting global ST UI */
#carrot-popup-container *,
.carrot-modal *,
.carrot-popup *,
.carrot-repo-browser *,
.bunnymo-character-card * {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .carrot-action-bar {
        flex-direction: column;
    }
    
    .carrot-lorebook-main {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .carrot-lorebook-actions {
        justify-content: space-between;
    }
    
    .carrot-card-header, .carrot-card-body {
        padding: 16px 20px;
    }
    
    .carrot-status-panels {
        gap: 12px;
    }
    
    .carrot-status-panel {
        padding: 16px 12px;
        min-height: 100px;
    }
    
    .carrot-status-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1em;
    }
    
    .carrot-status-title {
        font-size: 0.85em;
    }
    
    .carrot-status-value {
        font-size: 0.8em;
    }
    
    .carrot-status-detail {
        font-size: 0.7em;
    }
}

/* SMOOTH SCROLLBARS */
.carrot-lorebook-container::-webkit-scrollbar {
    width: 8px;
}

.carrot-lorebook-container::-webkit-scrollbar-track {
    background: var(--SmartThemeBlurTintColor);
}

.carrot-lorebook-container::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--active) 40%, transparent);
    border-radius: 4px;
}

.carrot-lorebook-container::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--active) 60%, transparent);
}

/* INTERACTIVE STATUS PANELS */
.carrot-clickable {
    cursor: pointer;
    position: relative;
    touch-action: manipulation; /* Enable touch events on mobile */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); /* Visual feedback on tap */
}

.carrot-clickable .carrot-click-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 80%, white) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7em;
    opacity: 0;
    transition: all 0.3s ease;
    animation: carrot-click-pulse 2s ease-in-out infinite;
}

.carrot-clickable:hover .carrot-click-hint {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes carrot-click-pulse {
    0%, 100% { 
        transform: scale(0.9);
        opacity: 0.6;
    }
    50% { 
        transform: scale(1);
        opacity: 0.8;
    }
}

/* HOVER TOOLTIPS */
.carrot-hoverable {
    position: relative;
}

.carrot-hover-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--SmartThemeBlurTintColor);
    border: 2px solid var(--active);
    border-radius: 12px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 8px 24px color-mix(in srgb, black 25%, transparent);
    /* Optimized backdrop filter for performance */
    backdrop-filter: blur(4px);
    contain: layout style paint;
    max-width: 400px;
}

.carrot-hoverable:hover .carrot-hover-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.carrot-tooltip-header {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.carrot-tooltip-content {
    padding: 16px;
    color: #e0e0e0;
    font-size: 0.85em;
    line-height: 1.5;
}

.carrot-tooltip-content ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.carrot-tooltip-content li {
    margin: 4px 0;
}

.carrot-tooltip-example {
    background: color-mix(in srgb, var(--active) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
    border-radius: 6px;
    padding: 10px;
    margin-top: 12px;
}

.carrot-tooltip-example code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8em;
    word-break: break-all;
    line-height: 1.4;
}

/* SMART HELP SECTION */
.carrot-help-section {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 3%, transparent) 0%, 
        color-mix(in srgb, var(--active) 1%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--active) 15%, transparent);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.carrot-help-header {
    text-align: center;
    margin-bottom: 24px;
}

.carrot-help-header h4 {
    color: #ff7e5f;
    font-size: 1.2em;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.carrot-help-subtitle {
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 75%, transparent);
    font-size: 0.9em;
    margin: 0;
    font-style: italic;
}

.carrot-help-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.carrot-help-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
    border-radius: 10px;
    padding: 16px;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.carrot-help-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9em;
    flex-shrink: 0;
}

.carrot-help-text {
    color: #e0e0e0;
    font-size: 0.9em;
    line-height: 1.4;
}

.carrot-help-arrow {
    color: #ff7e5f;
    font-size: 1.2em;
    font-weight: 600;
}

@media (max-width: 768px) {
    .carrot-help-flow {
        flex-direction: column;
    }
    
    .carrot-help-arrow {
        transform: rotate(90deg);
    }
}

.carrot-tutorial-header {
    text-align: center;
    margin-bottom: 24px;
}

.carrot-tutorial-header h4 {
    color: #ff7e5f;
    font-size: 1.3em;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.carrot-tutorial-subtitle {
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 75%, transparent);
    font-size: 0.9em;
    margin: 0;
    font-style: italic;
}

.carrot-tutorial-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .carrot-tutorial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .carrot-tutorial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.carrot-tutorial-card {
    background: var(--SmartThemeBlurTintColor);
    border: 2px solid color-mix(in srgb, var(--active) 20%, transparent);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: 140px;
}

.carrot-tutorial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        color-mix(in srgb, var(--active) 15%, transparent) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
    z-index: 1;
}

.carrot-tutorial-card:hover {
    border-color: #ff7e5f;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--active) 20%, transparent);
}

.carrot-tutorial-card:hover::before {
    left: 100%;
}

.carrot-tutorial-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 15%, transparent) 0%, 
        color-mix(in srgb, var(--active) 8%, transparent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7e5f;
    font-size: 1.3em;
    margin: 0 auto 16px auto;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.carrot-tutorial-card:hover .carrot-tutorial-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 25%, transparent);
}

.carrot-tutorial-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2em;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    align-self: flex-start;
}

.carrot-tutorial-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    width: 100%;
}

.carrot-tutorial-content strong {
    color: var(--SmartThemeBodyColor);
    font-size: 1.1em;
    font-weight: 600;
    display: block;
    line-height: 1.3;
}

.carrot-tutorial-content span {
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 0.9em;
    line-height: 1.5;
    display: block;
}

.carrot-tutorial-arrow {
    color: #ff7e5f;
    font-size: 1.4em;
    font-weight: 600;
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 2;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.carrot-tutorial-card:hover .carrot-tutorial-arrow {
    transform: translateX(4px);
    opacity: 1;
}

.carrot-tutorial-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* FORMAT EXAMPLE */
.carrot-format-example {
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
    border-radius: 10px;
    overflow: hidden;
}

.carrot-format-header {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 8%, transparent) 0%, 
        color-mix(in srgb, var(--active) 4%, transparent) 100%);
    padding: 12px 16px;
    color: #ff7e5f;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.carrot-format-code {
    padding: 16px;
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 50%, black);
    border-top: 1px solid color-mix(in srgb, var(--active) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--active) 10%, transparent);
}

.carrot-format-code code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8em;
    color: #ff7e5f;
    word-break: break-all;
    line-height: 1.5;
}

.carrot-format-note {
    padding: 12px 16px;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 75%, transparent);
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

.carrot-format-note i {
    color: #f59e0b;
}

/* POPUP OVERLAY SYSTEM */
.carrot-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, black 60%, transparent);
    /* Optimized backdrop filter for performance */
    backdrop-filter: blur(2px);
    contain: layout style paint;
    z-index: 999997;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    touch-action: manipulation; /* Enable touch events on mobile */
}

.carrot-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.carrot-popup-container {
    background: var(--SmartThemeBlurTintColor);
    border: 2px solid var(--active);
    border-radius: 16px;
    max-width: min(95vw, 1400px);
    width: min(95vw, 1400px);
    max-height: min(90vh, 900px);
    height: min(90vh, 900px);
    overflow-y: auto;
    box-shadow: 0 12px 32px color-mix(in srgb, black 40%, transparent);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: pan-y; /* Allow vertical scrolling on mobile */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Popup content wrapper styles */
.carrot-popup-content {
    background: var(--SmartThemeBlurTintColor);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.carrot-popup-header {
    background: linear-gradient(135deg, var(--active) 0%, rgba(var(--active-rgb), 0.85) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrot-popup-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.carrot-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.carrot-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.carrot-popup-body {
    padding: 20px;
    color: #e0e0e0;
    line-height: 1.6;
    flex: 1;
    overflow-y: auto;
}

.carrot-popup-overlay.active .carrot-popup-container {
    transform: scale(1);
}


.carrot-tutorial-popup-header {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 14px 14px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrot-tutorial-popup-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.carrot-tutorial-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.carrot-tutorial-close:hover {
    background: color-mix(in srgb, white 20%, transparent);
}

.carrot-tutorial-popup-content {
    padding: 20px;
    color: #e0e0e0;
    line-height: 1.6;
}

.carrot-tutorial-popup-nav {
    background: color-mix(in srgb, var(--active) 5%, transparent);
    padding: 16px 20px;
    border-top: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 14px 14px;
}

.carrot-tutorial-prev, .carrot-tutorial-next {
    background: var(--SmartThemeBlurTintColor);
    border: 2px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    padding: 8px 16px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.carrot-tutorial-next {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 85%, white) 100%);
    border-color: #ff7e5f;
    color: white;
}

.carrot-tutorial-prev:hover, .carrot-tutorial-next:hover {
    transform: translateY(-1px);
}

.carrot-tutorial-progress {
    color: #ff7e5f;
    font-weight: 500;
    font-size: 0.9em;
}

/* SMOOTH TUTORIAL POSITIONING */
.carrot-tutorial-target {
    scroll-margin-top: 120px; /* Account for ST header and padding */
    scroll-margin-bottom: 120px;
}

/* GOLDEN TUTORIAL HIGHLIGHTING */
.carrot-tutorial-highlight {
    position: relative !important;
    z-index: 1000 !important;
    border: 3px solid #ff6b35 !important;
    border-radius: 8px !important;
    box-shadow: 
        0 0 20px rgba(255, 165, 0, 0.6),
        0 0 40px rgba(255, 140, 0, 0.4),
        inset 0 0 20px rgba(255, 215, 0, 0.1) !important;
    animation: carrot-golden-glow 2s ease-in-out infinite alternate !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.05) 0%, 
        rgba(255, 165, 0, 0.05) 100%) !important;
}

@keyframes carrot-golden-glow {
    0% { 
        box-shadow: 
            0 0 20px rgba(255, 165, 0, 0.6),
            0 0 40px rgba(255, 140, 0, 0.4),
            inset 0 0 20px rgba(255, 215, 0, 0.1);
        border-color: #ff6b35;
    }
    100% { 
        box-shadow: 
            0 0 30px rgba(255, 165, 0, 0.8),
            0 0 60px rgba(255, 140, 0, 0.6),
            inset 0 0 30px rgba(255, 215, 0, 0.15);
        border-color: #ff8c00;
    }
}

/* MINIMAL TUTORIAL OVERLAY - ONLY FOR POPUP POSITIONING */
.carrot-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Never block interactions */
}

.carrot-tutorial-overlay.active {
    opacity: 1;
    /* Keep pointer-events none so overlay doesn't block scrolling */
    pointer-events: none;
}

/* Only the popup itself should capture events */
.carrot-tutorial-popup {
    pointer-events: auto;
}

/* TUTORIAL POPUP - ENHANCED VIEWPORT SAFEGUARDS */
.carrot-tutorial-popup {
    position: fixed !important;
    background: var(--SmartThemeBlurTintColor);
    border: 2px solid var(--active);
    border-radius: 16px;
    width: min(420px, 90vw, calc(100vw - 40px));
    max-width: min(500px, 85vw, calc(100vw - 20px));
    max-height: min(600px, 80vh, calc(100vh - 40px));
    min-width: min(280px, calc(100vw - 40px));
    min-height: min(200px, calc(100vh - 80px));
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box !important;
    word-wrap: break-word;
    hyphens: auto;
    box-shadow: 
        0 20px 40px color-mix(in srgb, black 40%, transparent),
        0 8px 16px color-mix(in srgb, black 20%, transparent);
    z-index: 999999;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    contain: layout size style;
}

/* Responsive sizing for small screens */
@media (max-width: 768px) {
    .carrot-tutorial-popup {
        width: min(95vw, 95%);
        max-width: min(95vw, 95%);
        min-width: min(280px, 85vw);
        max-height: min(80vh, 85%);
        border-radius: 12px;
        margin: 2.5vw;
    }

    .carrot-popup-container {
        width: 95vw !important;
        max-width: 95vw !important;
        height: 90vh !important;
        max-height: 90vh !important;
        border-radius: 12px;
    }

    .carrot-popup-body {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .carrot-tutorial-popup {
        width: min(98vw, 98%);
        max-width: min(98vw, 98%);
        min-width: min(260px, 95vw);
        max-height: min(85vh, 90%);
        border-radius: 8px;
        margin: 1vw;
    }

    .carrot-popup-container {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0;
        border: none;
    }

    .carrot-popup-body {
        padding: 12px;
    }

    .carrot-popup-header {
        padding: 12px 16px;
    }

    /* ===== TEMPLATE EDITOR - COMPLETE MOBILE REDESIGN ===== */

    /* Main container - full screen */
    .bmt-template-interface {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Header - MINIMAL */
    .bmt-modal-header-banner {
        padding: 4px 6px !important;
        flex-shrink: 0 !important;
        background: rgba(255,255,255,0.05) !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .bmt-modal-title {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 20px !important;
    }

    .bmt-modal-icon {
        font-size: 12px !important;
    }

    .bmt-modal-title h3 {
        font-size: 11px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-weight: 600 !important;
        line-height: 1 !important;
    }

    .bmt-modal-subtitle {
        display: none !important;
    }

    .bmt-tutorial-button-container {
        display: none !important;
    }

    .bmt-template-controls {
        display: flex !important;
        gap: 4px !important;
        width: 100% !important;
        align-items: center !important;
    }

    .bmt-template-selector-label {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        font-size: 10px !important;
        min-width: 0 !important;
    }

    .bmt-selector-label {
        font-size: 10px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .bmt-template-select {
        flex: 1 !important;
        font-size: 10px !important;
        padding: 2px 4px !important;
        height: 24px !important;
        min-width: 0 !important;
    }

    .bmt-toggle-btn {
        width: 28px !important;
        height: 24px !important;
        padding: 0 !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
    }

    /* Content area - scrollable */
    .bmt-editor-content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        min-height: 0 !important;
    }

    /* Panel headers - compact */
    .bmt-panel-header {
        padding: 4px 6px !important;
        background: rgba(255,255,255,0.05) !important;
        border-radius: 3px !important;
        margin-bottom: 4px !important;
    }

    .bmt-panel-title {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-bottom: 4px !important;
    }

    .bmt-panel-icon {
        font-size: 10px !important;
    }

    .bmt-panel-title h3 {
        font-size: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-weight: 600 !important;
        line-height: 1 !important;
    }

    /* Panel controls - vertical stack */
    .bmt-panel-controls {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .bmt-type-selector,
    .bmt-depth-selector,
    .bmt-scan-toggle {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        font-size: 10px !important;
    }

    .bmt-type-selector span,
    .bmt-depth-selector span {
        font-size: 10px !important;
        white-space: nowrap !important;
    }

    .bmt-template-type-select {
        flex: 1 !important;
        font-size: 10px !important;
        padding: 2px !important;
        height: 24px !important;
    }

    .bmt-depth-input {
        width: 45px !important;
        font-size: 10px !important;
        padding: 2px !important;
        height: 24px !important;
    }

    .bmt-depth-help {
        font-size: 8px !important;
        opacity: 0.7 !important;
    }

    /* Action buttons - 2 column grid */
    .bmt-panel-controls {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
        margin-top: 6px !important;
    }

    .bmt-type-selector,
    .bmt-depth-selector,
    .bmt-scan-toggle {
        grid-column: 1 / -1 !important;
    }

    .bmt-action-btn {
        font-size: 9px !important;
        padding: 4px 3px !important;
        height: 28px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    .bmt-action-btn i {
        font-size: 9px !important;
    }

    /* Template textarea */
    #prompt {
        width: 100% !important;
        min-height: 180px !important;
        max-height: 280px !important;
        font-size: 10px !important;
        padding: 6px !important;
        line-height: 1.3 !important;
        resize: vertical !important;
        box-sizing: border-box !important;
    }

    /* Metadata section - part of scrollable content */
    .bmt-template-metadata {
        padding: 6px !important;
        background: rgba(255,255,255,0.03) !important;
        border-radius: 4px !important;
        margin-top: 4px !important;
        flex-shrink: 0 !important;
    }

    .bmt-metadata-section {
        width: 100% !important;
    }

    .bmt-metadata-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .bmt-metadata-field {
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
    }

    .bmt-metadata-label {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        font-size: 10px !important;
    }

    .bmt-metadata-icon {
        font-size: 10px !important;
    }

    .bmt-metadata-title {
        font-size: 10px !important;
        font-weight: 600 !important;
    }

    .bmt-metadata-select {
        width: 100% !important;
        font-size: 10px !important;
        padding: 3px !important;
        height: 26px !important;
    }

    .bmt-toggle-container {
        display: flex !important;
        align-items: center !important;
        height: 26px !important;
    }

    .bmt-toggle-label {
        font-size: 10px !important;
    }

    .bmt-toggle-text {
        font-size: 10px !important;
    }

    /* Macro section */
    .bmt-macro-section {
        margin-top: 8px !important;
    }

    .bmt-collapsible-header {
        cursor: pointer !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .bmt-collapse-indicator {
        font-size: 12px !important;
        margin-left: auto !important;
    }

    .bmt-macro-definitions {
        padding: 6px !important;
    }

    /* Macro items */
    .macro_definition {
        margin-bottom: 8px !important;
        font-size: 11px !important;
    }

    /* Scope to CarrotKernel/BunnyMo elements only to avoid affecting ST UI */
    #bmt_template_prompt_interface .inline-drawer-header,
    #carrot_template_prompt_interface .inline-drawer-header,
    #carrot_settings .inline-drawer-header {
        padding: 6px !important;
        font-size: 11px !important;
    }

    .bmt-macro-icon {
        font-size: 12px !important;
    }

    #bmt_template_prompt_interface .macro_name,
    #carrot_template_prompt_interface .macro_name {
        font-size: 11px !important;
        padding: 4px !important;
    }

    #bmt_template_prompt_interface .menu_button,
    #carrot_template_prompt_interface .menu_button {
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        font-size: 11px !important;
    }

    /* Hide tooltip icons to save space */
    .bmt-tooltip {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Template Manager tablet responsive layout */
    .bmt-panel-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .bmt-action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.carrot-tutorial-overlay.active .carrot-tutorial-popup {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* POPUP POSITIONING ENHANCEMENTS */
.carrot-popup-right {
    animation: carrot-slide-in-right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrot-popup-left {
    animation: carrot-slide-in-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrot-popup-bottom {
    animation: carrot-slide-in-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrot-popup-top {
    animation: carrot-slide-in-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrot-popup-center {
    animation: carrot-fade-in-center 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes carrot-slide-in-right {
    0% { 
        transform: translateX(-20px) scale(0.95);
        opacity: 0;
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes carrot-slide-in-left {
    0% { 
        transform: translateX(20px) scale(0.95);
        opacity: 0;
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes carrot-slide-in-bottom {
    0% { 
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes carrot-slide-in-top {
    0% { 
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes carrot-fade-in-center {
    0% { 
        transform: scale(0.9);
        opacity: 0;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* POPUP ARROW STYLING */
.carrot-popup-arrow {
    filter: drop-shadow(0 2px 4px color-mix(in srgb, black 20%, transparent));
}

/* TUTORIAL MODE STYLING */
.carrot-tutorial-active {
    /* No scroll restrictions - user can scroll freely */
}

/* ACTIVE STATUS PANEL STYLING FOR LOADOUT MANAGER */
.carrot-status-panel.active {
    border-color: var(--active) !important;
    border-width: 2px !important;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--active) 25%, transparent) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 10%, var(--SmartThemeBlurTintColor)) 0%, 
        color-mix(in srgb, var(--active) 5%, var(--SmartThemeBlurTintColor)) 100%) !important;
}

.carrot-status-panel.active .carrot-status-icon {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 80%, white) 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 30%, transparent) !important;
}

.carrot-status-panel.active .carrot-status-title {
    color: var(--active) !important;
    font-weight: 700 !important;
}

.carrot-status-panel.active .carrot-status-indicator {
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 80%, white) 100%) !important;
    border-color: color-mix(in srgb, var(--active) 40%, white) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--active) 40%, transparent) !important;
    animation: carrot-status-pulse 2s ease-in-out infinite !important;
}

/* PROFILE TEMPLATE BUTTONS STYLING */
.carrot-template-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.carrot-template-btn {
    padding: 12px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    min-height: 50px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-align: center !important;
}

.carrot-template-btn i {
    font-size: 18px !important;
    margin-bottom: 4px !important;
}

.carrot-template-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--active) 25%, transparent) !important;
}

/* PERSONAL LOADOUTS SECTION STYLING */
.carrot-loadouts-section {
    margin-top: 8px;
}

.carrot-loadouts-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid color-mix(in srgb, var(--SmartThemeQuoteColor) 40%, transparent);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 50%, transparent);
}

.carrot-empty-loadouts {
    text-align: center;
    color: var(--SmartThemeQuoteColor);
    padding: 20px;
}

.carrot-empty-loadouts i {
    font-size: 32px;
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--active) 60%, var(--SmartThemeQuoteColor));
}

.carrot-empty-loadouts p {
    margin: 8px 0 4px 0;
    font-weight: 500;
}

.carrot-empty-loadouts small {
    opacity: 0.7;
}

.carrot-loadout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--SmartThemeQuoteColor) 20%, transparent);
    border-radius: 6px;
    margin-bottom: 8px;
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 80%, transparent);
    transition: all 0.2s ease;
}

.carrot-loadout-item:hover {
    border-color: #ff7e5f;
    background: color-mix(in srgb, var(--active) 10%, var(--SmartThemeBlurTintColor));
}

.carrot-loadout-info {
    flex: 1;
}

.carrot-loadout-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.carrot-loadout-desc {
    font-size: 12px;
    opacity: 0.7;
}

.carrot-loadout-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

/* CURRENT LOADOUT STATUS STYLING */
.carrot-current-loadout {
    margin-top: 8px;
}

.carrot-loadout-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid color-mix(in srgb, var(--active) 30%, transparent);
    border-radius: 10px;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 5%, var(--SmartThemeBlurTintColor)) 0%, 
        color-mix(in srgb, var(--active) 2%, var(--SmartThemeBlurTintColor)) 100%);
    transition: all 0.3s ease;
}

.carrot-loadout-status:hover {
    border-color: color-mix(in srgb, var(--active) 50%, transparent);
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 8%, var(--SmartThemeBlurTintColor)) 0%, 
        color-mix(in srgb, var(--active) 4%, var(--SmartThemeBlurTintColor)) 100%);
}

.carrot-status-text {
    flex: 1;
}

.carrot-current-loadout-name {
    font-weight: 700;
    font-size: 16px;
    color: #ff7e5f;
    margin-bottom: 4px;
}

.carrot-current-loadout-desc {
    font-size: 13px;
    opacity: 0.8;
}

.carrot-blink {
    /* Reduced blink frequency for performance */
    animation: carrot-loadout-blink 4s ease-in-out infinite;
    will-change: opacity;
}

@keyframes carrot-loadout-blink {
    0%, 60% { opacity: 1; }
    30% { opacity: 0.5; }
}

/* SPOTLIGHT REMOVED - USING GOLDEN ELEMENT HIGHLIGHTING ONLY */

/* =============================================================================
   CARROT TEMPLATE EDITOR - EXACT COPY OF BUNNYMO STYLING
   ============================================================================= */

/* Template Interface Base */
.bmt-template-interface {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.02), rgba(255, 140, 0, 0.01));
    border-radius: 8px;
    overflow: hidden;
}

/* Layout Utilities for CarrotKernel Template Editor */
.bmt-template-interface .flex-container {
    display: flex;
}

.bmt-template-interface .justifyspacebetween {
    justify-content: space-between;
}

.bmt-template-interface .alignitemscenter {
    align-items: center;
}

.bmt-template-interface .flex1 {
    flex: 1;
}

.bmt-template-interface .flex2 {
    flex: 2;
}

/* Editor Main Section */
.bmt-editor-main {
    margin-bottom: 15px;
    gap: 15px;
}

.bmt-template-panel,
.bmt-macro-panel {
    display: flex;
    flex-direction: column;
}

/* Editor Content Area */
.bmt-editor-content {
    gap: 15px;
}

/* Modal Header Banner */
.bmt-modal-header-banner {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.15), rgba(255, 140, 0, 0.1));
    border-bottom: 2px solid rgba(255, 165, 0, 0.2);
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    min-height: 60px;
}

/* Tutorial button container */
.bmt-tutorial-button-container {
    display: flex;
    align-items: center;
}

/* Tutorial button styling - match CarrotKernel theme */
.bmt-tutorial-btn {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 140, 0, 0.15));
    border: 1px solid rgba(255, 165, 0, 0.4);
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.bmt-tutorial-btn:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3), rgba(255, 140, 0, 0.25));
    border-color: rgba(255, 165, 0, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.3);
}

.bmt-tutorial-btn i {
    font-size: 1em;
}

.bmt-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.bmt-modal-icon {
    font-size: 1.5em;
    filter: drop-shadow(0 2px 4px rgba(255, 165, 0, 0.3));
}

.bmt-modal-title h3 {
    margin: 0;
    color: var(--SmartThemeEmptyColor);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bmt-modal-subtitle {
    color: var(--SmartThemeQuoteColor);
    font-size: 0.9em;
    opacity: 0.8;
}

/* Template Controls */
.bmt-template-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bmt-template-selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmt-selector-label {
    font-weight: 500;
    color: var(--SmartThemeEmptyColor);
}

.bmt-template-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--SmartThemeEmptyColor);
    min-width: 200px;
}

.bmt-template-select:focus {
    border-color: rgba(255, 165, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
}

/* Panel Headers */
.bmt-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: rgba(255, 165, 0, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.bmt-panel-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmt-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmt-panel-icon {
    font-size: 1.2em;
}

.bmt-panel-title h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--SmartThemeEmptyColor);
}

.bmt-help-icon {
    color: rgba(255, 165, 0, 0.7);
    margin-left: 5px;
    cursor: help;
}

/* Action Buttons */
.bmt-action-btn {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 140, 0, 0.15));
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--SmartThemeEmptyColor);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bmt-action-btn:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3), rgba(255, 140, 0, 0.25));
    border-color: rgba(255, 165, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.2);
}

.bmt-preview-btn {
    color: #4a9eff;
}

.bmt-restore-btn {
    color: #ff6b6b;
}

.bmt-add-btn {
    color: #51cf66;
}

.bmt-save-btn {
    color: #4c9eff;
}

.bmt-delete-btn {
    color: #ff4757;
}

/* Template Metadata Section */
.bmt-template-metadata {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 165, 0, 0.05);
    border: 1px solid rgba(255, 165, 0, 0.2);
    border-radius: 8px;
}

.bmt-metadata-section {
    width: 100%;
}

.bmt-metadata-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.bmt-metadata-field {
    flex: 1;
}

.bmt-metadata-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.bmt-metadata-icon {
    font-size: 1.1em;
}

.bmt-metadata-title {
    color: var(--SmartThemeEmptyColor);
}

.bmt-tooltip {
    color: rgba(255, 165, 0, 0.7);
    font-size: 0.9em;
    cursor: help;
}

.bmt-tooltip:hover {
    color: rgba(255, 165, 0, 1);
}

.bmt-metadata-select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(100, 100, 100, 0.5);
    border-radius: 6px;
    color: #e8e6e3;
    font-size: 14px;
}

.bmt-metadata-select:focus {
    border-color: rgba(255, 165, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
    outline: none;
}

.bmt-toggle-container {
    display: flex;
    align-items: center;
}

.bmt-primary-toggle {
    display: none;
}

.bmt-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.bmt-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.bmt-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bmt-primary-toggle:checked + .bmt-toggle-label .bmt-toggle-slider {
    background: rgba(255, 165, 0, 0.8);
}

.bmt-primary-toggle:checked + .bmt-toggle-label .bmt-toggle-slider::before {
    transform: translateX(20px);
}

.bmt-toggle-text {
    color: var(--SmartThemeEmptyColor);
    font-weight: 500;
}

/* Macro Configuration Section */
.bmt-macro-section {
    margin-top: 15px;
}

.bmt-macro-definitions {
    background: rgba(255, 165, 0, 0.03);
    border: 1px solid rgba(255, 165, 0, 0.1);
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
}

.bmt-macros-section {
    background: rgba(var(--SmartThemeBodyColor), 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(var(--SmartThemeBodyColor), 0.1);
}

.bmt-macros-section h4 {
    margin: 0 0 16px 0;
    color: #e8e6e3;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--mainFontFamily);
}

.bmt-macros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.bmt-macro-item {
    background: rgba(var(--SmartThemeBodyColor), 0.08);
    border: 1px solid rgba(var(--SmartThemeBodyColor), 0.15);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bmt-macro-item:hover {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
    transform: translateY(-1px);
}

.bmt-macro-name {
    font-family: var(--monoFontFamily, 'Courier New', monospace);
    font-size: 12px;
    font-weight: 600;
    color: #ff7e5f;
    margin-bottom: 4px;
}

.bmt-macro-desc {
    font-size: 11px;
    color: #e8e6e3;
    opacity: 0.8;
    line-height: 1.3;
}

/* Template textarea styling */
#prompt {
    width: 100%;
    min-height: 200px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    color: #e8e6e3;
    font-family: var(--monoFontFamily, 'Courier New', monospace);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

#prompt:focus {
    border-color: rgba(255, 165, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
    outline: none;
}

/* Type selector styling */
.bmt-type-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmt-template-type-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
}

/* Toggle button styling */
.bmt-toggle-btn {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 140, 0, 0.15));
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 6px;
    color: var(--SmartThemeEmptyColor);
}

/* =============================================================================
   BUNNYMO TEMPLATE EDITOR MACRO INTERFACE STYLING
   ============================================================================= */

/* BunnyMo Interface Card */
.bmt_interface_card {
    margin: 0 0.5em;
    padding: 0.5em;
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.05), rgba(255, 140, 0, 0.02));
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.bmt_interface_card:hover {
    border-color: rgba(255, 165, 0, 0.5);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Macro Documentation */
.bmt-macro-docs {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 165, 0, 0.05);
    border: 1px solid rgba(255, 165, 0, 0.15);
    border-radius: 6px;
}

.bmt-macro-doc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bmt-macro-icon {
    font-size: 1.1em;
}

.bmt-macro-doc-header strong {
    color: var(--SmartThemeEmptyColor);
    font-weight: 600;
}

.bmt-macro-docs p {
    margin: 8px 0;
    color: var(--SmartThemeQuoteColor);
    font-size: 0.9em;
    line-height: 1.4;
}

.bmt-macro-description {
    color: var(--SmartThemeQuoteColor);
    font-size: 0.9em;
    line-height: 1.4;
}

/* Template Interface Override for BunnyMo style */
#bmt_template_prompt_interface .inline-drawer-header {
    background: unset;
    border: unset;
    margin: unset;
    padding: unset;
}

#carrot_template_prompt_interface .inline-drawer-header {
    background: unset;
    border: unset;
    margin: unset;
    padding: unset;
}

/* Macro Definitions Area */
.bmt-macro-definitions {
    height: 100%;
    overflow-y: auto;
    padding: 5px;
}

.bmt-macro-definitions::-webkit-scrollbar {
    width: 8px;
}

.bmt-macro-definitions::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.bmt-macro-definitions::-webkit-scrollbar-thumb {
    background: rgba(255, 165, 0, 0.4);
    border-radius: 4px;
}

.bmt-macro-definitions::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 165, 0, 0.6);
}

/* Macro Configuration Form Styling */
.bmt-form-group {
    margin-bottom: 15px;
}

.bmt-label {
    display: block;
    margin-bottom: 6px;
    color: var(--SmartThemeEmptyColor);
    font-weight: 500;
}

.bmt-label span {
    display: block;
    font-size: 0.9em;
}

.bmt-help-text {
    font-size: 0.8em;
    color: var(--SmartThemeQuoteColor);
    font-style: italic;
    margin-top: 2px;
}

.bmt-select {
    width: 100%;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 4px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
}

.bmt-input {
    width: 100%;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 4px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
}

.bmt-textarea {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 4px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
    font-family: var(--monoFontFamily, 'Courier New', monospace);
    resize: vertical;
    min-height: 60px;
}

.bmt-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.bmt-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--SmartThemeEmptyColor);
    cursor: pointer;
}

.bmt-checkbox input[type="checkbox"] {
    margin: 0;
}

/* Template Editor Depth and Scan Controls */
.bmt-depth-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
    margin-right: 15px;
}

.bmt-depth-input {
    width: 60px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 4px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
}

.bmt-depth-help {
    font-size: 0.8em;
    color: var(--SmartThemeQuoteColor);
    font-style: italic;
}

.bmt-scan-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
    margin-right: 15px;
}

.bmt-scan-toggle input[type="checkbox"] {
    margin: 0;
}

/* Panel controls layout */
.bmt-panel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}


.bmt-type-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--SmartThemeEmptyColor);
    font-size: 0.9em;
    margin-right: 15px;
}

/* Better button spacing and sizing */
.bmt-action-btn {
    margin: 2px;
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Add breathing room to macro section */
.bmt-macro-section {
    margin-top: 20px;
}

/* Template editor popup scrolling */
.popup-content:has(#bmt_template_prompt_interface) {
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ensure template interface content scrolls properly */
#bmt_template_prompt_interface {
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Make template textarea much larger and more usable */
#bmt_template_prompt_interface textarea#prompt {
    min-height: 300px !important;
    height: 400px !important;
    max-height: 500px !important;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    padding: 15px;
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    background: var(--SmartThemeBlurTintColor);
    color: #e0e0e0;
}

.bmt-macro-definitions {
    padding: 15px;
    min-height: 200px;
}

/* MACRO CARD STYLING */
.bmt-macro-card {
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.bmt-macro-card:hover {
    border-color: var(--SmartThemeAccentColor);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--SmartThemeAccentColor) 20%, transparent);
}

.bmt-macro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 80%, var(--SmartThemeAccentColor) 5%);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bmt-macro-header:hover {
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 70%, var(--SmartThemeAccentColor) 10%);
}

.bmt-macro-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #e0e0e0;
}

.bmt-macro-icon {
    font-size: 1.1em;
}

.bmt-macro-status.enabled {
    color: #4CAF50;
}

.bmt-macro-status.disabled {
    color: #f44336;
}

.bmt-macro-controls {
    display: flex;
    gap: 8px;
}

.bmt-toggle-drawer,
.bmt-toggle-docs {
    background: transparent;
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.bmt-toggle-drawer:hover,
.bmt-toggle-docs:hover {
    background: var(--SmartThemeAccentColor);
    color: var(--SmartThemeEmColor);
    transform: translateY(-1px);
}

.bmt-toggle-drawer:active,
.bmt-toggle-docs:active {
    transform: translateY(0);
    pointer-events: none;
}

/* Prevent rapid clicking during animations */
.bmt-macro-card.animating .bmt-toggle-drawer,
.bmt-macro-card.animating .bmt-toggle-docs {
    pointer-events: none;
}

.bmt-macro-documentation {
    padding: 16px;
    border-top: 1px solid var(--SmartThemeBorderColor);
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 50%, transparent);
    font-size: 0.9em;
    line-height: 1.5;
}

.bmt-macro-drawer {
    border-top: 1px solid var(--SmartThemeBorderColor);
    background: var(--SmartThemeQuoteColor);
}

.bmt-configuration-tabs {
    display: flex;
    flex-direction: column;
}

.bmt-tab-headers {
    display: flex;
    border-bottom: 1px solid var(--SmartThemeBorderColor);
}

.bmt-tab-header {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #e0e0e0;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.bmt-tab-header:hover {
    background: color-mix(in srgb, var(--SmartThemeAccentColor) 10%, transparent);
}

.bmt-tab-header.active {
    color: var(--SmartThemeAccentColor);
    border-bottom-color: var(--SmartThemeAccentColor);
    background: color-mix(in srgb, var(--SmartThemeAccentColor) 5%, transparent);
}

.bmt-tab-content {
    position: relative;
}

.bmt-tab-panel {
    display: none;
    padding: 16px;
}

.bmt-tab-panel.active {
    display: block;
}

.bmt-form-group {
    margin-bottom: 16px;
}

.bmt-form-group:last-child {
    margin-bottom: 0;
}

.bmt-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #e0e0e0;
}

.bmt-select,
.bmt-input,
.bmt-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 4px;
    background: var(--SmartThemeBlurTintColor);
    color: #e0e0e0;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.bmt-select:focus,
.bmt-input:focus,
.bmt-textarea:focus {
    outline: none;
    border-color: var(--SmartThemeAccentColor);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--SmartThemeAccentColor) 20%, transparent);
}

.bmt-textarea {
    resize: vertical;
    min-height: 80px;
}

.bmt-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.bmt-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #e0e0e0;
}

.bmt-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* MACRO CATEGORY SECTIONS */
.bmt-macro-category-section {
    margin-bottom: 20px;
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    overflow: hidden;
    background: var(--SmartThemeBlurTintColor);
}

.bmt-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.bmt-category-header.expanded {
    background: color-mix(in srgb, var(--SmartThemeAccentColor) 10%, var(--SmartThemeBlurTintColor));
    border-bottom-color: var(--SmartThemeBorderColor);
}

.bmt-category-header.collapsed {
    background: color-mix(in srgb, var(--SmartThemeQuoteColor) 20%, var(--SmartThemeBlurTintColor));
}

.bmt-category-header:hover {
    background: color-mix(in srgb, var(--SmartThemeAccentColor) 15%, var(--SmartThemeBlurTintColor));
}

.bmt-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #e0e0e0;
}

.bmt-category-title h4 {
    margin: 0;
    font-size: 1.1em;
}

.bmt-category-icon {
    font-size: 1.2em;
}

.bmt-category-count {
    font-size: 0.85em;
    color: var(--SmartThemeQuoteColor);
    font-weight: 400;
}

.bmt-category-toggle {
    color: #e0e0e0;
    transition: transform 0.2s ease;
}

.bmt-category-header:hover .bmt-category-toggle {
    transform: scale(1.1);
}

.bmt-category-content {
    padding: 16px;
    background: color-mix(in srgb, var(--SmartThemeQuoteColor) 5%, transparent);
}

/* Priority styling for CarrotKernel macros */
.bmt-macro-category-section:first-child .bmt-category-header {
    background: color-mix(in srgb, #ff8c00 15%, var(--SmartThemeBlurTintColor));
    border-bottom-color: #ff8c00;
}

.bmt-macro-category-section:first-child .bmt-category-header:hover {
    background: color-mix(in srgb, #ff8c00 20%, var(--SmartThemeBlurTintColor));
}

/* ========================================= */
/* ENHANCED TUTORIAL VIEWPORT SAFEGUARDS    */
/* ========================================= */

/* Override responsive mobile styles with enhanced viewport constraints */
@media (max-width: 768px) {
    .carrot-tutorial-popup {
        width: min(95vw, calc(100vw - 16px)) !important;
        max-width: min(95vw, calc(100vw - 16px)) !important;
        min-width: min(280px, calc(100vw - 32px)) !important;
        max-height: min(85vh, calc(100vh - 32px)) !important;
        font-size: 0.95em !important;
        line-height: 1.4 !important;
        margin: 8px !important;
    }
    
    .carrot-tutorial-popup-content {
        padding: 16px !important;
    }
    
    .carrot-tutorial-popup-nav {
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    .carrot-tutorial-popup {
        width: min(98vw, calc(100vw - 8px)) !important;
        max-width: min(98vw, calc(100vw - 8px)) !important;
        min-width: min(260px, calc(100vw - 16px)) !important;
        max-height: min(90vh, calc(100vh - 16px)) !important;
        font-size: 0.9em !important;
        line-height: 1.3 !important;
        margin: 4px !important;
    }
    
    .carrot-tutorial-popup-header {
        padding: 12px 16px !important;
        font-size: 0.95em !important;
    }
    
    .carrot-tutorial-popup-content {
        padding: 12px !important;
    }
    
    .carrot-tutorial-popup-nav {
        padding: 10px 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .carrot-tutorial-prev, 
    .carrot-tutorial-next {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Emergency zoom level safeguards */
@media (max-resolution: 1.5dppx) and (min-resolution: 0.5dppx) {
    .carrot-tutorial-popup {
        width: min(350px, 95vw, calc(100vw - 20px)) !important;
        max-width: min(380px, 90vw, calc(100vw - 10px)) !important;
        max-height: min(400px, 85vh, calc(100vh - 20px)) !important;
        font-size: 0.85em !important;
        border-radius: 8px !important;
    }
}

/* Ultra-wide screen constraints */
@media (min-width: 1920px) {
    .carrot-tutorial-popup {
        max-width: 600px !important;
        max-height: 700px !important;
    }
}

/* Accessibility and print safeguards */
@media print {
    .carrot-tutorial-popup,
    .carrot-tutorial-overlay {
        display: none !important;
    }
}

/* Force viewport boundaries absolutely */
.carrot-tutorial-popup {
    /* Emergency constraint overrides */
    min-width: min(260px, calc(100vw - 20px)) !important;
    min-height: min(180px, calc(100vh - 40px)) !important;
    max-width: min(600px, calc(100vw - 10px)) !important;
    max-height: min(800px, calc(100vh - 10px)) !important;
}

.bmt-macro-category-section:first-child .bmt-category-title {
    color: #ff8c00;
}

/* PACK MANAGER STYLES */
.carrot-pack-container {
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--SmartThemeQuoteColor);
    border-radius: 8px;
    padding: 10px;
    background: var(--SmartThemeBlurTintColor);
}

.carrot-pack-item {
    background: var(--SmartThemeBodyColor);
    border: 1px solid var(--SmartThemeQuoteColor);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.carrot-pack-item:hover {
    border-color: var(--SmartThemeCheckboxBorderColor);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carrot-pack-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.carrot-pack-info h4 {
    margin: 0 0 4px 0;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 600;
}

.carrot-pack-theme {
    margin: 0;
    color: var(--SmartThemeQuoteColor);
    font-size: 12px;
    font-style: italic;
}

.carrot-pack-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.carrot-status-icon {
    font-size: 16px;
}

.carrot-status-text {
    font-size: 12px;
    color: var(--SmartThemeQuoteColor);
    font-weight: 500;
}

.carrot-pack-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.carrot-pack-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-pack-size {
    font-weight: 600;
}

.carrot-pack-file {
    font-family: monospace;
}

.carrot-pack-actions {
    flex-shrink: 0;
}

.carrot-pack-install-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
}

.carrot-pack-install-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.carrot-success-btn {
    background: var(--green) !important;
    color: white !important;
}

.carrot-warning-btn {
    background: var(--orange) !important;
    color: white !important;
}

.carrot-pack-container:empty::before {
    content: "No packs to display. Click 'Scan Available Packs' to get started.";
    display: block;
    text-align: center;
    color: var(--SmartThemeQuoteColor);
    font-style: italic;
    padding: 20px;
}

/* Pack manager status panel */
#carrot-pack-status {
    margin: 10px 0;
    padding: 10px;
    background: var(--SmartThemeBlurTintColor);
    border-left: 4px solid var(--orange);
    border-radius: 4px;
    font-size: 14px;
}

#carrot-pack-status p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===================================================================
   PACK MANAGER STATUS CARD AND INTERFACE STYLING
   ================================================================= */

/* Pack manager status card styling */
.carrot-status-packs .carrot-status-icon {
    color: var(--orange) !important;
}

.carrot-status-packs .carrot-pulse-dot {
    background-color: #ffa500;
}

/* CarrotKernel Repository Browser - Professional & Fun 🥕 */
/* Mobile-first: Full screen on mobile */
.carrot-popup-container.carrot-repo-browser-popup {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
}

#carrot-popup-container.carrot-repo-browser-popup {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
}

/* Desktop only: Large fixed sizes for wide screens */
@media (min-width: 769px) {
    .carrot-popup-container.carrot-repo-browser-popup {
        max-width: min(98vw, 1600px) !important;
        width: min(98vw, 1600px) !important;
        max-height: min(95vh, 1000px) !important;
        height: min(95vh, 1000px) !important;
        border-radius: 16px !important;
    }

    /* More aggressive overrides for repository browser on desktop */
    #carrot-popup-container.carrot-repo-browser-popup {
        max-width: 1600px !important;
        width: 1600px !important;
        max-height: 1000px !important;
        height: 1000px !important;
        min-width: 1400px !important;
        min-height: 800px !important;
        transform: none !important;
    }

    /* Fallback for any container with repo browser */
    .carrot-popup-overlay.active .carrot-popup-container.carrot-repo-browser-popup {
        transform: none !important;
        max-width: 1600px !important;
        width: 1600px !important;
        max-height: 1000px !important;
        height: 1000px !important;
    }

    /* NUCLEAR OPTION - Force repository browser to be large on desktop */
    div.carrot-popup-container.carrot-repo-browser-popup,
    #carrot-popup-container.carrot-repo-browser-popup,
    .carrot-popup-overlay .carrot-popup-container.carrot-repo-browser-popup,
    .carrot-popup-overlay.active .carrot-popup-container.carrot-repo-browser-popup {
        width: 1600px !important;
        height: 1000px !important;
        max-width: 1600px !important;
        max-height: 1000px !important;
        min-width: 1600px !important;
        min-height: 1000px !important;
        transform: none !important;
    }

    /* Even more nuclear - target any popup with repo browser content - DESKTOP ONLY */
    .carrot-popup-container:has(.carrot-repo-browser),
    .carrot-popup-container:has(.carrot-github-browser) {
        width: 1600px !important;
        height: 1000px !important;
        max-width: 1600px !important;
        max-height: 1000px !important;
    }
}

.carrot-repo-browser {
    max-width: 100%;
    width: 100%;
    color: #e0e0e0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 750px;
    background: linear-gradient(145deg, #2a1a2e, #3c2a4a);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 126, 95, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Repository Header Card */
.carrot-repo-header-card {
    background: linear-gradient(135deg, 
        rgba(255, 126, 95, 0.2) 0%, 
        rgba(255, 126, 95, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 126, 95, 0.3);
    flex-shrink: 0;
    padding: 20px 28px;
}

.carrot-repo-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 16px 28px;
}

.carrot-repo-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.carrot-repo-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--active) 30%, transparent));
    animation: carrot-gentle-bounce 3s ease-in-out infinite;
}

@keyframes carrot-gentle-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

.carrot-repo-title-text h2 {
    margin: 0;
    color: #e0e0e0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 1px 2px color-mix(in srgb, var(--SmartThemeShadowColor) 20%, transparent);
}

.carrot-repo-subtitle {
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 14px;
    font-style: italic;
    margin-top: 2px;
}

/* Repository Controls */
.carrot-repo-controls {
    display: flex;
    gap: 8px;
}

.carrot-icon-btn {
    background: color-mix(in srgb, var(--active) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--active) 20%, transparent);
    color: #e0e0e0;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrot-icon-btn:hover {
    background: color-mix(in srgb, var(--active) 15%, transparent);
    border-color: #ff7e5f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 15%, transparent);
}

/* Breadcrumb Navigation */
.carrot-repo-breadcrumb-container {
    padding: 12px 28px;
    background: rgba(255, 126, 95, 0.1);
    border-bottom: 1px solid rgba(255, 126, 95, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    flex-shrink: 0;
    font-size: 13px;
}

/* Main Content Layout - Better Space Usage */
.carrot-repo-main-content {
    display: flex;
    flex: 1;
    gap: 24px;
    padding: 24px 28px;
    min-height: 0;
    background: linear-gradient(145deg, #2a1a2e, #3c2a4a);
}

/* Browser Card - Takes up 60% of space */
.carrot-repo-browser-card {
    flex: 2;
    background: linear-gradient(145deg, #35234a, #4a3062);
    border: 1px solid rgba(255, 126, 95, 0.25);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Preview Card - Takes up 40% of space */
.carrot-repo-preview-card {
    flex: 1.5;
    background: linear-gradient(145deg, #35234a, #4a3062);
    border: 1px solid rgba(255, 126, 95, 0.25);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* File List - Efficient Space Usage */
.carrot-repo-file-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

/* Preview Content Area */
.carrot-repo-preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

/* Breadcrumb Buttons - Sleek Style */
.carrot-breadcrumb-btn {
    background: rgba(255, 126, 95, 0.1);
    border: 1px solid rgba(255, 126, 95, 0.2);
    color: #e0e0e0;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* File Items - Beautiful and Sleek */
.carrot-repo-file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 12px;
    background: rgba(60, 42, 74, 0.6);
    border: 1px solid transparent;
}

.carrot-repo-file-item:hover {
    background: color-mix(in srgb, var(--active) 8%, var(--SmartThemeEmColor));
    border-color: color-mix(in srgb, var(--active) 20%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 10%, transparent);
}

.carrot-repo-file-item.folder .carrot-file-icon {
    color: #ffd700;
    font-size: 22px;
}

.carrot-repo-file-item.file .carrot-file-icon {
    color: #e0e0e0;
    font-size: 22px;
}

.carrot-repo-file-item.json-file .carrot-file-icon {
    color: #68d391;
    font-size: 22px;
}

.carrot-repo-file-item.readme-file .carrot-file-icon {
    color: #63b3ed;
    font-size: 22px;
}

.carrot-file-icon {
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.carrot-file-info {
    flex: 1;
    min-width: 0;
}

.carrot-file-name {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 2px;
    word-break: break-word;
    font-size: 14px;
}

.carrot-file-details {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--SmartThemeQuoteColor);
    font-weight: 500;
}

.carrot-file-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carrot-repo-file-item:hover .carrot-file-actions {
    opacity: 1;
}

.carrot-file-actions .carrot-icon-btn {
    padding: 6px;
    min-width: 28px;
    min-height: 28px;
    font-size: 12px;
}

/* Update Detection and Highlighting */
.carrot-update-badge, .carrot-installed-badge, .carrot-folder-update-glow {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 12px;
    z-index: 10;
    pointer-events: none;
}

.carrot-update-badge {
    animation: carrot-update-pulse 2s ease-in-out infinite;
}

.carrot-folder-update-glow {
    animation: carrot-glow-pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--active));
}

@keyframes carrot-update-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes carrot-glow-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* File item states for updates */
.carrot-repo-file-item.has-updates {
    border-left: 4px solid var(--orange);
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--orange) 8%, var(--SmartThemeEmColor)),
        var(--SmartThemeEmColor));
}

.carrot-repo-file-item.has-updates:hover {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--orange) 15%, var(--SmartThemeEmColor)),
        color-mix(in srgb, var(--orange) 5%, var(--SmartThemeEmColor)));
    box-shadow: 0 4px 16px color-mix(in srgb, var(--orange) 20%, transparent);
}

.carrot-repo-file-item.is-installed {
    border-left: 4px solid var(--green);
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--green) 5%, var(--SmartThemeEmColor)),
        var(--SmartThemeEmColor));
}

.carrot-repo-file-item.folder-has-updates {
    border-left: 4px solid var(--active);
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 10%, var(--SmartThemeEmColor)),
        var(--SmartThemeEmColor));
    box-shadow: 0 0 12px color-mix(in srgb, var(--active) 15%, transparent);
    animation: carrot-folder-glow 4s ease-in-out infinite;
}

@keyframes carrot-folder-glow {
    0%, 100% { box-shadow: 0 0 12px color-mix(in srgb, var(--active) 15%, transparent); }
    50% { box-shadow: 0 0 20px color-mix(in srgb, var(--active) 25%, transparent); }
}

.carrot-repo-file-item.folder-has-updates .carrot-file-icon {
    color: #ff7e5f;
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--active) 40%, transparent));
}

/* Update button styling */
.carrot-file-actions .carrot-icon-btn.update-btn {
    background: color-mix(in srgb, var(--orange) 15%, transparent);
    border-color: #ffa500;
    color: #ffa500;
    animation: carrot-update-button-pulse 2s ease-in-out infinite;
}

@keyframes carrot-update-button-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Installation Dialog Styling */
.carrot-install-dialog {
    max-width: 500px;
    width: 100%;
    background: var(--SmartThemeBlurTintColor);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px color-mix(in srgb, var(--SmartThemeShadowColor) 30%, transparent);
}

.carrot-install-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--active) 8%, transparent) 0%, 
        color-mix(in srgb, var(--active) 3%, transparent) 100%);
    border-bottom: 1px solid color-mix(in srgb, var(--active) 10%, transparent);
    display: flex;
    align-items: center;
    gap: 16px;
}

.carrot-install-header.carrot-success {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--green) 8%, transparent) 0%, 
        color-mix(in srgb, var(--green) 3%, transparent) 100%);
    border-bottom-color: color-mix(in srgb, var(--green) 10%, transparent);
}

.carrot-install-header.carrot-error {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--red) 8%, transparent) 0%, 
        color-mix(in srgb, var(--red) 3%, transparent) 100%);
    border-bottom-color: color-mix(in srgb, var(--red) 10%, transparent);
}

.carrot-install-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--SmartThemeShadowColor) 30%, transparent));
}

.carrot-install-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #e0e0e0;
}

.carrot-install-subtitle {
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 14px;
    font-style: italic;
    margin-top: 2px;
}

.carrot-install-content {
    padding: 24px 28px;
}

.carrot-pack-info {
    text-align: center;
    margin-bottom: 20px;
}

.carrot-pack-name {
    font-size: 18px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.carrot-pack-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--SmartThemeQuoteColor);
    font-size: 14px;
}

.carrot-install-progress {
    margin-top: 20px;
}

.carrot-progress-bar {
    width: 100%;
    height: 6px;
    background: color-mix(in srgb, var(--SmartThemeBorderColor) 30%, transparent);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.carrot-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--active), color-mix(in srgb, var(--active) 80%, var(--green)));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.carrot-progress-text {
    text-align: center;
    font-size: 13px;
    color: var(--SmartThemeQuoteColor);
    font-weight: 500;
}

.carrot-install-actions {
    padding: 20px 28px;
    border-top: 1px solid color-mix(in srgb, var(--SmartThemeBorderColor) 50%, transparent);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.carrot-success-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
}

.carrot-success-stat {
    text-align: center;
}

.carrot-success-stat .carrot-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #68d391;
    line-height: 1;
}

.carrot-success-stat .carrot-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--SmartThemeQuoteColor);
    margin-top: 4px;
}

.carrot-error-details {
    padding: 16px;
    background: color-mix(in srgb, var(--red) 10%, transparent);
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--red) 20%, transparent);
    font-size: 13px;
    color: #e0e0e0;
    margin: 16px 0;
}

/* Empty folder and placeholder improvements */
.carrot-empty-folder {
    text-align: center;
    padding: 60px 20px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.carrot-placeholder-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #e0e0e0;
}

.carrot-placeholder-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Enhanced Preview Styling */
.carrot-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.carrot-entry-card {
    background: rgba(60, 42, 74, 0.6);
    border: 1px solid color-mix(in srgb, var(--active) 15%, var(--SmartThemeBorderColor));
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}

.carrot-entry-card:hover {
    border-color: #ff7e5f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--active) 10%, transparent);
}

.carrot-entry-key {
    font-weight: 600;
    color: #ff7e5f;
    margin-bottom: 6px;
    font-size: 13px;
}

.carrot-entry-preview {
    font-size: 12px;
    color: #d0d0d0;
    line-height: 1.4;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 10px;
    border-radius: 4px;
    border-left: 3px solid rgba(255, 126, 95, 0.4);
    animation: carrot-entry-fade-in 0.3s ease-out;
    transition: all 0.2s ease;
}

.carrot-entry-preview:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 126, 95, 0.6);
    transform: translateX(2px);
}

@keyframes carrot-entry-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carrot-entry-prob {
    font-size: 10px;
    color: #a8a8a8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carrot-empty-preview {
    text-align: center;
    padding: 40px 20px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.carrot-empty-preview h4 {
    margin: 0 0 8px 0;
    color: #e0e0e0;
    font-size: 16px;
}

.carrot-empty-preview p {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.4;
}

.carrot-debug-info {
    text-align: left;
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
}

.carrot-debug-info summary {
    cursor: pointer;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.carrot-debug-info pre {
    font-size: 11px;
    color: var(--SmartThemeQuoteColor);
    background: rgba(60, 42, 74, 0.6);
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0 0 0;
}

.carrot-breadcrumb-btn:hover:not(:disabled) {
    background: rgba(255, 126, 95, 0.2);
    border-color: rgba(255, 126, 95, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 126, 95, 0.2);
}

.carrot-breadcrumb-btn.active {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(255, 126, 95, 0.3);
}

.carrot-breadcrumb-separator {
    color: var(--SmartThemeQuoteColor);
    font-size: 12px;
    margin: 0 2px;
}

/* Browser content area */
.carrot-browser-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

.carrot-file-list {
    flex: 1;
    overflow-y: auto;
    border-right: 1px solid var(--SmartThemeBorderColor);
}

.carrot-file-preview {
    width: 350px;
    background: var(--SmartThemeBlurTintColor);
    overflow-y: auto;
    flex-shrink: 0;
}

/* File/folder items */
.carrot-file-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 12px;
    position: relative;
    background: transparent;
}

.carrot-file-item:hover {
    background: rgba(255, 126, 95, 0.15);
    border-bottom-color: rgba(255, 126, 95, 0.3);
    transform: translateX(4px);
    box-shadow: 4px 0 12px rgba(255, 126, 95, 0.2);
}

.carrot-file-item:hover .carrot-file-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.carrot-file-item.folder .carrot-file-icon {
    color: #ffd700;
}

.carrot-file-item.file .carrot-file-icon {
    color: #c4c4c4;
}

.carrot-file-item.file .carrot-file-icon i.fa-file-code {
    color: #68d391;
}

.carrot-file-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrot-file-info {
    flex: 1;
    min-width: 0;
}

.carrot-file-name {
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 2px;
    word-break: break-word;
}

.carrot-file-details {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-file-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.carrot-file-item:hover .carrot-file-actions {
    opacity: 1;
}

.carrot-icon-btn {
    background: none;
    border: none;
    color: var(--SmartThemeQuoteColor);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.carrot-icon-btn:hover {
    background: rgba(60, 42, 74, 0.6);
    color: #e0e0e0;
}

/* Empty states */
.carrot-empty-folder {
    text-align: center;
    padding: 60px 20px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-empty-folder i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.carrot-preview-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-preview-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* File preview content */
.carrot-file-preview-content {
    padding: 20px;
}

.carrot-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--SmartThemeBorderColor);
}

.carrot-preview-header h3 {
    margin: 0;
    font-size: 16px;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrot-preview-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.carrot-stat-item {
    text-align: center;
}

.carrot-stat-item .carrot-stat-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #ffa500;
    line-height: 1;
}

.carrot-stat-item .carrot-stat-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--SmartThemeQuoteColor);
    margin-top: 2px;
}

.carrot-preview-description h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #e0e0e0;
}

.carrot-entry-list {
    max-height: 300px;
    overflow-y: auto;
}

.carrot-entry-item {
    padding: 8px 12px;
    background: rgba(60, 42, 74, 0.6);
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--SmartThemeBorderColor);
}

.carrot-entry-item strong {
    display: block;
    font-size: 12px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.carrot-entry-content {
    font-size: 11px;
    color: var(--SmartThemeQuoteColor);
    line-height: 1.3;
}

.carrot-more-entries {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: var(--SmartThemeQuoteColor);
    font-style: italic;
}

/* Browser footer */
.carrot-browser-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--SmartThemeBorderColor);
    background: var(--SmartThemeBlurTintColor);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.carrot-browser-stats {
    font-size: 12px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-browser-actions {
    display: flex;
    gap: 10px;
}

/* Error states */
.carrot-error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-error-state i {
    font-size: 48px;
    color: var(--red);
    margin-bottom: 15px;
}

/* Responsive design for browser */
@media (max-width: 768px) {
    .carrot-github-browser {
        height: 500px;
    }

    .carrot-browser-content {
        flex-direction: column;
    }

    .carrot-file-preview {
        width: 100%;
        max-height: 250px;
        border-right: none;
        border-top: 1px solid var(--SmartThemeBorderColor);
    }

    .carrot-browser-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .carrot-browser-path {
        margin-left: 0;
    }

    /* Pack Manager mobile layout */
    .carrot-repo-browser-card {
        padding: 12px;
    }

    .carrot-pack-stats {
        flex-direction: column;
        gap: 10px;
    }

    /* Character Repo Manager mobile layout */
    .carrot-repo-browser {
        padding: 12px;
    }

    /* Loadout Manager mobile layout */
    .carrot-loadout-context-selector {
        flex-direction: column;
        gap: 8px;
    }

    .carrot-loadout-context-btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    /* Pack Manager extra-mobile layout */
    .carrot-github-browser {
        height: 100vh;
        max-height: 100vh;
    }

    /* Remove min-height that prevents scrolling */
    .carrot-repo-browser {
        min-height: 0;
        height: 100vh;
        border-radius: 0;
    }

    /* Compact header to save space */
    .carrot-repo-header-card {
        padding: 10px 12px;
    }

    .carrot-repo-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 12px 6px 12px;
    }

    .carrot-repo-title-section {
        gap: 8px;
    }

    .carrot-repo-icon {
        font-size: 20px;
    }

    .carrot-repo-title-text h2 {
        font-size: 16px;
        font-weight: 600;
    }

    .carrot-repo-subtitle {
        font-size: 11px;
    }

    .carrot-repo-controls {
        width: 100%;
        justify-content: flex-end;
        gap: 6px;
    }

    .carrot-icon-btn {
        min-width: 32px;
        min-height: 32px;
        padding: 6px;
        font-size: 12px;
    }

    /* Compact breadcrumbs */
    .carrot-repo-breadcrumb-container {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* CRITICAL: Stack cards vertically on mobile */
    .carrot-repo-main-content {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
        overflow-y: auto;
    }

    .carrot-repo-browser-card,
    .carrot-repo-preview-card {
        flex: none;
        width: 100%;
        min-height: 250px;
        max-height: none;
    }

    .carrot-repo-browser-card {
        padding: 8px;
        font-size: 13px;
    }

    .carrot-repo-file-item {
        padding: 8px 10px;
        font-size: 13px;
        gap: 8px;
    }

    .carrot-file-name {
        font-size: 13px;
    }

    .carrot-file-icon {
        font-size: 18px;
        width: 24px;
    }

    .carrot-pack-actions {
        flex-direction: column;
        gap: 6px;
    }

    .carrot-pack-actions button {
        width: 100%;
    }

    /* Character Repo mobile full screen */
    .carrot-repo-browser {
        height: 100vh;
        padding: 8px;
    }

    /* Loadout Manager mobile full screen */
    .carrot-loadout-manager {
        height: 100vh;
    }

    .carrot-loadout-settings {
        gap: 8px;
    }

    .carrot-loadout-setting-item {
        font-size: 13px;
    }
}

.carrot-pack-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carrot-pack-badge.updates {
    background: color-mix(in srgb, var(--orange) 15%, transparent);
    color: #ffa500;
    border: 1px solid var(--orange);
}

.carrot-pack-badge.current {
    background: color-mix(in srgb, var(--green) 15%, transparent);
    color: #68d391;
    border: 1px solid var(--green);
}

.carrot-pack-stats {
    display: flex;
    gap: 20px;
}

.carrot-stat {
    text-align: center;
}

.carrot-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #ffa500;
    line-height: 1;
}

.carrot-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--SmartThemeQuoteColor);
    margin-top: 2px;
}

.carrot-pack-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.carrot-pack-section {
    background: var(--SmartThemeBlurTintColor);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--SmartThemeBorderColor);
}

.carrot-pack-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.carrot-pack-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrot-pack-section-header i {
    color: #ffa500;
}

.carrot-pack-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carrot-pack-status.installed {
    background: color-mix(in srgb, var(--green) 15%, transparent);
    color: #68d391;
}

.carrot-pack-status.available {
    background: color-mix(in srgb, var(--orange) 15%, transparent);
    color: #ffa500;
}

.carrot-pack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(60, 42, 74, 0.6);
    border-radius: 10px;
    border: 1px solid var(--SmartThemeBorderColor);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.carrot-pack-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--SmartThemeShadowColor) 30%, transparent);
}

.carrot-pack-info {
    flex: 1;
}

.carrot-pack-name {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.carrot-pack-desc {
    font-size: 13px;
    color: var(--SmartThemeQuoteColor);
    margin-bottom: 8px;
    line-height: 1.4;
}

.carrot-pack-details {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-pack-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.carrot-pack-details span::before {
    content: "•";
    color: #ffa500;
}

.carrot-pack-actions {
    display: flex;
    gap: 10px;
}

.carrot-pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.carrot-pack-theme-item,
.carrot-pack-expansion-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
}

.carrot-pack-theme-item .carrot-pack-actions,
.carrot-pack-expansion-item .carrot-pack-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 10px;
}

.carrot-pack-main-item {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--orange) 5%, transparent),
        var(--SmartThemeEmColor));
    border-left: 4px solid var(--orange);
}

.carrot-pack-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--SmartThemeBorderColor);
}

.carrot-pack-footer .carrot-pack-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Loading state for pack manager */
.carrot-loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--SmartThemeQuoteColor);
}

.carrot-scan-progress {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.carrot-scan-progress div {
    padding: 8px 15px;
    background: var(--SmartThemeBlurTintColor);
    border-radius: 6px;
    border-left: 3px solid var(--orange);
}

/* Error panel styling */
.carrot-error-panel {
    text-align: center;
    padding: 30px 20px;
    background: color-mix(in srgb, var(--red) 10%, transparent);
    border-radius: 10px;
    border: 1px solid var(--red);
}

.carrot-error-panel i {
    font-size: 48px;
    color: var(--red);
    margin-bottom: 15px;
}

.carrot-error-panel h3 {
    color: var(--red);
    margin: 0 0 15px 0;
    font-size: 20px;
}

.carrot-error-panel p {
    color: #e0e0e0;
    margin: 0 0 15px 0;
}

.carrot-error-details {
    background: var(--SmartThemeBlurTintColor);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    color: var(--SmartThemeQuoteColor);
    margin: 15px 0;
    border: 1px solid var(--SmartThemeBorderColor);
}

.carrot-error-actions {
    margin-top: 20px;
}

/* Responsive design for pack manager */
@media (max-width: 768px) {
    .carrot-pack-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .carrot-pack-stats {
        align-self: stretch;
        justify-content: space-around;
    }
    
    .carrot-pack-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .carrot-pack-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .carrot-pack-actions button {
        flex: 1;
    }
    
    .carrot-pack-grid {
        grid-template-columns: 1fr;
    }
}

}

/* Repository Browser Status Card */
.carrot-repo-status-card {
    background: var(--SmartThemeQuoteColor);
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px auto;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.carrot-repo-status-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carrot-repo-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--SmartThemeEmColor);
    font-size: 14px;
    font-weight: 500;
}

.carrot-repo-status i {
    color: var(--SmartThemeEmColor);
    opacity: 0.8;
}

/* =============================================================================
   Theme Compatibility
   Uses SillyTavern's native theme variables which automatically adapt to
   light/dark themes. No media queries needed - ST handles theme switching
   by changing the variable values themselves.

   Special compatibility with popular themes:
   - MoonlitEchoes: Uses --customThemeColor when available
   - All themes: Relies on standard ST variables for maximum compatibility
   ============================================================================= */

/* MoonlitEchoes Theme Integration - Optional Enhancement
   If MoonlitEchoes is active, use its custom scroll colors for better integration */
:root:has([data-moonlit-theme]) {
    /* Use MoonlitEchoes custom scrollbar color if defined */
    --carrot-scroll-color: var(--customScrollbarColor, rgba(255, 255, 255, 0.3));
}

/* Fallback for non-MoonlitEchoes themes */
:root {
    --carrot-scroll-color: rgba(255, 255, 255, 0.3);
}

/* Apply custom scrollbar to CarrotKernel panels */
.carrot-settings-section::-webkit-scrollbar-thumb,
.carrot-status-section::-webkit-scrollbar-thumb,
.ck-panel::-webkit-scrollbar-thumb {
    background: var(--carrot-scroll-color);
}

/* ==========================================
   BABY BUNNY MODE TUTORIAL POPUP
   ========================================== */

.baby-bunny-popup-tutorial {
    background: var(--SmartThemeBlurTintColor);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.baby-bunny-header {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--active) 15%, var(--SmartThemeBlurTintColor)) 0%,
        var(--SmartThemeBlurTintColor) 100%);
    padding: 24px;
    border-bottom: 2px solid color-mix(in srgb, var(--active) 20%, transparent);
    position: relative;
}

.baby-bunny-header h3 {
    margin: 0 0 8px 0;
    color: var(--SmartThemeBodyColor);
    font-size: 1.5em;
    font-weight: 600;
}

.baby-bunny-subtitle {
    margin: 0;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 0.95em;
}

.baby-bunny-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--SmartThemeBodyColor);
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.baby-bunny-close:hover {
    background: color-mix(in srgb, var(--SmartThemeBodyColor) 10%, transparent);
    transform: rotate(90deg);
}

.baby-bunny-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.baby-bunny-section {
    margin-bottom: 24px;
    padding: 20px;
    background: color-mix(in srgb, var(--SmartThemeBlurTintColor) 50%, transparent);
    border: 1px solid color-mix(in srgb, var(--SmartThemeBorderColor) 50%, transparent);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.baby-bunny-section h4 {
    margin: 0 0 8px 0;
    color: var(--SmartThemeBodyColor);
    font-size: 1.1em;
    font-weight: 600;
}

.section-description {
    margin: 0 0 16px 0;
    color: color-mix(in srgb, var(--SmartThemeBodyColor) 70%, transparent);
    font-size: 0.9em;
}

.baby-bunny-input,
.baby-bunny-select {
    width: 100%;
    padding: 12px;
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    color: var(--SmartThemeBodyColor);
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.baby-bunny-input:focus,
.baby-bunny-select:focus {
    outline: none;
    border-color: var(--active);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--active) 20%, transparent);
}

.baby-bunny-input:disabled,
.baby-bunny-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.baby-bunny-tags-preview {
    background: var(--SmartThemeBlurTintColor);
    border: 1px solid var(--SmartThemeBorderColor);
    border-radius: 8px;
    padding: 16px;
    color: var(--SmartThemeBodyColor);
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

.baby-bunny-scope-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.baby-bunny-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--SmartThemeBlurTintColor);
    border: 2px solid color-mix(in srgb, var(--SmartThemeBorderColor) 50%, transparent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.baby-bunny-radio:hover {
    border-color: var(--active);
    background: color-mix(in srgb, var(--active) 5%, var(--SmartThemeBlurTintColor));
}

.baby-bunny-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--active);
}

.baby-bunny-radio span {
    color: var(--SmartThemeBodyColor);
    font-size: 0.95em;
}

.baby-bunny-create-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--active) 0%, color-mix(in srgb, var(--active) 80%, black) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.baby-bunny-create-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--active) 40%, transparent);
}

.baby-bunny-create-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tutorial-notice {
    margin-top: 16px;
    padding: 12px;
    background: color-mix(in srgb, #3b82f6 10%, transparent);
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    color: var(--SmartThemeBodyColor);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-notice i {
    color: #3b82f6;
    font-size: 1.2em;
}