@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.9; }
    15% { opacity: 0.95; }
    20% { opacity: 0.98; }
    25% { opacity: 0.95; }
    30% { opacity: 0.9; }
    35% { opacity: 0.95; }
    40% { opacity: 0.98; }
    45% { opacity: 0.95; }
    50% { opacity: 0.9; }
    55% { opacity: 0.95; }
    60% { opacity: 0.98; }
    65% { opacity: 0.95; }
    70% { opacity: 0.9; }
    75% { opacity: 0.95; }
    80% { opacity: 0.98; }
    85% { opacity: 0.95; }
    90% { opacity: 0.9; }
    95% { opacity: 0.95; }
    100% { opacity: 0.98; }
}


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

body {
    background-color: black;
    color: #00ff00;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow-y: auto;
    scrollbar-width: 0; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    width: 0;
    display: none; /* Chrome, Safari and Opera */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

.main-container {
    height: 95vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.main-container::-webkit-scrollbar {
    width: 0;
    display: none; /* Chrome, Safari and Opera */
}

#terminal {
    flex: 1;
    background-color: #000;
    border: 2px solid #00ff00;
    padding: 20px;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    animation: flicker 0.15s infinite;
    transition: opacity 0.3s ease-in-out;
}

#terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

#terminal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.control-panel {
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: #000;
    padding: 15px;
    background-color: #000;
    border: 2px solid #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    position: relative;
    z-index: 3;
}

input[type="number"] {
    background-color: #000;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 3px;
    width: 180px;
    text-shadow: 0 0 5px #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

button {
    background-color: #000;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

button:hover {
    background-color: #00ff00;
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.back-button {
    margin-left: auto;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* Text glow effect */
#terminal, input, button {
    text-shadow: 0 0 5px #00ff00;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

.secret-message {
    color: cyan;
    text-shadow: 0px 0px 5px cyan;
    animation: secretGlow 2s infinite;
}

@keyframes secretGlow {
    0%, 100% { text-shadow: 0px 0px 5px cyan; }
    50% { text-shadow: 0px 0px 10px cyan; }
}

/* Self-destruct sequence effects */
@keyframes selfDestructShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-0.5px, -0.5px); }
    50% { transform: translate(0.5px, 0.5px); }
    75% { transform: translate(-0.5px, 0.5px); }
}

body.self-destruct {
    background-color: #ff0000 !important;
    animation: selfDestructShake 0.1s infinite;
}

body.shutdown {
    background-color: #000000 !important;
    color: #000000 !important;
}

body.shutdown * {
    visibility: hidden !important;
}

.self-destruct .terminal {
    background-color: #ff0000 !important;
    border-color: #ff0000 !important;
}

.self-destruct .cursor {
    background-color: #ff0000 !important;
    color: #ffffff !important;
}

.self-destruct-message {
    color: #ffffff !important;
    text-shadow: 0 0 10px #ff0000 !important;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
}

.countdown-timer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px #ff0000;
    text-align: center;
    font-family: 'Courier New', monospace;
    z-index: 9999;
    width: 100%;
    text-align: center;
}

.cryptic-hint.visible {
    opacity: 1;
}


.events-list {
    margin: 20px 0;
    padding: 0 20px;
    opacity: 1;
    position: relative;
}

.events-list::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

.event-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 5px;
    opacity: 1;
    background-color: transparent;
    position: relative;
}

.event-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

.event-content {
    flex: 1;
    opacity: 1;
    position: relative;
    z-index: 2;
}

.event-year {
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 0 5px #00ffff;
    opacity: 1;
}

.event-text {
    color: #fff;
    line-height: 1.4;
    opacity: 1;
    text-shadow: 0 0 5px #00ffff;
    background-color: transparent;
}

.event-dot {
    color: #00ffff;
    margin-right: 15px;
    font-size: 1.2em;
    text-shadow: 0 0 5px #00ffff;
    opacity: 1;
    position: relative;
    z-index: 2;
}

/* Event Details Styles */
.event-details {
    padding: 20px 10px 10px 10px;
    max-width: 800px;
    margin: 0 auto;
}

.event-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.event-details-year {
    color: #00ffff;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 0 0 5px #00ffff;
}

.event-details-date {
    color: #00ffff;
    font-size: 1.2em;
    text-shadow: 0 0 5px #00ffff;
}

.event-details-title {
    color: #fff;
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
}

.event-details-impact {
    background-color: rgba(0, 255, 255, 0.1);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.impact-label {
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00ffff;
}

.impact-text {
    color: #fff;
    line-height: 1.6;
}

/* Animation for transitions */
.event-details {
    animation: fadeIn 0.5s ease;
}

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


footer {
    width: 100%;
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.8);
    margin-top: 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 5px #ffff;
    border-bottom: 1px solid #ffff;
}

footer img {
    transition: opacity 0.3s ease;
}

footer img:hover {
    opacity: 0.8;
}
