/* =========================================
   Terminal Simulator
   عرّاب الشبكات
========================================= */

.terminal-page {
    min-height: 100vh;
}


/* HERO */

.terminal-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 42px 20px 35px;
}

.terminal-hero-banner {
    position: relative;
    width: 100%;
    height: clamp(300px, 35vw, 400px);
    overflow: hidden;
    border: 1px solid rgba(232, 189, 85, .38);
    border-radius: 20px;
    background: #090c11;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

.terminal-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.terminal-hero-overlay-text {
    position: absolute;
    top: 44%;
    right: clamp(20px, 5vw, 64px);
    width: min(40%, 430px);
    margin: 0;
    padding: 20px 24px;
    transform: translateY(-50%);
    border-right: 4px solid #e8bd55;
    border-radius: 10px;
    background: rgba(7, 9, 13, .68);
    color: #ffe29a;
    font-size: clamp(20px, 2.5vw, 29px);
    font-weight: 800;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
    backdrop-filter: blur(3px);
}

.terminal-hero-overlay-text h1,
.terminal-hero-overlay-text p {
    margin: 0;
    color: #ffe29a;
    font-size: inherit;
    font-weight: 800;
    line-height: 1.6;
}

.terminal-hero-overlay-text p {
    font-size: 15px;
    white-space: nowrap;
}

.terminal-badge {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: #111111;
    color: #d6c58f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.terminal-hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
}

.terminal-hero p {
    margin: 0;
    font-size: 17px;
    opacity: 0.8;
}


/* WRAPPER */

.terminal-wrapper {
    width: min(1100px, calc(100% - 30px));
    margin: 22px auto 70px;
}


/* CONTROLS */

.terminal-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.terminal-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.terminal-label {
    font-size: 13px;
    font-weight: 800;
    opacity: 0.7;
}

.terminal-device,
.terminal-reset {
    border: 1px solid rgba(17, 17, 17, 0.15);
    background: #d6c58f;
    color: #111111;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.terminal-device:hover,
.terminal-reset:hover {
    transform: translateY(-1px);
}

.terminal-device.active {
    background: #111111;
    color: #d6c58f;
}

.terminal-reset {
    margin-right: auto;
}

.device-name {
    font-weight: 900;
    padding: 9px 14px;
    background: rgba(17, 17, 17, 0.06);
    border-radius: 9px;
}


/* TERMINAL */

.terminal-window {
    background: #111111;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}


/* TOP BAR */

.terminal-topbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 0 18px;
    background: #1b1b1b;
    color: #dddddd;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.status-dot {
    width: 9px;
    height: 9px;
    background: #5ca66b;
    border-radius: 50%;
}

.terminal-model {
    font-size: 12px;
    opacity: 0.6;
}


/* OUTPUT */

.terminal-output {
    min-height: 360px;
    max-height: 440px;
    overflow-y: auto;
    padding: 22px;
    color: #e7e7e7;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
}

.terminal-line {
    margin-bottom: 5px;
}

.terminal-command {
    color: #f0d98a;
}

.terminal-info {
    color: #bdbdbd;
}

.terminal-error {
    color: #d9aaa5;
}

.terminal-success {
    color: #b7d9c0;
}


/* INPUT */

.terminal-input-area {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 20px;
    background: #151515;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    direction: ltr;
}

.terminal-prompt {
    color: #b7d9c0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

#terminalInput {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
}

#terminalInput::placeholder {
    color: #777777;
}


/* HELP */

.terminal-help {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 20px;
    background: #d6c58f;
    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 15px;
}

.help-icon {
    font-size: 25px;
}

.terminal-help h2 {
    margin: 0 0 7px;
    font-size: 18px;
}

.terminal-help p {
    margin: 0;
    line-height: 1.8;
    opacity: 0.82;
}

.terminal-help code {
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(17, 17, 17, 0.08);
}


/* SUPPORTED COMMANDS */

.supported-commands {
    margin-top: 35px;
}

.section-heading span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #075985;
}

.section-heading h2 {
    margin: 5px 0 16px;
    font-size: 24px;
}

.command-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.command-chips button {
    border: 1px solid rgba(17, 17, 17, 0.13);
    background: #d6c58f;
    color: #111111;
    padding: 9px 13px;
    border-radius: 9px;
    font-family: Consolas, "Courier New", monospace;
    cursor: pointer;
    transition: 0.2s ease;
}

.command-chips button:hover {
    background: #111111;
    color: #d6c58f;
}


/* MOBILE */

@media (max-width: 700px) {

    .terminal-hero {
        padding-top: 45px;
    }

    .terminal-hero-banner {
        height: 260px;
    }

    .terminal-hero-overlay-text {
        right: 12px;
        width: calc(100% - 24px);
        padding: 12px 14px;
        font-size: 19px;
    }

    .terminal-hero-overlay-text p {
        font-size: 13px;
    }

    .terminal-controls {
        align-items: stretch;
    }

    .terminal-control-group {
        width: 100%;
    }

    .terminal-device {
        flex: 1;
    }

    .terminal-reset {
        width: 100%;
        margin-right: 0;
    }

    .terminal-output {
        min-height: 300px;
        max-height: 360px;
        padding: 16px;
        font-size: 13px;
    }

    .terminal-input-area {
        padding: 14px;
    }

    .terminal-help {
        padding: 16px;
    }

}

@media (max-width: 380px) {
    .terminal-hero-overlay-text p {
        font-size: 12px;
    }
}
/* =========================================
   Fault Scenarios
========================================= */

.fault-scenarios {
    margin-top: 35px;
    padding: 24px;
    background: #d6c58f;
    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 16px;
}

.fault-scenarios-intro {
    margin: -8px 0 18px;
    opacity: 0.75;
    line-height: 1.7;
}

.fault-scenario-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.fault-scenario-button {
    min-height: 80px;
    padding: 14px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #111111;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.fault-scenario-button:hover {
    background: #111111;
    color: #d6c58f;
    transform: translateY(-2px);
}

.fault-scenario-status {
    margin-top: 16px;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(17, 17, 17, 0.07);
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 900px) {

    .fault-scenario-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .fault-scenario-grid {
        grid-template-columns: 1fr;
    }

}
