:root {
    --matrix-color: #00ff41;
    --text-bg-color: rgba(0, 0, 0, 0.7);
    --cursor-color: var(--matrix-color);
}

/* Основные стили эффекта */
body.matrix-effect-loaded {
    cursor: default;
}

body.matrix-effect-active {
    cursor: pointer;
}

/* Контейнер матрицы */
#matrixEffectContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

/* Аудиоплеер */
.matrix-audio-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    padding: 15px;
    background-color: var(--text-bg-color);
    border-radius: 5px;
    box-shadow: 0 0 15px var(--matrix-color);
    z-index: 20;
}

.matrix-audio-container audio {
    width: 100%;
    background: transparent;
}

/* Основной текстовый контейнер */
#finalTextContainer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;

    padding: 0px;
    margin: 0;

    background-color: var(--text-bg-color) !important;
    color: var(--matrix-color) !important;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    line-height: 1.5;
    border-radius: 5px;
    box-shadow: 0 0 15px var(--matrix-color);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 10;
    transition: all 0.3s ease;
}

/* Стили для скроллбара */
#finalTextContainer::-webkit-scrollbar {
    width: 8px;
}

#finalTextContainer::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#finalTextContainer::-webkit-scrollbar-thumb {
    background-color: var(--matrix-color);
    border-radius: 4px;
}

/* Анимации */
@keyframes fallAnimation {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes wordFall {
    0% { transform: translateY(0) rotateZ(0deg); opacity: 0.9; }
    100% { transform: translateY(100vh) rotateZ(10deg); opacity: 0; }
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Элементы матрицы */
.falling-char {
    position: absolute;
    color: var(--matrix-color);
    text-shadow: 0 0 5px var(--matrix-color), 0 0 10px var(--matrix-color);
    animation: fallAnimation linear forwards;
    top: -50px;
    pointer-events: none;
}

.matrix-word {
    position: absolute;
    color: var(--matrix-color);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 10px var(--matrix-color);
    animation: wordFall linear forwards;
    top: -50px;
    white-space: nowrap;
    opacity: 0.9;
    z-index: 5;
    pointer-events: none;
}

/* Курсор */
.cursor {
    font-weight: bold;
    display: inline-block;
    width: 0.5em;
    height: 1em;
    background-color: var(--cursor-color);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

.matrix-cursor-underline {
    text-decoration: underline !important;
    animation: none !important;
}

.matrix-cursor-static {
    animation: none !important;
    opacity: 1 !important;
}

/* Оверлей паузы */
#pauseOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--matrix-color);
    font-size: 24px;
    font-family: 'Courier New', monospace;
    display: none;
}

/* Стили для настроек */
.color-picker-rgba {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.color-picker-rgba input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 2px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
}

.color-picker-rgba input[type="range"] {
    width: 100px;
}

.matrix-preview {
    width: 100%;
    height: 50px;
    margin-top: 10px;
    border: 1px dashed #ccc;
}

.matrix-content-wrapper {
    transition: all 0.3s ease;
}

[data-matrix-field="pages"] {
    border-color: var(--matrix-color);
}
.matrix-header-container {
    color: var(--matrix-color);
    font-family: 'Courier New', monospace;
    text-align: center;
}

.matrix-header-container h1 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.matrix-header-container .wp-block-audio {
    margin: 0 auto;
    width: 100%;
}

.matrix-header-container audio {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border-radius: 3px;
}

/* Добавьте в конец файла */
.binary-char {
    color: var(--matrix-color);
    text-shadow: 0 0 5px var(--matrix-color), 0 0 10px var(--matrix-color);
    animation: binaryFall linear forwards, rotateX 2s linear infinite;
    transform-style: preserve-3d;
}

@keyframes rotateX {
    0% { transform: rotateX(0deg); }
    100% { transform: rotateX(360deg); }
}

@keyframes binaryFall {
    0% { transform: translateY(0) rotateX(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotateX(720deg); opacity: 0; }
}
