@font-face {
    font-family: 'OpenDyslexic';
    src: url('../fonts/OpenDyslexic-Regular.woff2') format('woff2'),
    url('../fonts/OpenDyslexic-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:host {
    all: initial;
    display: block;
}

:root {
    /* Theme Colors */
    --ads-primary: #4F46E5;
    --ads-primary-hover: #4338CA;
    --ads-primary-text: #ffffff;
    --ads-secondary: #F3F4F6;
    --ads-danger: #EF4444;
    --ads-danger-hover: #DC2626;
    --ads-panel-bg: #ffffff;
    --ads-panel-header-bg: #ffffff;
    --ads-panel-border: #E5E7EB;
    --ads-button-bg: #F9FAFB;
    --ads-button-hover: #F3F4F6;
    --ads-button-border: #E5E7EB;
    --ads-text-color: #111827;
    --ads-text-secondary: #6B7280;
    --ads-highlight-links-bg: #FEF08A;
    --ads-highlight-links-text: #1F2937;
    --ads-highlight-links-border: #EAB308;
    --ads-highlight-titles-border: #ffdf3e;

    /* Shadows (using rgba is standard and best practice here) */
    --ads-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ads-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ads-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ads-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Base & Utility Colors */
    --ads-white: #ffffff;
    --ads-black: #000000;
    --ads-slider-track-bg: #ddd;
    --ads-button-light-hover-bg: #e5e5e5;
    --ads-overlay-bg: #000000B3; /* 70% opacity black */
    --ads-modal-backdrop-bg: #00000080; /* 50% opacity black */

    /* New Transparent Theme Colors (8-digit hex) */
    --ads-primary-10-opacity: #4F46E51A; /* 10% opacity */
    --ads-primary-30-opacity: #4F46E54D; /* 30% opacity */
    --ads-danger-40-opacity: #EF444466; /* 40% opacity */
    --ads-danger-00-opacity: #EF444400; /* 0% opacity */
}

html {
    scrollbar-gutter: stable;
}

#adsymphony-accessibility-container {
    position: relative;
    z-index: 9999999;
}

/*--------------------------------------------------------------
# Button
--------------------------------------------------------------*/
.ads-accessibility-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px !important;
    height: 56px !important;
    padding: 0 !important;
    background: linear-gradient(135deg, var(--ads-primary) 0%, var(--ads-primary-hover) 100%);
    color: var(--ads-primary-text);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--ads-shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: inherit !important;
}

.ads-accessibility-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--ads-shadow-xl);
}

.ads-accessibility-button:active {
    transform: translateY(0);
}

.ads-accessibility-button svg {
    width: 28px !important;
    height: 28px !important;
    fill: var(--ads-primary-text);
}

/*--------------------------------------------------------------
# Accessibility Panel
--------------------------------------------------------------*/
.ads-accessibility-panel {
    position: fixed;
    top: 24px;
    bottom: 92px;
    right: 24px;
    width: 500px;
    background-color: var(--ads-panel-bg);
    border: 1px solid var(--ads-panel-border);
    border-radius: 16px;
    box-shadow: var(--ads-shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999999;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.ads-accessibility-panel.ads-is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ads-panel-header {
    display: flex;
    border-radius: 20px 20px 0 0;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ads-panel-border);
    background-color: var(--ads-panel-header-bg);
    flex-shrink: 0;
    background-clip: padding-box;
}

.ads-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ads-text-color);
    letter-spacing: -0.01em;
}

.ads-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    color: var(--ads-text-secondary);
    transition: all 0.2s ease;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ads-panel-close:hover {
    background-color: var(--ads-secondary);
    color: var(--ads-text-color);
}

.ads-panel-body {
    padding: 24px;
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ads-button-border) transparent;
}

.ads-panel-body::-webkit-scrollbar {
    width: 6px;
}

.ads-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.ads-panel-body::-webkit-scrollbar-thumb {
    background-color: var(--ads-button-border);
    border-radius: 3px;
}

.ads-panel-body h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ads-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ads-panel-group {
    border: 1px solid var(--ads-panel-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 100%;
    line-height: 1;
    letter-spacing: 0;
    background-color: var(--ads-panel-bg);
}

.ads-setting-group {
    margin-bottom: 24px;
}

.ads-rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ads-rate-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#ads-rate-slider {
    flex: 1;
    max-width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: var(--ads-slider-track-bg);
}

#ads-rate-reset {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 32px;
    min-width: 90px;
    width: auto;
}

.ads-rate-with-reset {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ads-rate-with-reset #ads-rate-slider {
    flex: 1;
    max-width: 100%;
}

.ads-rate-with-reset .ads-btn-group {
    display: flex;
    justify-content: flex-end;
}

.ads-rate-with-reset .ads-btn-group .ads-btn-small {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 32px;
    min-width: 90px;
    width: auto;
}

#ads-rate-slider:focus-visible::-webkit-slider-thumb {
    outline: 3px solid var(--ads-primary);
    outline-offset: 2px;
    border-radius: 50%;
}

#ads-rate-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ads-primary);
    cursor: pointer;
}

#ads-rate-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ads-primary);
    cursor: pointer;
    border: none;
}

.ads-reset-btn {
    padding: 4px 12px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid var(--ads-slider-track-bg);
    background: var(--ads-white);
    border-radius: 4px;
    cursor: pointer;
}

.ads-reset-btn:hover {
    background: var(--ads-button-light-hover-bg);
}

.ads-setting-group:last-child {
    margin-bottom: 0;
}

.ads-setting-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--ads-text-color);
}

.ads-btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.ads-btn-group button {
    background-color: var(--ads-button-bg);
    border: 1px solid var(--ads-button-border);
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--ads-text-color);
    white-space: normal;
    word-wrap: break-word;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}

.ads-btn-group button:hover {
    background-color: var(--ads-button-hover);
    border-color: var(--ads-primary);
    transform: translateY(-1px);
}

.ads-btn-group button:active {
    transform: translateY(0);
}

.ads-btn-group button.ads-active {
    background-color: var(--ads-primary);
    color: var(--ads-primary-text);
    border-color: var(--ads-primary);
    box-shadow: var(--ads-shadow-sm);
}

.ads-btn-group button.ads-active svg * {
    fill: var(--ads-primary-text) !important;
    stroke: var(--ads-primary-text) !important;
}

.ads-btn-group button.ads-btn-small {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 32px;
    min-width: 100px;
    width: auto;
    justify-self: start;
}

.default-btn {
    grid-column: 1 / -1;
}

.ads-panel-footer {
    padding: 16px 24px 0 24px;
    border-top: 1px solid var(--ads-panel-border);
    text-align: center;
    background-color: var(--ads-panel-bg);
    flex-shrink: 0;
    background-clip: padding-box;
    margin-top: auto;
}

.ads-reset-button {
    background-color: var(--ads-danger);
    color: var(--ads-primary-text);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s ease;
}

.ads-reset-button:hover {
    background-color: var(--ads-danger-hover);
    transform: translateY(-1px);
    box-shadow: var(--ads-shadow-md);
}

.ads-reset-button:active {
    transform: translateY(0);
}


/*--------------------------------------------------------------
# Utility Classes
--------------------------------------------------------------*/

/* Text Alignment */
body.ads-text-align-left *:not([id^='adsymphony-accessibility'] *) { text-align: left !important; }
body.ads-text-align-center *:not([id^='adsymphony-accessibility'] *) { text-align: center !important; }
body.ads-text-align-right *:not([id^='adsymphony-accessibility'] *) { text-align: right !important; }
body.ads-text-align-justify *:not([id^='adsymphony-accessibility'] *) { text-align: justify !important; }


/* Line Height */
body.ads-line-height-125 *:not([id^='adsymphony-accessibility'] *) { line-height: 1.25 !important; }
body.ads-line-height-150 *:not([id^='adsymphony-accessibility'] *) { line-height: 1.50 !important; }
body.ads-line-height-175 *:not([id^='adsymphony-accessibility'] *) { line-height: 1.75 !important; }
body.ads-line-height-20 *:not([id^='adsymphony-accessibility'] *) { line-height: 2 !important; }

/* Letter Spacing */
body.ads-letter-spacing-125px *:not([id^='adsymphony-accessibility'] *) { letter-spacing: 1.25px !important; }
body.ads-letter-spacing-15px *:not([id^='adsymphony-accessibility'] *) { letter-spacing: 1.5px !important; }
body.ads-letter-spacing-175px *:not([id^='adsymphony-accessibility'] *) { letter-spacing: 1.75px !important; }
body.ads-letter-spacing-2px *:not([id^='adsymphony-accessibility'] *) { letter-spacing: 2px !important; }

/* Font Family */
body.ads-font-family-dyslexic *:not([id^='adsymphony-accessibility'] *) { font-family: 'OpenDyslexic', sans-serif !important; }
body.ads-font-family-arial *:not([id^='adsymphony-accessibility'] *) { font-family: Arial, sans-serif !important; }

/* Saturation & Contrast */
html.ads-saturation-low { filter: saturate(50%) !important; }
html.ads-saturation-high { filter: saturate(200%) !important; }
html.ads-saturation-mono { filter: grayscale(100%) !important; }

html.ads-contrast-high { filter: contrast(175%) !important; }
html.ads-contrast-revert { filter: invert(100%) !important; }

/* Highlight Links */
body.ads-highlight-links a {
    background-color: var(--ads-highlight-links-bg) !important;
    color: var(--ads-highlight-links-text) !important;
    border: 2px solid var(--ads-highlight-links-border) !important;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Highlight Titles */
body.ads-highlight-titles h1,
body.ads-highlight-titles h2,
body.ads-highlight-titles h3,
body.ads-highlight-titles h4,
body.ads-highlight-titles h5,
body.ads-highlight-titles h6 {
    border: 3px solid var(--ads-highlight-titles-border) !important;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Hide Images */
body.ads-hide-images img,
body.ads-hide-images svg,
body.ads-hide-images [style*="background-image"] {
    visibility: hidden !important;
}

/* Reading Mask */
body.ads-reading-mask *:hover {
    background-color: var(--ads-primary-10-opacity) !important;
    outline: 2px solid var(--ads-primary) !important;
    outline-offset: 2px;
    border-radius: 4px;
}

body.ads-reading-mask #adsymphony-accessibility-container *:hover {
    background-color: transparent !important;
    outline: none !important;
}

/* Disable Animations */
body.ads-disable-animations *,
body.ads-disable-animations *:after,
body.ads-disable-animations *:before {
    transition: none !important;
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/*--------------------------------------------------------------
# Mouse Aids (Desktop Only)
--------------------------------------------------------------*/

@media (max-width: 1024px) {
    .ads-desktop-only {
        display: none !important;
    }
}

/* Big Cursor */
body.ads-big-cursor, body.ads-big-cursor * {
    cursor: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0,0,256,256'%20width='50px'%20height='50px'%3e%3cg%20transform=''%3e%3cg%20fill='none'%20fillRule='nonzero'%20stroke='none'%20strokeWidth='none'%20strokeLinecap='butt'%20strokeLinejoin='none'%20stroke-miterlimit='10'%20stroke-dasharray=''%20stroke-dashoffset='0'%20font-family='none'%20font-weight='none'%20font-size='none'%20text-anchor='none'%20style='mix-blend-mode:%20normal'%3e%3cpath%20transform='scale(5.12,5.12)'%20d='M29.69922,47c-0.12109,0%20-0.24219,-0.02344%20-0.35937,-0.06641c-0.25,-0.09766%20-0.44922,-0.28906%20-0.55859,-0.53516l-5.83594,-13.49219l-7.26172,6.82422c-0.28906,0.27344%20-0.71484,0.34375%20-1.08203,0.1875c-0.36328,-0.15625%20-0.60156,-0.51953%20-0.60156,-0.91797v-33c0,-0.39844%200.23438,-0.75781%200.60156,-0.91797c0.36328,-0.15625%200.78906,-0.08594%201.08203,0.1875l24,22.39844c0.28906,0.26953%200.39063,0.6875%200.26172,1.05859c-0.12891,0.375%20-0.46484,0.63672%20-0.85937,0.67188l-10.18359,0.875l6.10547,13.3125c0.10938,0.23828%200.12109,0.51563%200.02734,0.76563c-0.09375,0.25%20-0.27734,0.44922%20-0.51953,0.55859l-4.40234,2c-0.13281,0.05859%20-0.26953,0.08984%20-0.41406,0.08984z'%20id='strokeMainSVG'%20fill='%23000000'%20stroke='%23ffffff'%20strokeWidth='4'%20strokeLinejoin='round'%3e%3c/path%3e%3cg%20transform='scale(5.12,5.12)'%20fill='%23000000'%20stroke='none'%20strokeWidth='1'%20strokeLinejoin='miter'%3e%3cpath%20d='M29.69922,47c-0.12109,0%20-0.24219,-0.02344%20-0.35937,-0.06641c-0.25,-0.09766%20-0.44922,-0.28906%20-0.55859,-0.53516l-5.83594,-13.49219l-7.26172,6.82422c-0.28906,0.27344%20-0.71484,0.34375%20-1.08203,0.1875c-0.36328,-0.15625%20-0.60156,-0.51953%20-0.60156,-0.91797v-33c0,-0.39844%200.23438,-0.75781%200.60156,-0.91797c0.36328,-0.15625%200.78906,-0.08594%201.08203,0.1875l24,22.39844c0.28906,0.26953%200.39063,0.6875%200.26172,1.05859c-0.12891,0.375%20-0.46484,0.63672%20-0.85937,0.67188l-10.18359,0.875l6.10547,13.3125c0.10938,0.23828%200.12109,0.51563%200.02734,0.76563c-0.09375,0.25%20-0.27734,0.44922%20-0.51953,0.55859l-4.40234,2c-0.13281,0.05859%20-0.26953,0.08984%20-0.41406,0.08984z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"), auto !important;
}

/* Reading Guide */
#ads-reading-guide {
    position: fixed;
    display: none;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--ads-primary) 10%, var(--ads-primary) 90%, transparent);
    z-index: 100000;
    pointer-events: none;
    opacity: 0.8;
    box-shadow: 0 2px 8px var(--ads-primary-30-opacity);
}

/* Focus Mask */
#ads-focus-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    pointer-events: none;
    display: none;
}

.ads-mask-top, .ads-mask-bottom {
    position: absolute;
    width: 100%;
    background-color: var(--ads-overlay-bg);
    transition: all 0.1s ease;
}

.ads-mask-top {
    top: 0;
    left: 0;
}

.ads-mask-bottom {
    bottom: 0;
    left: 0;
}

/*--------------------------------------------------------------
# Screen Reader Styles
--------------------------------------------------------------*/

body.ads-speech-active p,
body.ads-speech-active h1,
body.ads-speech-active h2,
body.ads-speech-active h3,
body.ads-speech-active h4,
body.ads-speech-active h5,
body.ads-speech-active h6,
body.ads-speech-active a,
body.ads-speech-active li {
    cursor: pointer !important;
}

.ads-speech-highlight {
    background-color: var(--ads-highlight-links-bg) !important;
    color: var(--ads-highlight-links-text) !important;
    border-radius: 4px;
    padding: 2px 4px;
}

.ads-rate-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#ads-speech-rate-display {
    min-width: 48px;
    text-align: center;
    font-weight: 600;
    color: var(--ads-primary);
    font-size: 14px;
}

.ads-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ads-button-border);
    border-radius: 8px;
    background-color: var(--ads-button-bg);
    font-size: 14px;
    color: var(--ads-text-color);
    transition: all 0.2s ease;
}

.ads-select:hover {
    border-color: var(--ads-primary);
}

.ads-select:focus {
    outline: none;
    border-color: var(--ads-primary);
    box-shadow: 0 0 0 3px var(--ads-primary-10-opacity);
}

/*--------------------------------------------------------------
# Voice Info
--------------------------------------------------------------*/
.ads-voice-info {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: var(--ads-secondary);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ads-text-secondary);
}

.ads-voice-info--with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ads-voice-info--with-icon .ads-voice-info__icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.accessibility-footer {
    font-size: 12px;
    color: var(--ads-text-secondary);;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
}

.accessibility-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.accessibility-footer a:hover {
    color: var(--ads-black);
}

.ads-voice-info p {
    margin: 0 0 8px 0;
}

.ads-voice-info p:last-child {
    margin-bottom: 0;
}

.ads-voice-info ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.ads-voice-info li {
    margin-bottom: 4px;
}

.ads-voice-info a {
    color: var(--ads-primary);
    text-decoration: none;
    font-weight: 500;
}

.ads-voice-info a:hover {
    text-decoration: underline;
}

/*--------------------------------------------------------------
# Speech-to-Text
--------------------------------------------------------------*/

.ads-dictation-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.ads-dictation-mic {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    line-height: 1;
    opacity: 0.5;
    transition: all 0.2s ease;
    z-index: 10;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ads-dictation-mic:hover {
    opacity: 1;
    background-color: var(--ads-secondary);
}

.ads-dictation-mic.ads-is-listening {
    opacity: 1;
    color: var(--ads-danger);
    animation: ads-pulse 1.5s infinite;
}

@keyframes ads-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 var(--ads-danger-40-opacity);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 0 8px var(--ads-danger-00-opacity);
    }
}

/*--------------------------------------------------------------
# Google Translate
--------------------------------------------------------------*/

.goog-te-banner-frame {
    display: none !important;
}

#goog-gt-tt {
    display: none !important;
}

/*--------------------------------------------------------------
# External Link Alert
--------------------------------------------------------------*/

.ads-visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}

#ads-external-link-tooltip {
    position: absolute;
    background-color: var(--ads-text-color);
    color: var(--ads-primary-text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 10000000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    text-align: center;
    max-width: 280px;
    box-shadow: var(--ads-shadow-lg);
}

#ads-external-link-tooltip.ads-is-visible {
    opacity: 1;
    visibility: visible;
}

/*--------------------------------------------------------------
# Integrated Dictionary
--------------------------------------------------------------*/

.ads-dict-word {
    border-bottom: 2px dotted var(--ads-primary);
    cursor: help;
    position: relative;
    transition: all 0.2s ease;
}

.ads-dict-word:hover {
    background-color: var(--ads-primary-10-opacity);
    border-bottom-style: solid;
}

#ads-dictionary-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000001;
    display: none;
    background-color: var(--ads-modal-backdrop-bg);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#ads-dictionary-popup-wrapper.ads-is-visible {
    display: flex;
}

#ads-dictionary-popup {
    position: relative;
    background-color: var(--ads-panel-bg);
    color: var(--ads-text-color);
    border: 1px solid var(--ads-panel-border);
    border-radius: 16px;
    box-shadow: var(--ads-shadow-xl);
    padding: 32px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: ads-popup-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ads-popup-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#ads-dictionary-popup h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--ads-primary);
    letter-spacing: -0.02em;
}

#ads-dictionary-popup p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ads-text-color);
}

#ads-dictionary-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    line-height: 1;
    color: var(--ads-text-secondary);
    transition: all 0.2s ease;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ads-dictionary-popup-close:hover {
    background-color: var(--ads-secondary);
    color: var(--ads-text-color);
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/

@media (max-width: 768px) {
    .ads-accessibility-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border: 0;

        width: 100%;
        max-width: 100vw;
        height: auto;
        min-height: 100svh;

        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .ads-accessibility-button {
        right: 16px;
        bottom: 16px;
    }

    .ads-btn-group {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .ads-panel-header {
        padding: 16px 20px;
    }

    .ads-panel-body {
        padding: 20px;
        flex: 1;
        max-height: none;
        overflow-y: auto;
    }

    #ads-dictionary-popup {
        padding: 24px;
    }

    .ads-shortcut-text {
        display: none;
    }
}

/*--------------------------------------------------------------
# Dark Mode Support
--------------------------------------------------------------*/

@media (prefers-color-scheme: dark) {
    :root {
        --ads-primary: #4F46E5;
        --ads-primary-hover: #4338CA;
        --ads-panel-bg: #1f2937;
        --ads-panel-header-bg: #1f2937;
        --ads-text-color: #f9fafb;
        --ads-text-secondary: #9ca3af;
        --ads-secondary: #374151;
        --ads-panel-border: #374151;

        --ads-button-bg: #374151;
        --ads-button-hover: #4b5563;
        --ads-button-border: #4b5563;

        --ads-scrollbar-thumb-bg: #4b5563;

        --ads-highlight-links-bg: #4b5568;
        --ads-highlight-links-text: #f9fafb;
        --ads-highlight-links-border: #9ca3af;
        --ads-highlight-titles-border: #9ca3af;
    }

    .ads-btn-group button svg,
    .ads-reset-button svg,
    .ads-accessibility-button svg {
        fill: var(--ads-white) !important;
        stroke: var(--ads-white) !important;
        color: var(--ads-white) !important;
    }

    .ads-btn-group button.ads-active svg,
    .ads-btn-group button.ads-active svg * {
        fill: var(--ads-white) !important;
        stroke: var(--ads-white) !important;
    }

    .ads-panel-body::-webkit-scrollbar-thumb {
        background-color: var(--ads-scrollbar-thumb-bg);
    }

    .ads-voice-info {
        background-color: var(--ads-secondary);
    }

    .ads-voice-info a {
        color: var(--ads-white) !important;
        text-decoration: underline !important;
    }

    .ads-voice-info a:hover {
        color: var(--ads-button-light-hover-bg) !important;
        text-decoration: underline !important;
    }

    .ads-select {
        background-color: var(--ads-secondary);
    }

    #ads-dictionary-popup {
        background-color: var(--ads-panel-bg);
    }

    #ads-dictionary-popup-close {
        background: var(--ads-secondary);
    }

    #ads-dictionary-popup-close:hover {
        background-color: var(--ads-button-hover);
    }

    .accessibility-footer a:hover {
        color: var(--ads-white);
    }
}

/* Focus states for keyboard navigation */
.ads-accessibility-button:focus-visible,
.ads-panel-close:focus-visible,
.ads-btn-group button:focus-visible,
.ads-reset-button:focus-visible,
.ads-select:focus-visible {
    outline: 3px solid var(--ads-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ads-accessibility-button,
    .ads-accessibility-panel,
    .ads-btn-group button,
    .ads-reset-button {
        transition: none !important;
    }
}

.ads-btn-group button svg,
.ads-reset-button svg {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.ads-btn-group button.ads-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.ads-btn-group button.ads-loading::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    top: 50%;
    left: 50%;
    margin-left: -6px;
    margin-top: -6px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    animation: ads-spin 0.6s linear infinite;
}

@keyframes ads-spin {
    to {
        transform: rotate(360deg);
    }
}

/*--------------------------------------------------------------
# Tooltip Enhancements
--------------------------------------------------------------*/

#ads-external-link-tooltip::before {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--ads-text-color);
}

/*--------------------------------------------------------------
# Print Styles
--------------------------------------------------------------*/

@media print {
    #adsymphony-accessibility-container,
    .ads-accessibility-button,
    .ads-accessibility-panel {
        display: none !important;
    }
}

#ads-settings-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--ads-danger);
    color: var(--ads-primary-text);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid var(--ads-panel-bg);
    transition: transform 0.2s ease;
}

.ads-accessibility-button:hover #ads-settings-count-badge {
    transform: scale(1.1);
}

body.ads-desktop-scroll-locked {
    overflow: hidden;
}

body.ads-mobile-scroll-locked {
    position: fixed;
    overflow: hidden;
    width: 100%;
}
