/* Binary Text Hover Effects - Dark Mode Only */

/* Binary hover effect for headings and links in dark mode */
.theme-dark .binary-hover {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.theme-dark .binary-hover::before {
    content: attr(data-binary);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--accent);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: inherit;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    background: var(--bg-primary);
    z-index: 1;
    text-shadow: 0 0 10px var(--accent);
}

.theme-dark .binary-hover:hover::before {
    clip-path: inset(0 0 0 0);
}

/* Binary active state - for text effects panel */
.binary-active {
    font-family: 'Fira Code', 'Consolas', monospace !important;
    letter-spacing: 0.15em !important;
    text-align: center !important;
}

.theme-dark .binary-hover:hover::before {
    clip-path: inset(0 0 0 0);
}

/* Matrix Rain Background */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#matrix-rain.active {
    opacity: 1;
}

.theme-dark #matrix-rain.active {
    opacity: 0.15;
}

.theme-light #matrix-rain.active {
    opacity: 0;
}

/* Light Mode Background - Gradient Waves */
#light-bg-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

#light-bg-effect.active {
    opacity: 1;
}

.theme-dark #light-bg-effect.active {
    opacity: 0;
}

.theme-light #light-bg-effect.active {
    opacity: 0.6;
}

.light-wave {
    position: absolute;
    border-radius: 50%;
    animation: lightWave 20s infinite ease-in-out;
    background: radial-gradient(circle, rgba(255, 183, 77, 0.1), transparent 70%);
}

.light-wave:nth-child(1) {
    width: 600px;
    height: 600px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.light-wave:nth-child(2) {
    width: 800px;
    height: 800px;
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
    background: radial-gradient(circle, rgba(129, 199, 132, 0.08), transparent 70%);
}

.light-wave:nth-child(3) {
    width: 500px;
    height: 500px;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.08), transparent 70%);
}

@keyframes lightWave {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }
    25% {
        transform: scale(1.1) translate(20px, -20px);
    }
    50% {
        transform: scale(0.95) translate(-10px, 10px);
    }
    75% {
        transform: scale(1.05) translate(-20px, -10px);
    }
}

/* Light Mode - Bokeh Effect */
#light-bg-effect.mode-bokeh .light-wave {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 50%);
    animation: bokehFloat 15s infinite ease-in-out;
    filter: blur(30px);
}

#light-bg-effect.mode-bokeh .light-wave:nth-child(1) {
    background: radial-gradient(circle, rgba(255, 183, 77, 0.3), transparent 50%);
    animation-delay: 0s;
}

#light-bg-effect.mode-bokeh .light-wave:nth-child(2) {
    background: radial-gradient(circle, rgba(233, 30, 99, 0.2), transparent 50%);
    animation-delay: -5s;
}

#light-bg-effect.mode-bokeh .light-wave:nth-child(3) {
    background: radial-gradient(circle, rgba(33, 150, 243, 0.2), transparent 50%);
    animation-delay: -10s;
}

@keyframes bokehFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.2); }
    50% { transform: translate(-30px, 50px) scale(0.8); }
    75% { transform: translate(30px, 30px) scale(1.1); }
}

/* Light Mode - Aurora Effect */
#light-bg-effect.mode-aurora {
    background: linear-gradient(
        135deg,
        rgba(255, 183, 77, 0.1) 0%,
        rgba(129, 199, 132, 0.1) 25%,
        rgba(100, 181, 246, 0.1) 50%,
        rgba(186, 104, 200, 0.1) 75%,
        rgba(255, 183, 77, 0.1) 100%
    );
    background-size: 400% 400%;
    animation: auroraShift 20s ease infinite;
}

#light-bg-effect.mode-aurora .light-wave {
    opacity: 0;
}

@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Dark Mode - Scan Lines */
#matrix-rain.scan-mode {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.03) 2px,
        rgba(0, 255, 65, 0.03) 4px
    );
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* Background Effects Toggle Button - Header Style */
.bg-effects-toggle {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
}

.theme-dark .bg-effects-toggle {
    background: rgba(0, 255, 65, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.theme-dark .bg-effects-toggle:hover {
    background: rgba(0, 255, 65, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.theme-light .bg-effects-toggle {
    background: rgba(255, 183, 77, 0.15);
    color: #ff9800;
    border: 1px solid rgba(255, 183, 77, 0.3);
}

.theme-light .bg-effects-toggle:hover {
    background: rgba(255, 183, 77, 0.25);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 183, 77, 0.2);
}

/* Mode indicator badge */
.bg-effects-toggle .mode-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.theme-dark .bg-effects-toggle .mode-badge {
    background: var(--accent);
    color: #000;
}

.theme-light .bg-effects-toggle .mode-badge {
    background: #ff9800;
    color: #fff;
}

/* Easter Egg Hints System */
.hint-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 996;
}

.hint-bubble {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 280px;
    border: 1px solid var(--border);
}

.hint-bubble.visible {
    opacity: 1;
    transform: translateY(0);
}

.hint-bubble .hint-icon {
    margin-right: 8px;
}

.theme-dark .hint-bubble {
    border-color: rgba(0, 255, 65, 0.2);
}

.theme-dark .hint-bubble .hint-icon {
    color: var(--accent);
}

.theme-light .hint-bubble {
    border-color: rgba(255, 183, 77, 0.3);
}

.theme-light .hint-bubble .hint-icon {
    color: #ff9800;
}

.hint-dismiss {
    margin-left: 10px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.hint-dismiss:hover {
    opacity: 1;
}

/* Glitch text effect for dark mode */
.theme-dark .glitch-text:hover {
    animation: glitchText 0.3s infinite;
}

@keyframes glitchText {
    0% {
        text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff;
    }
    25% {
        text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff;
    }
    50% {
        text-shadow: 2px 2px #ff00ff, -2px -2px #00ffff;
    }
    75% {
        text-shadow: -2px -2px #ff00ff, 2px 2px #00ffff;
    }
    100% {
        text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff;
    }
}
