#block_66 {
    --color-active: #2267f1;
    --color-active-light: #5a8ff7;
    --color-active-bg: rgba(34, 103, 241, 0.08);
    --color-active-glow: rgba(34, 103, 241, 0.2);

    --bg-page: #f4f6fa;
    --bg-surface: #ffffff;
    --bg-card: #f9fafc;
    --bg-card-hover: #f0f2f8;
    --bg-input: #ffffff;
    --bg-input-focus: #ffffff;

    --text-primary: #1a1d2e;
    --text-secondary: #5f6580;
    --text-muted: #9499b3;
    --text-inverse: #ffffff;

    --border-color: #e2e5f0;
    --border-focus: #2267f1;

    --cyrillic: #2267f1;
    --latin: #0d9f6e;
    --digits: #d4920b;
    --spaces: #d9534f;
    --punctuation: #c94886;
    --other: #3a86c8;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

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

#block_66 .tx-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(34, 103, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 85%, rgba(13, 159, 110, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(212, 146, 11, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

#block_66 .tx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 1;
}

#block_66 .tx-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: tx-fadeInDown 0.6s ease-out;
}

#block_66 .tx-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-active);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

#block_66 .tx-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
}

/* ── Input Section ── */
#block_66 .tx-input-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: tx-fadeInUp 0.6s ease-out 0.1s both;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

#block_66 .tx-input-section:focus-within {
    border-color: var(--color-active);
    box-shadow: 0 0 0 3px var(--color-active-glow), 0 4px 12px rgba(0,0,0,0.04);
}

#block_66 .tx-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#block_66 .tx-input-header label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

#block_66 .tx-input-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#block_66 .tx-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

#block_66 .tx-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--color-active);
}

#block_66 .tx-btn-accent {
    background: var(--color-active);
    color: var(--text-inverse);
    border-color: var(--color-active);
}

#block_66 .tx-btn-accent:hover {
    background: var(--color-active-light);
    border-color: var(--color-active-light);
    color: var(--text-inverse);
}

#block_66 .tx-textarea {
    width: 100%;
    min-height: 220px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#block_66 .tx-textarea::placeholder {
    color: var(--text-muted);
}

#block_66 .tx-textarea:focus {
    border-color: var(--color-active);
    box-shadow: 0 0 0 3px var(--color-active-glow);
}

/* ── Stats Grid ── */
#block_66 .tx-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    animation: tx-fadeInUp 0.6s ease-out 0.2s both;
}

#block_66 .tx-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

#block_66 .tx-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

#block_66 .tx-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--card-accent);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

#block_66 .tx-stat-card:hover::before {
    opacity: 1;
}

#block_66 .tx-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#block_66 .tx-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

#block_66 .tx-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

#block_66 .tx-stat-extra {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ── Detail Sections ── */
#block_66 .tx-detail-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    animation: tx-fadeInUp 0.6s ease-out 0.3s both;
}

#block_66 .tx-detail-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s;
}

#block_66 .tx-detail-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

#block_66 .tx-detail-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

#block_66 .tx-char-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#block_66 .tx-char-item {
    position: relative;
}

#block_66 .tx-char-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

#block_66 .tx-char-item-label {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

#block_66 .tx-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

#block_66 .tx-char-item-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

#block_66 .tx-char-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

#block_66 .tx-char-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0%;
}

/* ── Freq Lists ── */
#block_66 .tx-freq-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

#block_66 .tx-freq-list::-webkit-scrollbar {
    width: 5px;
}

#block_66 .tx-freq-list::-webkit-scrollbar-track {
    background: transparent;
}

#block_66 .tx-freq-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#block_66 .tx-freq-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border-radius: 8px;
    transition: background 0.2s;
    border: 1px solid transparent;
}

#block_66 .tx-freq-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
}

#block_66 .tx-freq-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 1.5rem;
}

#block_66 .tx-freq-word {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
    flex: 1;
    color: var(--text-primary);
    word-break: break-word;
}

#block_66 .tx-freq-bar-container {
    flex: 2;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

#block_66 .tx-freq-bar {
    height: 100%;
    background: var(--color-active);
    border-radius: 3px;
    transition: width 0.6s ease;
}

#block_66 .tx-freq-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 2rem;
    text-align: right;
}

/* ── Info Grid ── */
#block_66 .tx-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

#block_66 .tx-info-item {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

#block_66 .tx-info-item-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

#block_66 .tx-info-item-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Visual Bar ── */
#block_66 .tx-visual-text-bar {
    margin-top: 1.5rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#block_66 .tx-bar-segment {
    display: inline-block;
    height: 10px;
    transition: width 0.8s ease;
}

#block_66 .tx-visual-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

#block_66 .tx-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ── No Data ── */
#block_66 .tx-no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    animation: tx-fadeIn 0.5s ease;
}

#block_66 .tx-no-data-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

#block_66 .tx-no-data-text {
    font-size: 1rem;
    font-weight: 500;
}

#block_66 .tx-no-data-sub {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ── Animations ── */
@keyframes tx-fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes tx-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tx-countUp {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #block_66 .tx-container {
        padding: 1.25rem;
    }

    #block_66 .tx-header h1 {
        font-size: 1.8rem;
    }

    #block_66 .tx-header p {
        font-size: 0.9rem;
    }

    #block_66 .tx-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    #block_66 .tx-detail-sections {
        grid-template-columns: 1fr;
    }

    #block_66 .tx-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    #block_66 .tx-stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    #block_66 .tx-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #block_66 .tx-input-actions {
        flex-wrap: wrap;
    }

    #block_66 .tx-info-grid {
        grid-template-columns: 1fr;
    }
}