/* Блок текущего кодового слова */
.codeword-hero-block {
    border: 2px solid #6366f1;
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(135deg, #eef2ff 0%, #fdf4ff 45%, #fff7ed 100%);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}
.codeword-hero-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6366f1;
    margin-bottom: 0.5rem;
}
.codeword-current-value {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1.15;
    color: #4f46e5;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9), 0 0 28px rgba(99, 102, 241, 0.35);
    word-break: break-word;
}
.codeword-scroll-hint {
    font-size: 0.95rem;
    color: #4b5563;
}
.codeword-scroll-hint-link {
    font-weight: 600;
    color: #4f46e5;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.codeword-scroll-hint-link:hover {
    color: #4338ca;
}

/* История кодов */
.codeword-history-block {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}
.codeword-history-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}
.codeword-history-table-wrap {
    transition: filter 0.55s ease, opacity 0.55s ease;
}
.codeword-history-wrap.is-locked .codeword-history-table-wrap {
    filter: blur(12px);
    opacity: 0.45;
    user-select: none;
    pointer-events: none;
}
.codeword-history-wrap.is-revealed .codeword-history-table-wrap {
    filter: none;
    opacity: 1;
}
.codeword-history-gate {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.codeword-history-gate[hidden],
.codeword-history-gate-loading[hidden] {
    display: none !important;
}
.codeword-history-gate-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.codeword-history-loading-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #4b5563;
}
.codeword-history-progress {
    width: min(320px, 78%);
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
.codeword-history-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1 0%, #3b82f6 100%);
    transition: width 0.08s linear;
}
.codeword-history-progress-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #4f46e5;
}
.codeword-reveal-all-btn {
    min-width: 11rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}
.codeword-history-table {
    border: 0;
    border-radius: 0;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}
.codeword-history-table thead th {
    background: #f9fafb;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    padding: 0.65rem 1rem;
}
.codeword-history-table tbody td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.codeword-history-table tbody tr:last-child td {
    border-bottom: 0;
}
.codeword-history-actions-col {
    width: 1%;
    white-space: nowrap;
}
.codeword-history-mask {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #9ca3af;
}
.codeword-history-word {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #111827;
}
.codeword-history-word:not([hidden]) {
    display: inline-block;
}
.codeword-history-period {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}
.codeword-history-actions-cell {
    text-align: right;
    white-space: nowrap;
}
.codeword-copy-btn.copied,
.codeword-copy-main.copied {
    border-color: #22c55e;
    color: #15803d;
}

@media (prefers-reduced-motion: reduce) {
    .codeword-history-table-wrap {
        transition: none;
    }
    .codeword-history-progress-bar {
        transition: none;
    }
}
