* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--tg-theme-bg-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    color: var(--tg-theme-text-color, #000);
}

.container {
    width: 100%;
    max-width: 600px;
}

/* Игра: колонка на весь экран, таббар внизу */
.game-view-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    align-self: stretch;
    overflow: hidden;
    padding: 0;
}

.game-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}

.game-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-brand {
    font-size: 1.15em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.game-title {
    font-size: 0.95em;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.game-settings-gear {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.game-settings-gear:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.game-settings-gear:active {
    transform: scale(0.98);
}

[data-color-scheme="dark"] .game-header {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

[data-color-scheme="dark"] .game-settings-gear {
    color: #e6edf3;
    background: rgba(88, 166, 255, 0.2);
    border-color: rgba(88, 166, 255, 0.35);
}

[data-color-scheme="dark"] .game-settings-gear:hover {
    background: rgba(88, 166, 255, 0.3);
}

.game-scroll {
    flex: 1 1 0;
    overflow-y: auto;
    padding: 12px 14px max(16px, env(safe-area-inset-bottom, 0));
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Таббар: синяя тема, вкладки полностью влезают */
.game-tabbar {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top: 1px solid rgba(26, 115, 232, 0.25);
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 -2px 10px rgba(26, 115, 232, 0.15);
}

[data-color-scheme="dark"] .game-tabbar {
    background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
    border-top-color: rgba(88, 166, 255, 0.25);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.game-tab {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    font-size: clamp(0.85rem, 3.2vw, 1.05rem);
    font-weight: 600;
    color: #1565c0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-tab:hover {
    background: rgba(26, 115, 232, 0.15);
    color: #0d47a1;
}

.game-tab.active {
    color: #0d47a1;
    background: rgba(26, 115, 232, 0.2);
}

[data-color-scheme="dark"] .game-tab {
    color: #58a6ff;
}

[data-color-scheme="dark"] .game-tab:hover {
    background: rgba(88, 166, 255, 0.15);
    color: #79b8ff;
}

[data-color-scheme="dark"] .game-tab.active {
    color: #79b8ff;
    background: rgba(88, 166, 255, 0.2);
}

.game-card {
    background: var(--tg-theme-bg-color, white);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    text-align: center;
    color: var(--tg-theme-button-color, #667eea);
    margin-bottom: 12px;
    font-size: 1.25em;
    font-weight: 700;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--tg-theme-secondary-bg-color, #f0f2ff);
    border-radius: 12px;
}

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

.stat-label {
    display: block;
    font-size: 0.75em;
    color: var(--tg-theme-hint-color, #666);
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    font-size: 1.35em;
    font-weight: bold;
    color: var(--tg-theme-button-color, #667eea);
}

.game-area {
    margin-bottom: 0;
}

.question-container {
    text-align: center;
    margin-bottom: 14px;
    padding: 16px 20px;
    background: var(--tg-theme-button-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.question {
    font-size: 2em;
    color: var(--tg-theme-button-text-color, white);
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.answer-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#answer-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1.2em;
    border: 2px solid var(--tg-theme-button-color, #667eea);
    border-radius: 10px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    background: var(--tg-theme-bg-color, white);
    color: var(--tg-theme-text-color, #000);
}

#answer-input:focus {
    border-color: var(--tg-theme-button-color, #764ba2);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
}

#answer-input::placeholder {
    color: var(--tg-theme-hint-color, #bbb);
}

.submit-btn {
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    background: var(--tg-theme-button-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: var(--tg-theme-button-text-color, white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.feedback {
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    min-height: 28px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    animation: shake 0.5s;
}

.feedback.empty {
    background: transparent;
    color: transparent;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.control-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 1em;
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    color: var(--tg-theme-text-color, #333);
    border: 2px solid var(--tg-theme-hint-color, #ddd);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--tg-theme-secondary-bg-color, #e0e0e0);
    border-color: var(--tg-theme-button-color, #667eea);
    color: var(--tg-theme-button-color, #667eea);
    transform: translateY(-2px);
}

.finish-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
}

.finish-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    border: none;
    transform: translateY(-2px);
}

.share-btn {
    background: var(--tg-theme-button-color, #28a745);
    color: var(--tg-theme-button-text-color, white);
    border: none;
}

.share-btn:hover {
    filter: brightness(1.1);
    color: white;
    border: none;
}

.settings-panel {
    display: none;
    padding: 14px 16px;
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 12px;
    margin-top: 0;
    border: 1px solid var(--tg-theme-hint-color, #e8eaed);
}

.game-view-wrap.game-view-settings .game-area { display: none !important; }
.game-view-wrap.game-view-settings .settings-panel { display: block !important; animation: slideDown 0.25s ease-out; }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.settings-panel h3 {
    color: var(--tg-theme-button-color, #667eea);
    margin: 0;
    font-size: 1em;
    flex: 1;
}

.settings-close-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: #1565c0;
    background: rgba(26, 115, 232, 0.12);
    border: 1px solid rgba(26, 115, 232, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-close-btn:hover {
    background: rgba(26, 115, 232, 0.2);
}

.settings-panel h4 {
    color: var(--tg-theme-hint-color, #666);
    margin: 10px 0 6px 0;
    font-size: 0.9em;
}

.difficulty-options,
.operation-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.difficulty-options label,
.operation-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.9em;
    background: var(--tg-theme-bg-color, white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.difficulty-options label:hover,
.operation-options label:hover {
    background: var(--tg-theme-secondary-bg-color, #e8e8ff);
}

.difficulty-options input[type="radio"],
.operation-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--tg-theme-button-color, #667eea);
}

/* Модальное окно ввода кода */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--tg-theme-bg-color, white);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-title {
    margin: 0 0 8px 0;
    font-size: 1.25em;
    color: var(--tg-theme-text-color, #333);
}

.modal-desc {
    margin: 0 0 16px 0;
    font-size: 0.95em;
    color: var(--tg-theme-hint-color, #666);
}

.code-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.1em;
    border: 2px solid var(--tg-theme-hint-color, #ddd);
    border-radius: 10px;
    margin-bottom: 8px;
    outline: none;
    background: var(--tg-theme-bg-color, white);
    color: var(--tg-theme-text-color, #000);
}

.code-input:focus {
    border-color: var(--tg-theme-button-color, #667eea);
}

.code-error {
    margin: 0 0 12px 0;
    min-height: 1.4em;
    font-size: 0.9em;
    color: #dc3545;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .control-btn,
.modal-actions .submit-btn {
    flex: 1;
}

.modal-actions-col {
    flex-direction: column;
}

/* Секретное приложение: синяя тема (светло-синяя / сине-чёрная) */
:root {
    --stub-bg: #e8f4fd;
    --stub-card-bg: #fff;
    --stub-primary: #1a73e8;
    --stub-primary-light: #d2e3fc;
    --stub-primary-dark: #0d47a1;
    --stub-text: #1a1a2e;
    --stub-muted: #5f6368;
    --stub-tabbar-bg: #fff;
    --stub-tabbar-border: #c5d9f0;
    --stub-tab-inactive: #5f6368;
    --stub-input-bg: #fff;
    --stub-input-border: #c5d9f0;
}

[data-color-scheme="dark"] {
    --stub-bg: #0d1117;
    --stub-card-bg: #161b22;
    --stub-primary: #58a6ff;
    --stub-primary-light: #1f3a5f;
    --stub-primary-dark: #388bfd;
    --stub-text: #e6edf3;
    --stub-muted: #8b949e;
    --stub-tabbar-bg: #0d1117;
    --stub-tabbar-border: #21262d;
    --stub-tab-inactive: #8b949e;
    --stub-input-bg: #161b22;
    --stub-input-border: #30363d;
}

/* Секретное приложение */
.secret-stub {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(165deg, #e0f0ff 0%, #d4e8fc 40%, #e8f4fd 100%);
}

.secret-stub.active {
    display: flex;
}

[data-color-scheme="dark"] .secret-stub {
    background: linear-gradient(165deg, #0d1117 0%, #161b22 50%, #0d1117 100%);
}

#game-view.game-hidden {
    display: none;
}

.stub-scroll {
    flex: 1 1 0;
    overflow-y: auto;
    padding: 20px 18px 88px;
    -webkit-overflow-scrolling: touch;
}

.stub-panel {
    display: none;
}

.stub-panel.active {
    display: block;
}

.stub-panel-inner {
    padding: 0 0 16px;
}

.stub-help-placeholder {
    padding: 24px 0;
    text-align: center;
    color: var(--stub-muted);
}

.stub-help {
    padding: 28px 24px 36px;
    text-align: center;
    background: var(--stub-card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(26, 115, 232, 0.1), 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(26, 115, 232, 0.08);
}

[data-color-scheme="dark"] .stub-help {
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    border-color: rgba(88, 166, 255, 0.1);
}

.stub-help-title {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--stub-primary);
    margin: 0 0 12px;
}

.stub-help-desc {
    font-size: 0.95em;
    color: var(--stub-muted);
    margin: 0 0 24px;
    line-height: 1.5;
}

.stub-support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, var(--stub-primary) 0%, var(--stub-primary-dark) 100%);
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stub-support-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(26, 115, 232, 0.4);
}

.stub-support-link:active {
    transform: translateY(0);
}

.stub-tabbar {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top: 1px solid var(--stub-tabbar-border);
    background: var(--stub-tabbar-bg);
}

.stub-tab {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    font-size: clamp(0.8rem, 2.8vw, 1rem);
    font-weight: 600;
    color: var(--stub-tab-inactive);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stub-tab:hover {
    background: var(--stub-primary-light);
    color: var(--stub-primary);
}

.stub-tab.active {
    color: var(--stub-primary);
    background: var(--stub-primary-light);
}

.stub-card {
    padding: 28px 24px;
    border-radius: 24px;
    background: var(--stub-card-bg);
    box-shadow: 0 10px 40px rgba(26, 115, 232, 0.14), 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(26, 115, 232, 0.1);
}

[data-color-scheme="dark"] .stub-card {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(88, 166, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.12);
}

.stub-text {
    text-align: center;
    margin-bottom: 22px;
    font-size: 1.08em;
    color: var(--stub-muted);
    line-height: 1.45;
}

.stub-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: rgba(26, 115, 232, 0.06);
    border-radius: 16px;
    border: 1px solid rgba(26, 115, 232, 0.12);
}

[data-color-scheme="dark"] .stub-stats {
    background: rgba(88, 166, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.15);
}

.stub-stat {
    font-size: 1em;
    color: var(--stub-text);
}

.stub-watch-ad-btn {
    display: block;
    width: 100%;
    padding: 26px 28px;
    margin-bottom: 24px;
    font-size: 1.35em;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(145deg, var(--stub-primary) 0%, var(--stub-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 10px 32px rgba(26, 115, 232, 0.35), 0 4px 12px rgba(0,0,0,0.08);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    animation: stub-cta-pulse 2.5s ease-in-out infinite;
}

@keyframes stub-cta-pulse {
    0%, 100% { box-shadow: 0 10px 32px rgba(26, 115, 232, 0.35), 0 4px 12px rgba(0,0,0,0.08); }
    50% { box-shadow: 0 12px 40px rgba(26, 115, 232, 0.45), 0 6px 16px rgba(0,0,0,0.1); }
}

.stub-watch-ad-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 40px rgba(26, 115, 232, 0.4), 0 6px 16px rgba(0,0,0,0.1);
    filter: brightness(1.08);
}

.stub-watch-ad-btn:active {
    transform: translateY(0) scale(0.99);
}

.stub-watch-ad-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

/* Форма вывода: очки + СБП / ЮMoney */
.stub-payout-form {
    max-width: 100%;
    padding: 24px 20px 28px;
    background: var(--stub-card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(26, 115, 232, 0.1), 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(26, 115, 232, 0.08);
}

[data-color-scheme="dark"] .stub-payout-form {
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    border-color: rgba(88, 166, 255, 0.1);
}

.stub-payout-balance {
    margin-bottom: 16px;
    font-size: 1em;
    color: var(--stub-text);
}

.stub-payout-balance strong {
    color: var(--stub-primary);
}

.stub-payout-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--stub-text);
}

.stub-payout-input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 8px;
    font-size: 1.1em;
    background: var(--stub-input-bg);
    color: var(--stub-text);
    border: 2px solid var(--stub-input-border);
    border-radius: 12px;
}

.stub-payout-input:focus {
    outline: none;
    border-color: var(--stub-primary);
}

.stub-payout-hint {
    margin-bottom: 20px;
    font-size: 0.85em;
    color: var(--stub-muted);
}

.stub-payout-method-label {
    margin-bottom: 10px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--stub-text);
}

.stub-payout-methods {
    display: flex;
    gap: 12px;
}

.stub-method-btn {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, var(--stub-primary) 0%, var(--stub-primary-dark) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
}

.stub-method-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.35);
    filter: brightness(1.05);
}

.stub-method-btn:active {
    transform: translateY(0);
}

.stub-method-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.stub-submit-full { width: 100%; margin-top: 8px; }
.stub-payout-back { margin-top: 16px; text-align: center; display: block; font-size: 0.9em; }

.payout-balance-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 16px;
    margin: -24px -20px 20px -20px;
    background: linear-gradient(135deg, var(--stub-primary) 0%, var(--stub-primary-dark) 100%);
    border-radius: 16px 16px 0 0;
    color: #fff;
}

[data-color-scheme="dark"] .payout-balance-banner {
    background: linear-gradient(135deg, #1f3a5f 0%, #0d47a1 100%);
}

.payout-balance-label { font-size: 0.9em; opacity: 0.9; }
.payout-balance-value { font-size: 1.6em; font-weight: 800; }

.payout-requisites {
    padding: 16px 0;
    border-left: 4px solid var(--stub-primary);
    padding-left: 16px;
    margin-bottom: 16px;
}

.payout-requisites-title {
    margin: 0 0 12px;
    font-size: 1em;
    color: var(--stub-text);
}

.stub-payout-select {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 8px;
    font-size: 1em;
    background: var(--stub-input-bg);
    color: var(--stub-text);
    border: 2px solid var(--stub-input-border);
    border-radius: 12px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6368' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

[data-color-scheme="dark"] .stub-payout-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.payout-important {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(26, 115, 232, 0.08);
    border-radius: 12px;
    font-size: 0.85em;
    color: var(--stub-muted);
}

[data-color-scheme="dark"] .payout-important {
    background: rgba(88, 166, 255, 0.1);
}

.payout-important strong { color: var(--stub-primary); }
.payout-important p { margin: 6px 0 0; }

#stub-panel-history .stub-panel-inner {
    padding: 24px 20px 32px;
    background: var(--stub-card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(26, 115, 232, 0.1), 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(26, 115, 232, 0.08);
}

[data-color-scheme="dark"] #stub-panel-history .stub-panel-inner {
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    border-color: rgba(88, 166, 255, 0.1);
}

.stub-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stub-history-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    font-size: 0.9em;
    background: var(--stub-card-bg);
    color: var(--stub-text);
    border-radius: 12px;
    border: 1px solid var(--stub-tabbar-border);
}

.stub-history-item .hist-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.stub-history-item .hist-requisites {
    font-size: 0.8em;
    color: var(--stub-muted);
}
.stub-history-item .hist-date { color: var(--stub-muted); font-size: 0.9em; }
.stub-history-item .hist-rub { font-weight: 700; color: var(--stub-primary); }
.stub-history-item .hist-method { font-size: 0.85em; color: var(--stub-muted); }
.stub-history-item .hist-pts { color: var(--stub-muted); }

.stub-history-empty {
    margin: 0;
    padding: 16px;
    color: var(--stub-muted);
    font-size: 0.95em;
}

.secret-stub .control-btn {
    background: var(--stub-card-bg);
    color: var(--stub-primary);
    border: 2px solid var(--stub-primary);
}

.secret-stub .control-btn:hover {
    background: var(--stub-primary-light);
    border-color: var(--stub-primary);
}

.stub-back-link {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--stub-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}

.stub-back-link:hover {
    color: var(--stub-primary);
}

@media (max-width: 600px) {
    .title {
        font-size: 1.5em;
    }
    
    .question {
        font-size: 2em;
    }
    
    .answer-container {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
}
