/* ==========================================================================
   Terminal Easter Egg Styles
   ========================================================================== */

/* Floating Terminal Button */
.floating-terminal-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(13, 13, 13, 0.8);
    border: 1px solid var(--primary-cyan, #00e5ff);
    color: var(--primary-cyan, #00e5ff);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.floating-terminal-btn:hover {
    background: var(--primary-cyan, #00e5ff);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
    transform: translateY(-5px);
}

.terminal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.terminal-modal.active {
    opacity: 1;
    visibility: visible;
}

.terminal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.terminal-window {
    position: relative;
    width: 80%;
    max-width: 900px;
    height: 60vh;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 229, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 20001;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #333;
}

.terminal-modal:not([aria-hidden="true"]) .terminal-window,
.terminal-modal:not([hidden]) .terminal-window {
    transform: translateY(0) scale(1);
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #111;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.t-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.close-btn { background: #ff5f56; }
.min-btn { background: #ffbd2e; }
.max-btn { background: #27c93f; }

.terminal-title {
    flex-grow: 1;
    text-align: center;
    color: #999;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    margin-right: 44px; /* to offset the buttons width */
}

.terminal-body {
    flex-grow: 1;
    padding: 20px;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 1rem;
    color: #00e5ff;
    overflow-y: auto;
    background: #0d0d0d;
}

.terminal-output p {
    margin: 5px 0;
    word-break: break-all;
    line-height: 1.4;
}

.cmd-err { color: #ff5f56; }
.cmd-succ { color: #27c93f; }
.cmd-warn { color: #ffbd2e; }

.terminal-input-line {
    display: flex;
    margin-top: 10px;
    align-items: center;
}

.prompt {
    color: #27c93f;
    margin-right: 10px;
    white-space: nowrap;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #00e5ff;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 1rem;
    flex-grow: 1;
    outline: none;
    caret-color: #00e5ff;
}

/* Scrollbar for terminal */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}
.terminal-body::-webkit-scrollbar-track {
    background: #0d0d0d;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .terminal-window {
        width: 95%;
        height: 70vh;
    }
    .terminal-body {
        font-size: 0.9rem;
    }
    .floating-terminal-btn {
        bottom: 20px;
        left: 20px;
        transform: scale(0.9);
    }
    .floating-terminal-btn:hover {
        transform: scale(0.9) translateY(-5px);
    }
}
