/* common.css */
@import url('//fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #00FF00;
    font-family: 'VT323', monospace;
    min-height: 100vh;
    display: block;
    line-height: 1.2;
    position: relative;
    overflow-x: hidden;
    /* Making sure scrolling works properly */
    min-height: 100vh;
    scroll-behavior: smooth;
}

.ascii-art {
    white-space: pre;
    line-height: 1;
    font-family: monospace;
    font-size: 5px;
    text-align: center;
    margin-top: 20px; /* Fixed spacing from top */
    margin-bottom: 10px;
    padding-top: 10px; /* Additional padding to ensure consistent spacing */
}

.company-name {
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-weight: bold;
}

@keyframes pulseButton {
    0% { background-color: black; color: #00FF00; }
    50% { background-color: #00FF00; color: black; }
    100% { background-color: black; color: #00FF00; }
}

/* Felles knappestil */
button {
    background-color: black;
    color: #00FF00;
    border: 2px solid #00FF00;
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background-color: #00FF00;
    color: black;
    box-shadow: 0 0 10px #00FF00;
}

/* Felles posisjonering */
#main-container, .container {
    position: relative; /* Changed from fixed to relative for better scrolling */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding-top: 30px; /* Reduced from 50px to create more consistent spacing with ASCII art */
    box-sizing: border-box;
    z-index: 5;
    /* overflow-y: auto; - Removed to allow normal page scrolling */
}

/* Responsive justeringer for mobil */
@media (max-width: 480px) {
    #main-container, .container {
        width: 100%;
        padding-top: 30px !important; /* Match desktop padding */
    }

    .ascii-art {
        font-size: 4px;
    }

    button {
        font-size: 1.1rem;
        padding: 6px 18px;
    }

    /* Improve scrolling on mobile */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* CRT skjerm-effekt - nå på øverste lag */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0.25; /* Increased opacity */
    z-index: 2147483647; /* Maximum z-index value */
    pointer-events: none; /* Sikrer at klikk går igjennom til elementer under */
    animation: flicker 0.15s infinite;
    mix-blend-mode: overlay; /* Blend mode for bedre visuell effekt */
}

/* Skanning-linje - også på øverste lag */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 255, 0, 0.3) 50%);
    background-size: 100% 3px; /* Thinner lines, more visible */
    z-index: 2147483646; /* Just below the flicker effect */
    pointer-events: none; /* Sikrer at klikk går igjennom til elementer under */
    opacity: 0.4; /* Increased opacity */
    animation: scanline 8s linear infinite; /* Slightly faster */
    mix-blend-mode: multiply; /* Changed blend mode for better visibility */
}

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

@keyframes flicker {
    0% {
        opacity: 0.35;
    }
    5% {
        opacity: 0.4;
    }
    10% {
        opacity: 0.3;
    }
    15% {
        opacity: 0.9;
    }
    20% {
        opacity: 0.25;
    }
    25% {
        opacity: 0.85;
    }
    30% {
        opacity: 0.7;
    }
    35% {
        opacity: 0.7;
    }
    40% {
        opacity: 0.35;
    }
    45% {
        opacity: 0.85;
    }
    50% {
        opacity: 0.95;
    }
    55% {
        opacity: 0.15;
    }
    60% {
        opacity: 0.3;
    }
    65% {
        opacity: 0.75;
    }
    70% {
        opacity: 0.6;
    }
    75% {
        opacity: 0.45;
    }
    80% {
        opacity: 0.75;
    }
    85% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    95% {
        opacity: 0.45;
    }
    100% {
        opacity: 0.35;
    }
}

/* Style for Matrix canvas */
#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Use viewport width to ensure full coverage */
    height: 100vh; /* Use viewport height */
    z-index: -1; /* Behind all content */
    opacity: 0.18; /* Slightly increased for better visibility */
    pointer-events: none; /* Ensures clicks pass through to elements below */
    display: block !important; /* Force display */
    margin: 0;
    padding: 0;
    overflow: hidden;
}