/* Mini Terminal Styles */
.mini-terminal {
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
    font-family: 'Courier New', Courier, monospace;
    width: 100%;
    max-width: 400px;
    /* Limit width */
    margin: 0 auto;
    /* Center it */
}

.mini-terminal:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 0, 0.2);
    border-color: #0f0;
}

.mini-terminal-header {
    background-color: #2d2d2d;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.mini-terminal-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.mini-terminal-header .dot.red {
    background-color: #ff5f56;
}

.mini-terminal-header .dot.yellow {
    background-color: #ffbd2e;
}

.mini-terminal-header .dot.green {
    background-color: #27c93f;
}

.mini-terminal-header .title {
    margin-left: auto;
    margin-right: auto;
    color: #ccc;
    font-size: 0.8rem;
    font-family: 'Segoe UI', sans-serif;
}

.mini-terminal-body {
    background-color: #0c0c0c;
    padding: 15px;
    color: #0f0;
    font-size: 0.9rem;
    min-height: 60px;
    /* Give it some height */
    display: flex;
    align-items: center;
}

.mini-terminal-body .prompt {
    color: #00bfff;
    margin-right: 8px;
}

/* Terminal Modal Styles */
.ctf-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ctf-modal.show {
    display: flex;
    opacity: 1;
}

.terminal-window {
    width: 80%;
    max-width: 800px;
    height: 60vh;
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #333;
}

.ctf-modal.show .terminal-window {
    transform: scale(1);
}

/* Game Window Specific Styles */
.terminal-window.game-window {
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    border: 1px solid #444;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.terminal-btn.close-game {
    background-color: #ff5f56;
    cursor: pointer;
}

.terminal-body.game-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    /* Important for nested flex scroll/height */
    padding: 0 !important;
    overflow: hidden !important;
}

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

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

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-btn.close {
    background-color: #ff5f56;
    cursor: pointer;
}

.terminal-btn.minimize {
    background-color: #ffbd2e;
}

.terminal-btn.maximize {
    background-color: #27c93f;
}

.terminal-title {
    color: #ccc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
}

.terminal-body {
    flex-grow: 1;
    background-color: #0c0c0c;
    /* Deep black */
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    color: #0f0;
    /* Hacker Green */
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.5;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: #0f0;
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.command-line {
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.prompt {
    color: #00bfff;
    /* Blue prompt */
    margin-right: 10px;
    white-space: nowrap;
}

.output {
    color: #ccc;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-word;
}

.success {
    color: #0f0;
}

.error {
    color: #ff5f56;
}

.warning {
    color: #ffbd2e;
}

.info {
    color: #3498db;
}

/* Interactive Input Styles */
.terminal-input {
    background: transparent;
    border: none;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    outline: none;
    flex-grow: 1;
    caret-color: #0f0;
    padding: 0;
    margin: 0;
}

.terminal-input::selection {
    background: #0f0;
    color: #000;
}


