/* webapp/css/themes/theme-green.css */

body.theme-green {
    --theme-bg-primary: #0f172a;
    --theme-bg-secondary: #1e293b;
    --theme-bg-content: #334155;
    --theme-text-primary: #e2e8f0;
    --theme-text-secondary: #94a3b8;
    --theme-text-placeholder: #8190A2;
    --theme-border-color: #475569;

    --theme-accent-primary: #10b981;
    --theme-accent-secondary: #34d399;
    --theme-accent-alt1: #38bdf8;
    --theme-accent-alt2: #fbbf24;
    --theme-button-text-on-accent: #ffffff;
    --theme-button-text-on-normal: var(--theme-text-primary);

    --theme-success-color: #22c55e;
    --theme-error-color: #ef4444;
    --theme-warning-color: #38bdf8;
    --theme-focus-ring-color: rgba(16, 185, 129, 0.5);

    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* SRS Bar Colors / Pill Colors - Green Theme */
    --theme-srs-bar-short: #fbbf24;
    --theme-srs-bar-medium: var(--theme-accent-secondary);
    --theme-srs-bar-long: var(--theme-accent-primary);
    --theme-srs-bar-learned: var(--theme-accent-alt1);
    --theme-srs-segment-inactive-bg: #475569;

    /* Grammar UI Colors */
    --theme-grammar-feedback-correct-bg: rgba(34, 197, 94, 0.1);
    --theme-grammar-feedback-correct-border: var(--theme-success-color);
    --theme-grammar-feedback-correct-text: var(--theme-success-color);
    --theme-grammar-feedback-incorrect-bg: rgba(239, 68, 68, 0.1);
    --theme-grammar-feedback-incorrect-border: var(--theme-error-color);
    --theme-grammar-feedback-incorrect-text: var(--theme-error-color);
    --theme-grammar-ai-explanation-bg: #334155;
    --theme-grammar-ai-explanation-border: #475569;
    --theme-grammar-ai-explanation-text: var(--theme-text-primary);
    --theme-grammar-chat-bg: #1e293b;
    --theme-grammar-chat-user-msg-bg: var(--theme-accent-primary);
    --theme-grammar-chat-user-msg-text: var(--theme-button-text-on-accent);
    --theme-grammar-chat-ai-msg-bg: #334155;
    --theme-grammar-chat-ai-msg-text: var(--theme-text-primary);
    --theme-gold: #ffeb3b;

    /* Золотая медалька для награды */
}

body.theme-green {
    background-color: var(--theme-bg-primary);
    color: var(--theme-text-primary);
}

body.theme-green #header-title-logo h1 { color: var(--theme-text-primary); }
body.theme-green #header-title-logo .header-logo-en-accent { color: var(--theme-accent-primary); }
body.theme-green #header-title-logo .app-logo-icon { fill: var(--theme-accent-primary); color: var(--theme-accent-primary); }


body.theme-green #bottom-nav {
    background-color: var(--theme-bg-secondary);
    border-top: 1px solid var(--theme-border-color);
}
body.theme-green .nav-item { color: var(--theme-text-secondary); }
body.theme-green .nav-item:hover { color: var(--theme-accent-primary); }
body.theme-green .nav-item.active { color: var(--theme-accent-primary); }

body.theme-green #floating-action-buttons #theme-toggle-button {
    background-color: var(--theme-accent-secondary);
    color: var(--theme-button-text-on-accent);
}
body.theme-green #floating-action-buttons #theme-toggle-button:hover,
body.theme-green #floating-action-buttons #theme-toggle-button:focus {
    background-color: color-mix(in srgb, var(--theme-accent-secondary) 85%, black);
    border-color: var(--theme-accent-primary);
}
body.theme-green #floating-action-buttons #floating-settings-button {
    background-color: var(--theme-bg-content);
    color: var(--theme-text-primary);
}
body.theme-green #floating-action-buttons #floating-settings-button:hover,
body.theme-green #floating-action-buttons #floating-settings-button:focus {
    background-color: color-mix(in srgb, var(--theme-bg-content) 85%, var(--theme-text-primary) 5%);
    border-color: var(--theme-accent-primary);
}


body.theme-green .content-section {
    background-color: var(--theme-bg-secondary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
body.theme-green .content-card-bg { background-color: var(--theme-bg-content); }

body.theme-green .input-field, body.theme-green select.input-field {
    background-color: var(--theme-bg-content);
    border: 1px solid var(--theme-border-color);
    color: var(--theme-text-primary);
}
body.theme-green .input-field::placeholder { color: var(--theme-text-placeholder); }
body.theme-green .input-field:focus, body.theme-green select.input-field:focus {
    border-color: var(--theme-accent-primary);
    box-shadow: 0 0 0 2px var(--theme-focus-ring-color);
}
body.theme-green .input-field[readonly] { background-color: var(--theme-bg-secondary); }
body.theme-green select.input-field { /* Стрелка для селекта */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23' + 'e2e8f0'.substring(1) + '%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
}
body.theme-green .clear-input-btn { color: var(--theme-text-secondary); }
body.theme-green .clear-input-btn:hover { color: var(--theme-accent-primary); }


body.theme-green .button:disabled, body.theme-green .button.disabled {
    background-color: var(--theme-bg-content);
    color: var(--theme-text-secondary);
    border: 1px solid var(--theme-border-color);
}
body.theme-green .button:focus, body.theme-green .button:focus-visible {
    box-shadow: 0 0 0 2px var(--theme-bg-primary), 0 0 0 4px var(--theme-focus-ring-color);
}

body.theme-green .button-primary {
    background-image: linear-gradient(to bottom, var(--theme-accent-primary) 0%, color-mix(in srgb, var(--theme-accent-primary) 80%, black) 100%);
    color: var(--theme-button-text-on-accent);
}
body.theme-green .button-primary:hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-accent-primary) 100%, white 10%) 0%, color-mix(in srgb, var(--theme-accent-primary) 85%, black) 100%);
}
body.theme-green .button-primary:active:not(:disabled):not(.disabled) {
    background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-accent-primary) 70%, black) 0%, color-mix(in srgb, var(--theme-accent-primary) 60%, black) 100%);
}

body.theme-green .button-secondary {
    background-color: var(--theme-bg-content);
    color: var(--theme-button-text-on-normal);
    border: 1px solid var(--theme-border-color);
}
body.theme-green .button-secondary:hover:not(:disabled):not(.disabled) {
    background-color: color-mix(in srgb, var(--theme-bg-content) 85%, var(--theme-text-primary) 5%);
    border-color: var(--theme-accent-primary);
}
body.theme-green .button-secondary:focus, body.theme-green .button-secondary:focus-visible {
    border-color: var(--theme-accent-primary);
    box-shadow: none;
}

body.theme-green .button-success {
    background-image: linear-gradient(to bottom, var(--theme-success-color) 0%, color-mix(in srgb, var(--theme-success-color) 80%, black) 100%);
    color: var(--theme-button-text-on-accent);
}
body.theme-green .button-success:hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-success-color) 100%, white 10%) 0%, color-mix(in srgb, var(--theme-success-color) 85%, black) 100%);
}
body.theme-green .button-danger {
    background-image: linear-gradient(to bottom, var(--theme-error-color) 0%, color-mix(in srgb, var(--theme-error-color) 80%, black) 100%);
    color: var(--theme-button-text-on-accent);
}
body.theme-green .button-danger:hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-error-color) 100%, white 10%) 0%, color-mix(in srgb, var(--theme-error-color) 85%, black) 100%);
}
body.theme-green .button-warning {
    background-image: linear-gradient(to bottom, var(--theme-warning-color) 0%, color-mix(in srgb, var(--theme-warning-color) 80%, black) 100%);
    color: var(--theme-button-text-on-accent);
}
body.theme-green .button-warning:hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-warning-color) 100%, white 10%) 0%, color-mix(in srgb, var(--theme-warning-color) 85%, black) 100%);
}
body.theme-green .button-accent-alt1 { background-image: linear-gradient(to bottom, var(--theme-accent-alt1) 0%, color-mix(in srgb, var(--theme-accent-alt1) 80%, black) 100%); color: var(--theme-button-text-on-accent); }
body.theme-green .button-accent-alt1:hover:not(:disabled):not(.disabled) { background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-accent-alt1) 100%, white 10%) 0%, color-mix(in srgb, var(--theme-accent-alt1) 85%, black) 100%); }
body.theme-green .button-accent-alt2 { background-image: linear-gradient(to bottom, var(--theme-accent-alt2) 0%, color-mix(in srgb, var(--theme-accent-alt2) 80%, black) 100%); color: var(--theme-button-text-on-accent); }
body.theme-green .button-accent-alt2:hover:not(:disabled):not(.disabled) { background-image: linear-gradient(to bottom, color-mix(in srgb, var(--theme-accent-alt2) 100%, white 10%) 0%, color-mix(in srgb, var(--theme-accent-alt2) 85%, black) 100%); }

body.theme-green .button-icon-study {
    background-color: var(--theme-accent-primary);
    color: var(--theme-button-text-on-accent);
}
body.theme-green .button-icon-study:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--theme-accent-primary) 85%, black);
}

body.theme-green .toggle-button {
    background-color: var(--theme-bg-content);
    border: 1px solid var(--theme-border-color);
}
body.theme-green .toggle-button-slider { background-color: var(--theme-text-secondary); }
body.theme-green .toggle-button.active { background-color: var(--theme-accent-primary); }
body.theme-green .toggle-button.active .toggle-button-slider { background-color: var(--theme-button-text-on-accent); }

/* Study Page specific theming */
body.theme-green .card-word-srs-info { color: var(--theme-text-secondary); }
/* Корректировка цвета текста для SRS плашек, где фон светлый */
body.theme-green .srs-status-pill-new,
body.theme-green .srs-status-pill-studying,
body.theme-green .srs-status-pill-confident,
body.theme-green .srs-status-pill-learned {
    color: var(--theme-bg-primary); /* Темный текст для читаемости */
}
body.theme-green .srs-progress-bar-container { background-color: var(--theme-bg-primary); }
body.theme-green .srs-progress-segment { background-color: var(--theme-srs-segment-inactive-bg); }
body.theme-green .srs-segment-short::before { background-color: var(--theme-srs-bar-short); }
body.theme-green .srs-segment-medium::before { background-color: var(--theme-srs-bar-medium); }
body.theme-green .srs-segment-long::before { background-color: var(--theme-srs-bar-long); }
body.theme-green .srs-segment-learned::before { background-color: var(--theme-srs-bar-learned); }
body.theme-green #mc-example-sentence-display, body.theme-green #input-example-sentence-display, body.theme-green #dictation-example-sentence-display { color: var(--theme-text-secondary); }
body.theme-green .study-example-action-button { color: var(--theme-text-secondary); }
body.theme-green .study-example-action-button:hover { color: var(--theme-accent-primary); }
body.theme-green .study-example-action-button.saved-state { color: var(--theme-success-color); }

body.theme-green .ai-explanation-display {
    background-color: color-mix(in srgb, var(--theme-bg-secondary) 95%, var(--theme-text-primary) 3%);
    border: 1px solid var(--theme-border-color);
}
body.theme-green .ai-main-word-transliteration { color: var(--theme-text-secondary); }
body.theme-green .ai-main-explanation { color: var(--theme-text-primary); }
body.theme-green .ai-main-explanation h3 { color: var(--theme-accent-primary); border-bottom: 1px solid var(--theme-border-color); }
body.theme-green .ai-main-explanation code { background-color: var(--theme-bg-primary); color: var(--theme-accent-secondary); }
body.theme-green .ai-examples-section h4 { color: var(--theme-text-secondary); border-bottom: 1px solid var(--theme-border-color); }
body.theme-green .ai-example-item { border-bottom: 1px dashed var(--theme-border-color); }
body.theme-green .ai-example-original { color: var(--theme-text-primary); }
body.theme-green .ai-example-transliteration { color: var(--theme-text-secondary); }
body.theme-green .ai-example-translation { color: var(--theme-text-secondary); }
body.theme-green .quick-add-example-btn { color: var(--theme-text-secondary); }
body.theme-green .quick-add-example-btn:hover:not(:disabled) { color: var(--theme-accent-primary); }
body.theme-green .quick-add-example-btn.saved { color: var(--theme-success-color); }

body.theme-green .feedback-correct { color: var(--theme-success-color); }
body.theme-green .feedback-incorrect { color: var(--theme-error-color); }
body.theme-green .feedback-highlight { color: var(--theme-warning-color); }
body.theme-green .input-field.border-correct { border-color: var(--theme-success-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-success-color) 30%, transparent); }
body.theme-green .input-field.border-incorrect { border-color: var(--theme-error-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-error-color) 30%, transparent); }
body.theme-green .mc-option-button { border: 1px solid var(--theme-border-color); background-color: var(--theme-bg-content); color: var(--theme-text-primary); }
body.theme-green .mc-option-button:hover:not(:disabled) { border-color: var(--theme-accent-primary); background-color: color-mix(in srgb, var(--theme-bg-content) 80%, var(--theme-accent-primary) 20%);}
body.theme-green .mc-option-button.selected { border-color: var(--theme-accent-primary); background-color: color-mix(in srgb, var(--theme-bg-content) 70%, var(--theme-accent-primary) 30%);}
body.theme-green .mc-option-button.correct { background-color: color-mix(in srgb, var(--theme-success-color) 25%, var(--theme-bg-content) 75%); border-color: var(--theme-success-color); color: var(--theme-success-color); }
body.theme-green .mc-option-button.incorrect { background-color: color-mix(in srgb, var(--theme-error-color) 20%, var(--theme-bg-content) 80%); border-color: var(--theme-error-color); color: var(--theme-error-color); }
body.theme-green #input-lives-container span, body.theme-green #dictation-lives-container span { color: var(--theme-error-color); }
body.theme-green #study-back-button { color: var(--theme-text-secondary); }
body.theme-green #study-back-button:hover, body.theme-green #study-back-button:focus { color: var(--theme-accent-primary); border-color: var(--theme-accent-primary); }
body.theme-green .button-study-next-active {
    border: 2px solid var(--theme-accent-primary);
    color: var(--theme-accent-primary);
    background-color: color-mix(in srgb, var(--theme-bg-content) 90%, var(--theme-accent-primary) 10%);
}
body.theme-green .button-study-next-active:hover:not(:disabled):not(.disabled) {
    background-color: color-mix(in srgb, var(--theme-bg-content) 80%, var(--theme-accent-primary) 20%);
}
body.theme-green .button-study-next-active:active:not(:disabled):not(.disabled) {
    background-color: color-mix(in srgb, var(--theme-bg-content) 70%, var(--theme-accent-primary) 30%);
}

/* Home Page theming */
body.theme-green .progress-svg-container {
    width: 150px;
    height: 150px;
    position: relative;
}
body.theme-green .progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
body.theme-green .progress-svg__background-circle {
    fill: none;
    stroke: var(--theme-bg-content);
    stroke-width: 10;
}
body.theme-green .progress-svg__bar-circle {
    fill: none;
    stroke: var(--theme-accent-primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.5s ease-out;
}
body.theme-green .progress-svg__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
    color: var(--theme-text-primary);
}
body.theme-green #home-words-learned-stats { color: var(--theme-text-secondary); }
body.theme-green #page-home .grid span { color: var(--theme-text-primary); }
body.theme-green #daily-reward-section { background-color: var(--theme-bg-content); border-color: var(--theme-accent-primary); }
body.theme-green #daily-reward-text { color: var(--theme-text-primary); }
body.theme-green #daily-reward-text strong { color: var(--theme-accent-primary); }
body.theme-green #daily-reward-text em { color: var(--theme-accent-secondary); }
body.theme-green #daily-reward-section h3 .material-symbols-rounded {
    color: var(--theme-gold);
}


/* Add Word Page theming */
body.theme-green #all-words-list-container .list-item-bg,
body.theme-green #course-words-list-container .list-item-bg { background-color: var(--theme-bg-content); }
body.theme-green #all-words-list-container .list-item-text-secondary,
body.theme-green #course-words-list-container .list-item-text-secondary { color: var(--theme-text-secondary); }
body.theme-green #all-words-list-container .list-item-accent,
body.theme-green #course-words-list-container .list-item-accent { color: var(--theme-accent-secondary); }
body.theme-green .visibility-toggle-button { color: var(--theme-text-secondary); }
body.theme-green .visibility-toggle-button:hover, body.theme-green .visibility-toggle-button:focus { color: var(--theme-accent-primary); border-color: var(--theme-accent-primary); }
body.theme-green .visibility-toggle-button.active .material-symbols-rounded { color: var(--theme-error-color); }
body.theme-green .example-indicator-icon { color: var(--theme-accent-primary); }
body.theme-green .needs-review-indicator { /* color handled by emoji or specific content now */ }
body.theme-green #words-list-controls-panel, body.theme-green #course-words-list-controls-panel { background-color: var(--theme-bg-content); border: 1px solid var(--theme-border-color); }
body.theme-green #words-list-controls-panel label:not(.sr-only), body.theme-green #course-words-list-controls-panel label:not(.sr-only) { color: var(--theme-text-secondary); }
body.theme-green .custom-checkbox { background-color: var(--theme-bg-primary); border: 1px solid var(--theme-border-color); }
body.theme-green .custom-checkbox:checked { background-color: var(--theme-accent-primary); border-color: var(--theme-accent-primary); }
body.theme-green .custom-checkbox:checked::after { color: var(--theme-button-text-on-accent); }
body.theme-green .custom-checkbox:focus { box-shadow: 0 0 0 2px var(--theme-focus-ring-color); }
body.theme-green #words-list-controls-panel label[for="filter-no-examples"],
body.theme-green #course-words-list-controls-panel label[for="course-words-filter-no-examples"] { color: var(--theme-text-primary); }

/* Stats Page theming */
body.theme-green .srs-bar-container { background-color: var(--theme-bg-content); }
body.theme-green .srs-bar-short-term  { background-color: var(--theme-srs-bar-short); }
body.theme-green .srs-bar-medium-term { background-color: var(--theme-srs-bar-medium); }
body.theme-green .srs-bar-long-term   { background-color: var(--theme-srs-bar-long); }
body.theme-green .srs-bar-learned     { background-color: var(--theme-srs-bar-learned); }
body.theme-green #stats-srs-distribution-list .srs-count { color: var(--theme-text-primary); }
body.theme-green #stats-srs-distribution-list .srs-level-description { color: var(--theme-text-secondary); }
body.theme-green .srs-level-group-title { color: var(--theme-accent-primary); border-bottom: 1px solid var(--theme-border-color); }

/* Chat theming */
body.theme-green .chat-messages-container { scrollbar-color: var(--theme-accent-primary) var(--theme-bg-primary); }
body.theme-green .chat-avatar { background-color: var(--theme-bg-content); color: var(--theme-text-secondary); }
body.theme-green .chat-message-user .chat-message-content { background-color: var(--theme-accent-primary); color: var(--theme-button-text-on-accent); }
body.theme-green .chat-message-gemini .chat-message-content { background-color: var(--theme-bg-content); color: var(--theme-text-primary); }

/* Courses Page theming */
body.theme-green .course-category-header { color: var(--theme-accent-primary); border-bottom: 1px solid var(--theme-border-color); }
body.theme-green .course-category-description { color: var(--theme-text-secondary); }
body.theme-green .course-card, body.theme-green .grammar-topic-card, body.theme-green .course-category-item, body.theme-green .grammar-exercise-type-card { background-color: var(--theme-bg-secondary); border: 1px solid var(--theme-border-color); }
body.theme-green .course-card:hover, body.theme-green .grammar-topic-card:hover, body.theme-green .course-category-item:hover, body.theme-green .grammar-exercise-type-card:hover { border-color: var(--theme-accent-primary); }
body.theme-green .course-card h3, body.theme-green .course-card h4,
body.theme-green .grammar-topic-card h3, body.theme-green .grammar-topic-card h4,
body.theme-green .course-category-item h3, body.theme-green .grammar-exercise-type-card h3 { color: var(--theme-accent-primary); }
body.theme-green .course-category-item p, body.theme-green .grammar-exercise-type-card p { color: var(--theme-text-secondary); }
body.theme-green .course-category-item .category-arrow, body.theme-green .grammar-exercise-type-card .category-arrow { color: var(--theme-text-secondary); }
body.theme-green .course-category-item:hover .category-arrow, body.theme-green .grammar-exercise-type-card:hover .category-arrow { color: var(--theme-accent-primary); }
body.theme-green .course-category-item-pinned { background-color: color-mix(in srgb, var(--theme-bg-secondary) 90%, var(--theme-accent-primary) 5%); border: 1px solid var(--theme-accent-secondary); }
body.theme-green .course-category-item-pinned:hover { border-color: var(--theme-accent-primary); }
body.theme-green #course-detail-view .content-section { background-color: var(--theme-bg-secondary); }
body.theme-green #course-detail-progress-bar { background-color: var(--theme-srs-bar-learned); }
body.theme-green #course-detail-lang-pair, body.theme-green #course-detail-total-words { color: var(--theme-text-primary); }

/* Tooltip */
body.theme-green .info-icon { color: var(--theme-text-secondary); }
body.theme-green .info-icon:hover, body.theme-green .info-icon:focus-visible { color: var(--theme-accent-primary); }
body.theme-green .info-icon:focus-visible { box-shadow: 0 0 0 2px var(--theme-focus-ring-color); }
body.theme-green .custom-tooltip { background-color: var(--theme-bg-content); color: var(--theme-text-primary); border: 1px solid var(--theme-border-color); }

/* Scroll to top button */
body.theme-green #scroll-to-top-words-button, body.theme-green #scroll-to-top-course-words-button { background-color: var(--theme-accent-primary); color: var(--theme-button-text-on-accent); }
body.theme-green #scroll-to-top-words-button:hover, body.theme-green #scroll-to-top-course-words-button:hover { background-color: color-mix(in srgb, var(--theme-accent-primary) 85%, black); }

/* Grammar */
body.theme-green .feedback-correct-grammar-bg { background-color: var(--theme-grammar-feedback-correct-bg); border: 1px solid var(--theme-grammar-feedback-correct-border); color: var(--theme-grammar-feedback-correct-text); }
body.theme-green .feedback-incorrect-grammar-bg { background-color: var(--theme-grammar-feedback-incorrect-bg); border: 1px solid var(--theme-grammar-feedback-incorrect-border); color: var(--theme-grammar-feedback-incorrect-text); }
body.theme-green #grammar-ai-explanation-container { border: 1px solid var(--theme-grammar-ai-explanation-border); background-color: var(--theme-grammar-ai-explanation-bg); color: var(--theme-grammar-ai-explanation-text); }
body.theme-green #grammar-ai-explanation-container strong { color: var(--theme-accent-primary); }
body.theme-green #grammar-ai-explanation-container em { color: var(--theme-accent-secondary); }
body.theme-green #grammar-chat-container { background-color: var(--theme-grammar-chat-bg); border: 1px solid var(--theme-border-color); }
body.theme-green #grammar-chat-messages .chat-message-user .chat-message-content { background-color: var(--theme-grammar-chat-user-msg-bg); color: var(--theme-grammar-chat-user-msg-text); }
body.theme-green #grammar-chat-messages .chat-message-gemini .chat-message-content { background-color: var(--theme-grammar-chat-ai-msg-bg); color: var(--theme-grammar-chat-ai-msg-text); }

/* Sentence Scramble for green theme */
body.theme-green #sentence-scramble-word-bank { background-color: var(--theme-bg-content); border: 1px solid var(--theme-border-color); }
body.theme-green .scramble-token { background-color: var(--theme-bg-secondary); border: 1px solid var(--theme-border-color); color: var(--theme-text-primary); }
body.theme-green .scramble-token:hover { border-color: var(--theme-accent-primary); background-color: color-mix(in srgb, var(--theme-bg-secondary) 80%, var(--theme-accent-primary) 20%); }
body.theme-green .scramble-token.used { background-color: var(--theme-bg-primary); border-color: color-mix(in srgb, var(--theme-border-color) 70%, transparent); }
body.theme-green .scramble-token.placeholder { background-color: color-mix(in srgb, var(--theme-bg-content) 50%, transparent); border-color: var(--theme-border-color); }
body.theme-green .scramble-answer-area { background-color: var(--theme-bg-primary); border: 2px dashed var(--theme-border-color); }
body.theme-green .scramble-answer-area.drag-over { border-color: var(--theme-accent-primary); background-color: color-mix(in srgb, var(--theme-bg-primary) 90%, var(--theme-accent-primary) 10%); }
body.theme-green .answer-token { background-color: var(--theme-accent-secondary); border: 1px solid var(--theme-accent-primary); color: var(--theme-button-text-on-accent); }
body.theme-green .answer-token:hover { background-color: color-mix(in srgb, var(--theme-accent-secondary) 80%, black); }

/* Debug UI Panel */
body.theme-green #debug-mode-indicator { background-color: var(--theme-accent-primary); color: var(--theme-button-text-on-accent); }
body.theme-green #debug-ui-panel { background-color: var(--theme-bg-secondary); border-top: 2px solid var(--theme-accent-primary); box-shadow: 0 -2px 10px rgba(0,0,0,0.3); }
body.theme-green #debug-ui-header { background-color: var(--theme-bg-content); border-bottom: 1px solid var(--theme-border-color); }
body.theme-green #debug-ui-controls input[type="text"] { background-color: var(--theme-bg-primary); border: 1px solid var(--theme-border-color); color: var(--theme-text-primary); }
body.theme-green #debug-ui-controls button { border: 1px solid var(--theme-border-color); color: var(--theme-text-secondary); }
body.theme-green #debug-ui-controls button:hover { background-color: var(--theme-bg-primary); color: var(--theme-accent-primary); }
body.theme-green .log-entry { border-bottom: 1px dashed var(--theme-border-color); }
body.theme-green .log-timestamp { color: var(--theme-text-secondary); }
body.theme-green .log-context { color: var(--theme-accent-primary); }
body.theme-green .log-message { color: var(--theme-text-primary); }
body.theme-green .log-data { background-color: var(--theme-bg-primary); border: 1px solid var(--theme-border-color); border-left: 3px solid var(--theme-accent-secondary); }
body.theme-green .log-data pre { color: var(--theme-text-primary); }

/* Стили скроллбара для зеленой темы */
body.theme-green ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body.theme-green ::-webkit-scrollbar-track {
    background: var(--theme-bg-secondary);
    border-radius: 4px;
}
body.theme-green ::-webkit-scrollbar-thumb {
    background: var(--theme-accent-primary);
    border-radius: 4px;
}
body.theme-green ::-webkit-scrollbar-thumb:hover {
    background: var(--theme-accent-primary);
    opacity: 0.8;
}
/* Firefox scrollbar */
body.theme-green {
    scrollbar-color: var(--theme-accent-primary) var(--theme-bg-secondary);
    scrollbar-width: thin;
}

body.theme-green .button {
    /* padding удалён, теперь размеры берутся из компонентов или utility-классов */
}