/* SCP Foundation Stylesheet */

:root {
    --scp-bg: #f0f0f0;
    --scp-text: #222;
    --scp-red: #d00000;
    --scp-dark: #111;
    --scp-border: #333;
    --font-main: 'Special Elite', 'Courier New', monospace;
    --font-tech: 'Share Tech Mono', monospace;
}

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

body {
    background-color: #1a1a1a;
    font-family: var(--font-main);
    color: var(--scp-text);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.scp-logo-loader {
    margin-bottom: 30px;
    animation: logoFloat 3s ease-in-out infinite;
}

.scp-logo-loader img {
    width: 150px;
    height: auto;
    filter: grayscale(100%) contrast(120%) drop-shadow(0 0 20px rgba(208, 0, 0, 0.5));
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.loading-text {
    font-family: var(--font-tech);
    font-size: 20px;
    font-weight: bold;
    color: var(--scp-red);
    letter-spacing: 3px;
    margin-bottom: 20px;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-bar {
    width: 100%;
    height: 8px;
    background-color: #333;
    border: 2px solid var(--scp-border);
    margin-bottom: 15px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #8b0000, var(--scp-red), #ff0000);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(208, 0, 0, 0.7);
}

.loading-percentage {
    font-family: var(--font-tech);
    font-size: 24px;
    font-weight: bold;
    color: var(--scp-red);
    margin-bottom: 10px;
}

.loading-status {
    font-family: var(--font-tech);
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
}

/* Content Blur Effect */
.content-blur {
    filter: blur(20px);
    transition: filter 1s ease;
}

.content-blur.loaded {
    filter: blur(0px);
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.bg-video.active {
    opacity: 1;
}

/* CRT Overlay Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

.scanline {
    width: 100%;
    height: 100px;
    z-index: 999;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: fixed;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }

    100% {
        bottom: -100px;
    }
}

/* Main Container */
.scp-container {
    background-color: #f4f4f4;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #999;
    position: relative;
    padding: 40px;
    z-index: 10;
}

/* Header */
.scp-header {
    border-bottom: 3px solid var(--scp-text);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header-warning {
    background-color: var(--scp-red);
    color: white;
    text-align: center;
    font-weight: bold;
    padding: 5px;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid #000;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.scp-logo {
    width: 100px;
    height: auto;
    filter: grayscale(100%) contrast(120%);
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.header-title h2 {
    font-size: 18px;
    color: #555;
    font-weight: normal;
}

/* Music Controls */
.music-controls {
    position: relative;
    display: flex;
    align-items: center;
}

.music-btn {
    background: transparent;
    border: 1px solid var(--scp-border);
    color: var(--scp-text);
    padding: 10px 15px;
    font-family: var(--font-tech);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.music-btn:hover {
    border-color: var(--scp-text);
    background: rgba(0, 0, 0, 0.05);
}

.music-btn.active {
    background: var(--scp-red);
    color: #fff;
    border-color: var(--scp-red);
}

.music-icon {
    font-size: 16px;
}

/* Volume Slider */
.volume-slider {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #f4f4f4;
    border: 1px solid var(--scp-border);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.music-controls:hover .volume-slider {
    opacity: 1;
    visibility: visible;
}

.volume-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #ccc;
    outline: none;
    cursor: pointer;
    border: 1px solid var(--scp-border);
}

.volume-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--scp-red);
    cursor: pointer;
    border: 2px solid var(--scp-text);
    transition: all 0.2s ease;
}

.volume-input::-webkit-slider-thumb:hover {
    background: #ff0000;
    transform: scale(1.2);
}

.volume-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--scp-red);
    cursor: pointer;
    border: 2px solid var(--scp-text);
    border-radius: 0;
    transition: all 0.2s ease;
}

.volume-input::-moz-range-thumb:hover {
    background: #ff0000;
    transform: scale(1.2);
}

.volume-label {
    font-family: var(--font-tech);
    font-size: 12px;
    color: var(--scp-text);
    text-align: center;
    font-weight: bold;
}

/* Live Statistics */
.live-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    padding: 10px 15px;
    border: 1px solid var(--scp-border);
    background: rgba(0, 0, 0, 0.02);
}

.stats-label {
    font-family: var(--font-tech);
    font-size: 9px;
    color: #666;
    letter-spacing: 1px;
    font-weight: bold;
}

.stats-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-tech);
    font-size: 16px;
    font-weight: bold;
    color: var(--scp-red);
}

.stats-indicator {
    color: #00ff00;
    font-size: 12px;
    animation: statsIndPulse 2s ease-in-out infinite;
}

@keyframes statsIndPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Document */
.scp-document {
    line-height: 1.6;
}

.doc-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.doc-section {
    margin-bottom: 25px;
    border-left: 2px solid #ccc;
    padding-left: 15px;
}

h3 {
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-family: var(--font-tech);
}

p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 15px;
}

/* Redacted */
.redacted {
    background: #000;
    color: #000;
    cursor: not-allowed;
    user-select: none;
}

/* Object Classes */
.object-class-keter {
    color: var(--scp-red);
    font-weight: bold;
}

/* Timer */
.containment-timer {
    background: #e0e0e0;
    border: 1px solid #999;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    font-family: var(--font-tech);
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 32px;
    font-weight: bold;
    color: var(--scp-red);
    flex-wrap: wrap;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-number {
    font-size: 36px;
    font-weight: bold;
    min-width: 60px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    display: inline-block;
}

.timer-label {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
}

.timer-sep {
    font-size: 32px;
    color: var(--scp-text);
}

.timer-status {
    margin-top: 15px;
    font-size: 14px;
    color: var(--scp-red);
    font-weight: bold;
    letter-spacing: 2px;
}

.status-blink {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Progress Indicator */
.progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding: 20px 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.step-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ccc;
    border: 3px solid #999;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background-color: var(--scp-red);
    border-color: #8b0000;
    box-shadow: 0 0 10px rgba(208, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.step-label {
    font-family: var(--font-tech);
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.step-label.redacted {
    background: #000;
    color: #000;
    cursor: not-allowed;
    user-select: none;
}

.progress-step.active .step-label {
    color: var(--scp-red);
}

.progress-line {
    width: 60px;
    height: 2px;
    background-color: #ccc;
    margin: 0 10px;
}

/* Communication Links */
.communication-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.scp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--scp-text);
    color: var(--scp-text);
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-tech);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 12px;
}

.scp-btn:hover {
    background: var(--scp-text);
    color: #fff;
}

.btn-icon {
    font-size: 16px;
    display: inline-block;
}

img.btn-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

/* Socials Menu */
.socials-menu {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
}

.socials-trigger {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.socials-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.socials-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.socials-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: #f4f4f4;
    border: 2px solid var(--scp-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 50px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.socials-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.socials-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.socials-link:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--scp-border);
}

.socials-link img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    animation: socialGlitch 8s infinite;
}

.socials-link:nth-child(1) img {
    animation-delay: 0s;
}

.socials-link:nth-child(2) img {
    animation-delay: 2.5s;
}

.socials-link:nth-child(3) img {
    animation-delay: 5s;
}

@keyframes socialGlitch {
    0%, 90%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg) saturate(1);
    }
    91% {
        transform: translate(-1px, 1px);
        filter: hue-rotate(90deg) saturate(1.2);
    }
    92% {
        transform: translate(1px, -1px);
        filter: hue-rotate(-90deg) saturate(0.8);
    }
    93% {
        transform: translate(-1px, -1px);
        filter: hue-rotate(180deg) saturate(1.5);
    }
    94% {
        transform: translate(1px, 1px);
        filter: hue-rotate(-180deg) saturate(0.7);
    }
    95% {
        transform: translate(0);
        filter: hue-rotate(0deg) saturate(1);
    }
    96% {
        transform: translate(-2px, 0);
        filter: hue-rotate(45deg) saturate(1.3);
    }
    97% {
        transform: translate(2px, 0);
        filter: hue-rotate(-45deg) saturate(0.9);
    }
    98% {
        transform: translate(0, -2px);
        filter: hue-rotate(120deg) saturate(1.1);
    }
    99% {
        transform: translate(0);
        filter: hue-rotate(0deg) saturate(1);
    }
}

/* Footer */
.doc-footer {
    margin-top: 50px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .scp-container {
        padding: 20px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .music-controls {
        width: 100%;
        justify-content: center;
    }

    .live-stats {
        width: 100%;
        align-items: center;
    }

    .timer-display {
        font-size: 24px;
    }

    .timer-number {
        font-size: 28px;
    }

    .timer-sep {
        font-size: 24px;
    }

    .doc-header {
        flex-direction: column;
        text-align: left;
    }

    .progress-container {
        flex-wrap: wrap;
    }

    .progress-line {
        width: 40px;
        margin: 0 5px;
    }

    .step-label {
        font-size: 9px;
    }
}

/* Notification System */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: #1a1a1a;
    border: 2px solid var(--scp-red);
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(208, 0, 0, 0.4);
    font-family: var(--font-tech);
    color: #e0e0e0;
    pointer-events: all;
    animation: slideIn 0.4s ease-out forwards, fadeOut 0.4s ease-in 4.6s forwards;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--scp-red);
}

.notification-header {
    font-size: 10px;
    color: var(--scp-red);
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.notification-message {
    font-size: 13px;
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        transform: translateX(450px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(450px);
    }
}

@media (max-width: 600px) {
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        padding: 12px 15px;
    }

    .notification-message {
        font-size: 11px;
    }
}