.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.terminal-overlay:target {
    display: flex;
}

.terminal-overlay.show {
    display: flex;
}

.terminal-content {
    filter: drop-shadow(0.2rem 0.2rem 5px rgb(0, 0, 0));
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin: 5rem .5rem 1rem .5rem;
    padding: 2.5rem;
    max-height: 90vh;
    color: rgb(172, 26, 26);
    border: 2px solid rgb(172, 26, 26);
    box-shadow: 0 0 20px rgb(172, 26, 26);
    max-width: 800px;
    width: 90%;
}

.terminal-content::-webkit-scrollbar-button {
    color: black;
}

.terminal-content a {
    font-family: "Blackletter";
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    color: rgb(172, 26, 26);
    background: rgba(0, 0, 0, 0.60);
    border: 1px solid rgb(172, 26, 26);
    text-decoration: none;
}

.terminal-content img {
    width: 70%;
    height: auto;
}

.terminal-content a:hover {
    background: rgb(172, 26, 26);
    color: rgba(0, 0, 0, 0.60);
}

.terminal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.05rem;
    scrollbar-color: rgb(172, 26, 26) black;
    scrollbar-width: thin;
}

.terminal-close {
    text-align: center;
    padding: 0.01rem;
    background-color: transparent;
}

.terminal-close a {
    font-family: "Blackletter", sans-serif;
    display: inline-block;
    padding: 0.75rem 1rem;
    color: rgb(172, 26, 26);
    background: transparent;
    border: 2px solid rgb(172, 26, 26);
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.terminal-close a:hover {
    background-color: rgb(172, 26, 26);
    color: #000;
    box-shadow: 0 0 10px rgb(172, 26, 26);
}

.terminal-window {
    background: rgba(0, 0, 0, 0.60);
    color: rgb(172, 26, 26);
    width: 80%;
    max-width: 10000px;
    height: 70vh;
    border: 2px solid rgb(172, 26, 26);
    box-shadow: 0 0 20px rgb(172, 26, 26);
    display: flex;
    flex-direction: column;
}

.terminal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: "Bellefair", serif;
    color: #f7f7f7;
    max-width: 400px;
    margin: 2rem auto;
}

.terminal-form input,
.terminal-form textarea {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgb(172, 26, 26);
    padding: 0.75rem 1rem;
    color: #f7f7f7;
    font-family: "Bellefair", serif;
    font-size: 1rem;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
}

.terminal-form input::placeholder,
.terminal-form textarea::placeholder {
    color: rgb(172, 26, 26);
    opacity: 0.8;
}

.terminal-form input:focus,
.terminal-form textarea:focus {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgb(255, 50, 50);
    box-shadow: 0 0 8px rgb(255, 50, 50);
    color: #f7f7f7;
    outline: none;
}


.terminal-form button {
    background: transparent;
    border: 2px solid rgb(172, 26, 26);
    color: rgb(172, 26, 26);
    font-family: "Blackletter", sans-serif;
    font-size: 1.2rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.terminal-form button:hover {
    background-color: rgb(172, 26, 26);
    color: #000;
    box-shadow: 0 0 10px rgb(172, 26, 26);
}


.terminal-form textarea {
    min-height: 120px;
    resize: vertical;
}

.terminal-form input:-webkit-autofill,
.terminal-form textarea:-webkit-autofill {
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: #f7f7f7 !important;
    -webkit-text-fill-color: #f7f7f7 !important;
    transition: background-color 5000s ease-in-out 0s;
}


.terminal-form input:-moz-autofill,
.terminal-form textarea:-moz-autofill {
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: #f7f7f7 !important;
}


@media (max-width: 768px) {
    .terminal-form {
        max-width: 90%;
        margin: 1rem auto;
        padding: 1rem;
    }
}

.terminal-form button {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .terminal-content {
        padding: 1rem;
        margin: 0.5rem auto; 
        max-height: calc(90vh - 60px);
        top: 2rem; 
    }

    .terminal-overlay {
        align-items: flex-start; 
        padding-top: 2rem;       
    }
    .terminal-content img {
    width: 90%;
    height: auto;
}
}