/* ==========================================================================
   Interactive Lab Simulations Stylesheet
   Developed by Ashish Vegan (https://www.ashishvegan.com)
   ========================================================================== */

/* Simulator Shell & Base Styles */
.sim-container {
    background: #0d121f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: #e2e8f0;
}

.sim-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sim-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.sim-controls-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sim-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sim-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-cyan);
}

.sim-btn.active {
    background: var(--grad-primary);
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.sim-btn-action {
    background: var(--grad-secondary);
    border-color: transparent;
    color: #ffffff;
    font-weight: 700;
}

.sim-btn-action:hover {
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   1. RJ45 Cable Crimper & LED Tester Simulator (Practical 6)
   -------------------------------------------------------------------------- */
.crimper-sim-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.crimper-wires-stage {
    background: #080c16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.crimper-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.crimper-stage-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #94a3b8;
}

.wire-channel-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.4rem;
    height: 180px;
    padding: 1rem 0.5rem 0;
    background: #030712;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.rj45-plug-housing {
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 60px;
    background: rgba(6, 182, 212, 0.12);
    border: 2px solid rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
}

.plug-pin-prong {
    width: 8px;
    height: 18px;
    background: #eab308;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.crimped .plug-pin-prong {
    transform: translateY(12px);
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.wire-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    z-index: 1;
}

.wire-cable-line {
    width: 14px;
    height: 110px;
    border-radius: 4px 4px 0 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: height 0.3s ease;
}

.wire-pin-number {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.wire-color-name {
    font-size: 0.65rem;
    color: var(--text-subtle);
    text-align: center;
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* Authentic Twisted Pair Color Patterns */
.color-white-orange {
    background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #ea580c 4px, #ea580c 8px);
    border: 1px solid #c2410c;
}
.color-orange {
    background: #ea580c;
    border: 1px solid #c2410c;
}
.color-white-green {
    background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #16a34a 4px, #16a34a 8px);
    border: 1px solid #15803d;
}
.color-blue {
    background: #2563eb;
    border: 1px solid #1d4ed8;
}
.color-white-blue {
    background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #2563eb 4px, #2563eb 8px);
    border: 1px solid #1d4ed8;
}
.color-green {
    background: #16a34a;
    border: 1px solid #15803d;
}
.color-white-brown {
    background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #854d0e 4px, #854d0e 8px);
    border: 1px solid #713f12;
}
.color-brown {
    background: #854d0e;
    border: 1px solid #713f12;
}

/* Master & Remote LED Cable Tester */
.tester-box-stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

@media (min-width: 640px) {
    .tester-box-stage { grid-template-columns: 1fr 1fr; }
}

.tester-unit {
    background: #111827;
    border: 2px solid #1f2937;
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tester-unit-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.tester-leds-row {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tester-led-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.led-bulb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1f2937;
    border: 1px solid #374151;
    transition: all 0.15s ease;
}

.led-bulb.lit {
    background: #22c55e;
    border-color: #4ade80;
    box-shadow: 0 0 10px #22c55e, 0 0 20px #22c55e;
}

.led-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #64748b;
}

.tester-status-bar {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #38bdf8;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   2. Live IPv4 Subnet Calculator (Practical 7)
   -------------------------------------------------------------------------- */
.subnet-calc-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.calc-inputs-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .calc-inputs-row { grid-template-columns: 2fr 1fr auto; }
}

.calc-input-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.calc-input {
    width: 100%;
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #ffffff;
}

.calc-input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.calc-select {
    width: 100%;
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #ffffff;
    cursor: pointer;
}

.calc-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .calc-results-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .calc-results-grid { grid-template-columns: repeat(3, 1fr); }
}

.calc-res-card {
    background: #080c16;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.calc-res-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.calc-res-value {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: #67e8f9;
    word-break: break-all;
}

.calc-res-sub {
    font-size: 0.75rem;
    color: var(--text-subtle);
    margin-top: 0.2rem;
}

.binary-row {
    grid-column: 1 / -1;
    background: #030712;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.binary-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 0.4rem;
}

.binary-code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #a5b4fc;
    letter-spacing: 0.05em;
    word-break: break-all;
}

/* --------------------------------------------------------------------------
   3. Live Linux Terminal Sandbox (Practical 10)
   -------------------------------------------------------------------------- */
.terminal-window {
    background: #040810;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 380px;
}

.terminal-titlebar {
    background: #0f172a;
    padding: 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #1e293b;
}

.terminal-btn-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: 0.5rem;
}

.terminal-screen {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: #f1f5f9;
    line-height: 1.5;
}

.term-welcome {
    color: #38bdf8;
    margin-bottom: 0.85rem;
}

.term-history-entry {
    margin-bottom: 0.65rem;
}

.term-prompt-line {
    color: #34d399;
    font-weight: 600;
}

.term-user-cmd {
    color: #ffffff;
}

.term-output {
    color: #cbd5e1;
    margin-top: 0.2rem;
    white-space: pre-wrap;
}

.term-error {
    color: #f87171;
}

.term-input-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.term-prompt-current {
    color: #34d399;
    font-weight: 600;
    white-space: nowrap;
}

.term-cli-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    caret-color: #00f2fe;
}

.term-quick-chips {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.85rem;
    background: #0b1120;
    border-top: 1px solid #1e293b;
    overflow-x: auto;
}

.term-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
}

.term-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   4. 802.1Q VLAN Switch Visualizer (Practical 13)
   -------------------------------------------------------------------------- */
.vlan-switch-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.vlan-ports-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    background: #030712;
    border: 2px solid #1e293b;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

@media (min-width: 640px) {
    .vlan-ports-grid { grid-template-columns: repeat(8, 1fr); }
}

.vlan-port-card {
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.vlan-port-card:hover {
    transform: translateY(-2px);
}

.port-num-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
}

.port-rj45-icon {
    width: 20px;
    height: 18px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 3px;
    position: relative;
}

.port-rj45-icon::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 4px;
    right: 4px;
    height: 4px;
    background: #64748b;
    border-radius: 1px;
}

.port-vlan-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* VLAN Color Assignments */
.port-vlan-10 {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}
.port-vlan-10 .port-vlan-tag {
    background: #1d4ed8;
    color: #ffffff;
}

.port-vlan-20 {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}
.port-vlan-20 .port-vlan-tag {
    background: #047857;
    color: #ffffff;
}

.port-vlan-trunk {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}
.port-vlan-trunk .port-vlan-tag {
    background: #7e22ce;
    color: #ffffff;
}

.vlan-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.vlan-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.swatch-vlan10 { background: #3b82f6; }
.swatch-vlan20 { background: #10b981; }
.swatch-trunk { background: #a855f7; }

.vlan-simulation-log {
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #67e8f9;
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* --------------------------------------------------------------------------
   5. Motherboard & Hardware Assembly Explorer (Practical 2)
   -------------------------------------------------------------------------- */
.mb-explorer-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .mb-explorer-wrap { grid-template-columns: 1.4fr 1fr; }
}

.mb-board-diagram {
    background: #030e07;
    border: 3px solid #14532d;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 75px);
    gap: 0.65rem;
}

.mb-zone {
    border: 1px dashed rgba(34, 197, 94, 0.4);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 83, 45, 0.2);
    color: #86efac;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0.25rem;
    text-align: center;
}

.mb-zone:hover, .mb-zone.selected {
    background: rgba(34, 197, 94, 0.45);
    border-color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
    color: #ffffff;
    transform: scale(1.02);
}

.mb-zone-cpu { grid-column: 1 / 3; grid-row: 1 / 3; }
.mb-zone-ram { grid-column: 3 / 4; grid-row: 1 / 3; }
.mb-zone-atx { grid-column: 4 / 5; grid-row: 1 / 2; }
.mb-zone-pcie { grid-column: 1 / 4; grid-row: 3 / 4; }
.mb-zone-m2 { grid-column: 1 / 3; grid-row: 4 / 5; }
.mb-zone-sata { grid-column: 4 / 5; grid-row: 3 / 4; }
.mb-zone-fp { grid-column: 4 / 5; grid-row: 4 / 5; }

.mb-component-info {
    background: #080c16;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.mb-info-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #67e8f9;
    margin-bottom: 0.5rem;
}

.mb-info-specs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.mb-info-specs li strong {
    color: #ffffff;
}

.mb-install-tip {
    margin-top: auto;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 0.75rem;
    font-size: 0.82rem;
    color: #fef3c7;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* --------------------------------------------------------------------------
   6. Triad Architecture Explorer (Pre-Lab 1)
   -------------------------------------------------------------------------- */
.triad-flow-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.triad-layers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .triad-layers-grid { grid-template-columns: repeat(3, 1fr); }
}

.triad-layer-card {
    background: #080c16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.triad-layer-card.highlighted {
    border-color: var(--color-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.08);
}

.triad-layer-header {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.triad-layer-elements {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.triad-log-display {
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #34d399;
    min-height: 60px;
    display: flex;
    align-items: center;
}
