* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #000;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://wallpapercave.com/wp/wp2757874.gif') center/cover no-repeat;
    filter: brightness(0.5);
    z-index: -1;
}

.content-wrapper {
    width: 90%;
    max-width: 900px;
    z-index: 1;
    padding: 2rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.logo-container {
    position: relative;
    padding: 1.5rem 0;
    width: 100%;
    opacity: 0;
    transform: scale(0.5);
    animation: logoReveal 1.5s forwards 0.5s;
    margin-bottom: 2rem;
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.logo {
    font-family: 'Gugi', cursive;
    font-size: 8rem;
    position: relative;
    line-height: 1;
    text-shadow: 0 0 15px rgba(165, 1, 19, 0.8);
    display: inline-block;
}

.logo .ack, .logo-text .ack {
    color: white;
    animation: secureGlow 3s infinite alternate;
}

.logo .seek, .logo-text .seek {
    color: #A50113;
    animation: secureGlow 3s infinite alternate-reverse;
}

@keyframes secureGlow {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 20px rgba(165, 1, 19, 0.9), 0 0 30px rgba(255, 255, 255, 0.7);
    }
}

.logo-text {
    font-family: 'Gugi', cursive;
    display: inline-block;
}

.security-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.2) 2px,
        rgba(0, 0, 0, 0.2) 4px
    );
    pointer-events: none;
    opacity: 0.3;
    z-index: 5;
}

.terminal-container {
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    animation: terminalReveal 1s forwards 2s;
    position: relative;
}

@keyframes terminalReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional styles to fix terminal flash */
.terminal {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #A50113;
    padding: 2rem;
    border-radius: 5px;
    width: 100%;
    position: relative;
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
    color: #E6DB74;
    
    /* Prevent white flash with these properties */
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    
    /* Force hardware acceleration */
    will-change: transform;
    
    /* Ensure scrollbar is always visible to prevent layout shift */
    overflow-y: scroll;
    scrollbar-width: thin; /* For Firefox */
}

.terminal {
	position: relative;
	padding-top: 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: #A50113 rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.terminal::-webkit-scrollbar {
    width: 8px;
}

.terminal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.terminal::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #A50113, #710113);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #D50113, #950113);
    box-shadow: 0 0 8px rgba(165, 1, 19, 0.8);
}

/* Add glowing effect on active scrolling */
.terminal::-webkit-scrollbar-thumb:active {
    background: linear-gradient(to bottom, #FF0113, #A50113);
    box-shadow: 0 0 12px rgba(255, 1, 19, 0.9);
}

/* Custom scrollbar corner */
.terminal::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

.terminal-content {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    min-height: 200px; /* Minimum height to reduce layout shifts */
}

.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(165, 1, 19, 0.5);
    animation: scanAnimation 3s linear infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes scanAnimation {
    0% { top: 0; opacity: 0.5; }
    100% { top: 100%; opacity: 0.5; }
}

.terminal-header {
	position: sticky;
    background-color: #A50113;
    color: white;
    padding: 0.5rem 1rem;
    font-family: 'Gugi', sans-serif;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.terminal-content {
    margin-top: 2rem; /* Ensure there's adequate space below the header */
    padding-top: 1rem; /* Add extra padding at the top */
    height: calc(100% - 3rem); /* Calculate height based on terminal height minus header */
    overflow-y: auto; /* Make only the content area scrollable, not the entire terminal */
}

.slogan-container {
    height: 3rem;
    position: relative;
    margin-bottom: 1rem;
}

.slogan {
    color: #A50113;
    font-weight: bold;
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

.slogan::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-prompt {
    margin-top: 2rem;
    text-align: left;
    line-height: 1.5;
    font-size: 1rem;
    opacity: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
}

.prompt-line {
    margin-bottom: 0.5rem;
    position: relative;
}

.prompt-command {
    color: #A50113;
}

.prompt-path {
    color: #66D9EF;
}

.prompt-user {
    color: #A6E22E;
}

.prompt-output {
    color: #E6DB74;
    display: block;
    margin: 0.5rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(165, 1, 19, 0.4);
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 16px;
    background-color: #A50113;
    vertical-align: middle;
    animation: cursor-blink 1s infinite;
    margin-left: 2px;
    will-change: opacity;
    transform: translateZ(0);
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.file-listing {
    width: 100%;
    font-family: 'Courier New', monospace;
    border-spacing: 0;
    color: #E6DB74;
}

.file-listing td {
    padding: 0.15rem 0.5rem;
    text-align: left;
}

.file-listing .file-name {
    color: #66D9EF;
}

.file-listing .directory {
    color: #A6E22E;
}

.file-owner {
    color: #AE81FF;
}

.file-group {
    color: #FD971F;
}

.file-size {
    text-align: right;
    color: #F8F8F2;
}

.highlight {
    color: #A50113;
    font-weight: bold;
}

.footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.security-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #A50113;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .logo {
        font-size: 6rem;
    }
    .slogan {
        font-size: 1.8rem;
    }
    .terminal-prompt {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1.5rem;
        width: 95%;
    }
    .logo {
        font-size: 4.5rem;
    }
    .slogan {
        font-size: 1.5rem;
    }
    .terminal {
        padding: 1.5rem;
    }
    .terminal-prompt {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 3.5rem;
    }
    .slogan {
        font-size: 1.2rem;
    }
    .terminal {
        padding: 1rem;
    }
    .terminal-prompt {
        font-size: 0.75rem;
    }
}