/* Hacker Typer Screen Styles */

/* Typing Speed Slider */
#typingSpeed {
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #e9ecef,
        #e9ecef 5px,
        #d3d6d9 5px,
        #d3d6d9 10px
    );
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

#typingSpeed::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #052c65;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#typingSpeed::-webkit-slider-thumb:hover {
    background: #041f4a;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

#typingSpeed::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #052c65;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#typingSpeed::-moz-range-thumb:hover {
    background: #041f4a;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

#typingSpeed::-webkit-slider-runnable-track {
    height: 8px;
    background: linear-gradient(to right,
        #052c65 0%,
        #052c65 var(--value, 18.75%),
        transparent var(--value, 18.75%)),
        repeating-linear-gradient(
            45deg,
            #e9ecef,
            #e9ecef 5px,
            #d3d6d9 5px,
            #d3d6d9 10px
        );
    border-radius: 4px;
}

#typingSpeed::-moz-range-track {
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #e9ecef,
        #e9ecef 5px,
        #d3d6d9 5px,
        #d3d6d9 10px
    );
    border-radius: 4px;
}

#typingSpeed::-moz-range-progress {
    height: 8px;
    background: #052c65;
    border-radius: 4px;
}

/* Dark mode slider */
[data-bs-theme="dark"] #typingSpeed {
    background: repeating-linear-gradient(
        45deg,
        #343a40,
        #343a40 5px,
        #495057 5px,
        #495057 10px
    );
}

[data-bs-theme="dark"] #typingSpeed::-webkit-slider-thumb {
    background: #6ea8fe;
}

[data-bs-theme="dark"] #typingSpeed::-webkit-slider-thumb:hover {
    background: #9ec5fe;
}

[data-bs-theme="dark"] #typingSpeed::-moz-range-thumb {
    background: #6ea8fe;
}

[data-bs-theme="dark"] #typingSpeed::-moz-range-thumb:hover {
    background: #9ec5fe;
}

[data-bs-theme="dark"] #typingSpeed::-webkit-slider-runnable-track {
    background: linear-gradient(to right,
        #6ea8fe 0%,
        #6ea8fe var(--value, 18.75%),
        transparent var(--value, 18.75%)),
        repeating-linear-gradient(
            45deg,
            #343a40,
            #343a40 5px,
            #495057 5px,
            #495057 10px
        );
}

[data-bs-theme="dark"] #typingSpeed::-moz-range-track {
    background: repeating-linear-gradient(
        45deg,
        #343a40,
        #343a40 5px,
        #495057 5px,
        #495057 10px
    );
}

[data-bs-theme="dark"] #typingSpeed::-moz-range-progress {
    background: #6ea8fe;
}

.hacker-screen-preview-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    min-height: 400px;
}

.hacker-screen-preview {
    background: #000;
    min-height: 400px;
    padding: 20px;
    border-radius: 8px;
    cursor: text;
}

.hacker-screen-preview:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.preview-fullscreen-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.preview-fullscreen-icon:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.preview-fullscreen-icon img {
    filter: brightness(0) invert(1);
}

.hacker-screen-fullscreen .preview-fullscreen-icon {
    display: none !important;
}

/* Hacker Typer Screen Core Styles */
.hacker-typer-screen {
    background-color: #000;
    color: #11c700;
    text-align: start;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    box-sizing: border-box;
    padding: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    user-select: none;
    font-family: 'Lucida Console', 'Courier New', Monaco, monospace;
    min-height: 400px;
    cursor: text;
}

.hacker-typer-screen::-webkit-scrollbar {
    display: none;
}

.hacker-typer-screen:focus {
    outline: none;
}

/* Blinking cursor */
.hacker-typer-screen.with-cursor::after {
    content: '';
    display: inline-block;
    vertical-align: text-bottom;
    margin-left: 2px;
    border-left: 2px solid currentColor;
    animation: blink 1s step-end infinite;
    height: 1em;
}

@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: currentColor;
    }
}

/* Color Themes */
.hacker-typer-screen.theme-green {
    background-color: #000;
    color: #11c700;
}

.hacker-typer-screen.theme-amber {
    background-color: #000;
    color: #ffb000;
}

.hacker-typer-screen.theme-cyan {
    background-color: #000;
    color: #00ffff;
}

.hacker-typer-screen.theme-white {
    background-color: #000;
    color: #ffffff;
}

.hacker-typer-screen.theme-red {
    background-color: #000;
    color: #ff0000;
}

/* Fullscreen Container */
.hacker-screen-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hacker-screen-fullscreen #fullscreenContent {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    outline: none;
}

.hacker-screen-fullscreen .hacker-typer-screen {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
    padding: 30px;
}

/* Exit hint */
.exit-hint {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: fadeIn 0.5s ease, fadeOut 0.5s ease 3.5s;
    pointer-events: none;
    z-index: 10000;
}

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

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

/* Responsive adjustments */
@media screen and (max-width: 1024px) {
    .hacker-typer-screen {
        font-size: 12px;
        line-height: 1.3;
        padding: 15px;
    }

    .hacker-screen-fullscreen .hacker-typer-screen {
        font-size: 14px;
        line-height: 1.4;
        padding: 20px;
    }
}

@media screen and (max-width: 768px) {
    .hacker-typer-screen {
        font-size: 10px;
        line-height: 1.2;
        padding: 10px;
    }

    .hacker-screen-fullscreen .hacker-typer-screen {
        font-size: 12px;
        line-height: 1.3;
        padding: 15px;
    }

    .exit-hint {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* Dark mode support */
[data-bs-theme="dark"] .preview-fullscreen-icon {
    background: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .preview-fullscreen-icon:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Focus styles for accessibility */
.hacker-screen-preview:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 3px;
}

#fullscreenContent:focus-visible {
    outline: none;
}

/* Custom scrollbar for webkit browsers (optional, hidden by default) */
.hacker-typer-screen::-webkit-scrollbar {
    width: 8px;
}

.hacker-typer-screen::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.hacker-typer-screen::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.hacker-typer-screen::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
