:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #475569;
    --secondary-hover: #334155;
    --accent: #10b981;
    --danger: #ef4444;
    --panel-bg: rgba(30, 41, 59, 0.8);
    --modal-bg: #cbd5e1;
    --winbox-header: #94a3b8;
    --winbox-border: #64748b;
    --winbox-text: #0f172a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    margin: 0;
}

/* Fullscreen Container */
#app-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    padding: 0;
}

.aspect-ratio-box {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
}

.content-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

/* Screens */
.screen {
    display: none;
    height: 100%;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.5s ease-in-out;
    overflow-y: auto;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography & Utilities */
h1 { font-size: 3rem; margin-bottom: 1rem; color: var(--primary); text-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
p { font-size: 1.1rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 2rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 10px;
}
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

.primary-btn {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}
.primary-btn:hover { background-color: var(--primary-hover); transform: translateY(-2px); }

.secondary-btn {
    background-color: var(--secondary);
    color: white;
}
.secondary-btn:hover { background-color: var(--secondary-hover); }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover, .btn-outline.selected {
    background-color: var(--primary);
    color: white;
}

/* Home Screen */
#tkj-home-screen .hero {
    margin: 40px auto;
    text-align: center;
    max-width: 900px;
}

/* Guide Screen */
#guide-screen { align-items: center; justify-content: center; }
.guide-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}
.step-card {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    flex: 1 1 250px;
}
.step-card h3 { color: var(--text-main); margin-bottom: 10px; font-size: 1.2rem; }
.step-card p { font-size: 0.95rem; margin-bottom: 0; }

/* Activity Screen */
.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.progress-indicator {
    background: rgba(59, 130, 246, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--primary);
    font-weight: bold;
}

.activity-workspace {
    display: flex;
    flex: 1;
    gap: 30px;
}

/* Topology Panel */
.topology-panel {
    flex: 2;
    background: var(--panel-bg);
    border-radius: 16px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.device {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.device:hover { transform: scale(1.05); }

.device-icon {
    font-size: 3rem;
    background: rgba(255,255,255,0.1);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    margin-bottom: 10px;
    border: 2px solid transparent;
}
.device.active .device-icon { border-color: var(--accent); box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
.device span { font-size: 0.9rem; font-weight: 600; }

.port {
    width: 30px;
    height: 30px;
    background: #333;
    border: 2px solid #555;
    border-radius: 6px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    transition: all 0.2s;
}
.port:hover, .port.highlight { background: var(--accent); border-color: #fff; }
.port.connected { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.ports { display: flex; gap: 5px; }

#dev-isp { top: 30%; left: 20%; transform: translate(-50%, -50%); }
#dev-isp:hover { transform: translate(-50%, -50%) scale(1.05); }

#dev-router { top: 50%; left: 50%; transform: translate(-50%, -50%); }
#dev-router:hover { transform: translate(-50%, -50%) scale(1.05); }

#dev-pc { top: 70%; left: 80%; transform: translate(-50%, -50%); }
#dev-pc:hover { transform: translate(-50%, -50%) scale(1.05); }

.cables-svg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}
.cable {
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 10;
    animation: dash 1s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -20; } }

/* Instruction Panel */
.instruction-panel {
    flex: 1;
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}
.instruction-panel h3 { color: var(--primary); margin-bottom: 15px; }
.instruction-panel p { color: var(--text-main); font-size: 1rem; }

.feedback-area {
    padding: 15px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    min-height: 80px;
}
.feedback-msg { margin: 0; font-size: 0.95rem; }
.feedback-success { color: var(--accent); }
.feedback-error { color: var(--danger); }

/* Virtual Winbox */
.hw-slot {
    position: absolute;
    border: 2px dashed #475569;
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
    z-index: 10;
}

.hw-icon-anim {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 4px;
    animation: dropIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slot-ram .hw-icon-anim {
    transform: rotate(90deg);
}

@keyframes dropIn {
    0% { transform: scale(0) translateY(-30px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.hw-slot.highlight {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}
.winbox-window {
    width: 800px;
    height: 500px;
    background: var(--modal-bg);
    border: 1px solid var(--winbox-border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: var(--winbox-text);
}
.winbox-header {
    background: var(--winbox-header);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom: 1px solid var(--winbox-border);
    user-select: none;
}
.close-winbox {
    background: transparent;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}
.close-winbox:hover { color: var(--danger); }

.winbox-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.winbox-sidebar {
    width: 150px;
    background: #e2e8f0;
    border-right: 1px solid var(--winbox-border);
    padding: 10px 0;
    overflow-y: auto;
}
.winbox-sidebar ul { list-style: none; }
.menu-item {
    padding: 6px 15px;
    cursor: pointer;
    font-size: 0.9rem;
}
.menu-item:hover, .submenu-item:hover { background: var(--primary); color: white; }
.submenu { padding-left: 15px; margin-top: 5px; }
.submenu-item {
    padding: 5px 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.winbox-content {
    flex: 1;
    background: #fff;
    padding: 15px;
    overflow-y: auto;
    position: relative;
}

/* Winbox forms & tables */
.wb-window {
    border: 1px solid var(--winbox-border);
    background: #f8fafc;
    margin-bottom: 10px;
}
.wb-window-header {
    background: #e2e8f0;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--winbox-border);
}
.wb-window-body { padding: 10px; }

.wb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.wb-table th, .wb-table td {
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    text-align: left;
}
.wb-table th { background: #e2e8f0; }

.wb-form-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.wb-form-group label { width: 100px; }
.wb-form-group input, .wb-form-group select {
    flex: 1;
    padding: 4px;
    border: 1px solid var(--winbox-border);
    border-radius: 3px;
}
.wb-btn {
    padding: 4px 12px;
    background: #e2e8f0;
    border: 1px solid var(--winbox-border);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
}
.wb-btn:hover { background: #cbd5e1; }
.wb-btn-primary { background: var(--primary); color: white; border-color: var(--primary-hover); }
.wb-btn-primary:hover { background: var(--primary-hover); }

/* Terminal */
.terminal-window {
    background: #000;
    color: #0f0;
    font-family: monospace;
    padding: 10px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.terminal-output { flex: 1; white-space: pre-wrap; font-size: 14px;}
.terminal-input-line { display: flex; align-items: center; }
.terminal-input-line span { margin-right: 8px; font-size: 14px;}
.terminal-input {
    background: transparent;
    border: none;
    color: #0f0;
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    outline: none;
}

/* Dashboard Styles */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}
.dash-card {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: transform 0.3s;
    text-align: left;
    display: flex;
    flex-direction: column;
}
.dash-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.dash-card p {
    flex-grow: 1;
}
.card-icon { font-size: 3rem; margin-bottom: 15px; }

/* Cabling Activity Styles */
#cabling-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    justify-content: center;
}
.rj45-container {
    margin-bottom: 30px;
    text-align: center;
}
.rj45-connector {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border: 4px solid #fff;
    border-radius: 10px 10px 0 0;
    position: relative;
    padding-top: 20px;
    border-bottom: none;
}
.rj45-pins {
    display: flex;
    justify-content: space-evenly;
    height: 100%;
}
.pin {
    width: 25px;
    height: 100%;
    background: rgba(0,0,0,0.5);
    border-left: 1px solid rgba(255,255,255,0.2);
    border-right: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.pin.filled {
    border-top: 5px solid gold;
}

.wire-pool {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 400px;
}
.wire {
    width: 30px;
    height: 100px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid rgba(0,0,0,0.5);
}
.wire:hover { transform: translateY(-10px); }
.wire.selected { transform: translateY(-15px); box-shadow: 0 0 10px white; }
.wire.used { opacity: 0.2; pointer-events: none; }

/* Wire Colors */
.w-po { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #f97316 5px, #f97316 10px); }
.w-o  { background: #f97316; }
.w-ph { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #22c55e 5px, #22c55e 10px); }
.w-b  { background: #3b82f6; }
.w-pb { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #3b82f6 5px, #3b82f6 10px); }
.w-h  { background: #22c55e; }
.w-pc { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #78350f 5px, #78350f 10px); }
.w-c  { background: #78350f; }

/* LAN Tester */
.tester-device {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}
.tester-unit {
    background: #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    width: 120px;
    text-align: center;
    color: #0f172a;
}
.tester-unit h4 { margin-bottom: 15px; font-size: 0.9rem; }
.led-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.led {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    position: relative;
}
.led::after {
    content: attr(data-num);
    position: absolute;
    left: -20px;
    top: 0;
    font-size: 10px;
    font-weight: bold;
    color: #333;
}
.led.on {
    background: #10b981;
    box-shadow: 0 0 10px #10b981, inset 0 1px 2px rgba(255,255,255,0.8);
}
.led.error {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

/* ==========================================
   PC ASSEMBLY STYLING
   ========================================== */
.mobo-wrapper {
    width: 100%;
    max-width: 380px;
    position: relative;
    margin: 0 auto;
}
.mobo-wrapper::before {
    content: "";
    display: block;
    padding-top: 100%; /* For 1:1 aspect ratio across all browsers */
}
.mobo-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.mobo-bg {
    position: absolute;
    width: 60.52%; /* 230 / 380 */
    height: 84.21%; /* 320 / 380 */
    background: #064e3b; /* Dark Green Motherboard PCB */
    border: 2px solid #047857;
    border-radius: 5px;
    top: 7.89%; /* 30 / 380 */
    left: 7.89%;
    color: rgba(255,255,255,0.1);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
}

.hw-slot {
    position: absolute;
    border: 2px dashed #475569;
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
    z-index: 10;
}

.hw-slot.highlight {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    animation: pulseSlot 1s infinite;
}

.hw-slot.installed {
    border-style: solid;
    border-color: #10b981;
    background: #1e293b;
    color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

@keyframes pulseSlot {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.hw-icon-anim {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 4px;
    animation: fadeInIcon 0.4s ease-out;
}

.slot-ram .hw-icon-anim {
    transform: rotate(90deg);
}

@keyframes fadeInIcon {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Specific Slot Positions */
.slot-cpu { width: 18.42%; height: 18.42%; top: 21.05%; left: 23.68%; }
.slot-ram { width: 5.26%; height: 26.31%; top: 17.1%; left: 50%; writing-mode: vertical-rl; text-orientation: mixed; }
.slot-vga { width: 42.1%; height: 5.26%; top: 65.78%; left: 13.15%; }
.slot-psu { width: 23.68%; height: 21.05%; top: 5.26%; left: 71.05%; background: rgba(0,0,0,0.5); border-color: #64748b; }
.slot-storage { width: 18.42%; height: 26.31%; top: 68.42%; left: 73.68%; background: rgba(0,0,0,0.5); border-color: #64748b; }

/* Inventory Styling */
.hw-inventory {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}
.hw-item {
    background: #334155;
    border: 1px solid #475569;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.hw-item:hover {
    background: #475569;
}
.hw-item.selected {
    background: #3b82f6;
    border-color: #60a5fa;
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}
.hw-item.installed {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
    background: #1e293b;
}

/* PC Boot Animation */
.pc-booting .mobo-bg {
    box-shadow: 0 0 30px #10b981;
    border-color: #10b981;
}
.pc-booting .installed {
    box-shadow: 0 0 20px #10b981;
}
.pc-error .mobo-bg {
    box-shadow: 0 0 30px #ef4444;
    border-color: #ef4444;
}

/* ==========================================
   WI-FI NETWORK STYLING
   ========================================== */
#wifi-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 0;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid #3b82f6;
    opacity: 0;
}

.wave1 { width: 50px; height: 50px; animation: ripple 2s infinite; }
.wave2 { width: 100px; height: 100px; animation: ripple 2s infinite 0.5s; }
.wave3 { width: 150px; height: 150px; animation: ripple 2s infinite 1s; }

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.wifi-network-item {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wifi-network-item:hover {
    background: #e2e8f0;
}
.wifi-network-item.selected {
    background: #eff6ff;
    border-color: #3b82f6;
}

/* ==========================================
   NETWORK TOPOLOGY STYLING
   ========================================== */
.topo-mode-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    border: 1px solid #475569;
    cursor: pointer;
}
.topo-mode-btn.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    font-weight: bold;
}
.topo-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
}
.topo-port {
    width: 15px;
    height: 15px;
    background: #94a3b8;
    border: 2px solid #fff;
    border-radius: 50%;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
.topo-port { margin-top: 10px; }
.topo-port:hover, .topo-port.highlight {
    background: #f59e0b;
    transform: scale(1.2);
    box-shadow: 0 0 10px #f59e0b;
}
.topo-port.connected {
    background: #10b981;
    border-color: #064e3b;
}
.bb-port {
    background: #e2e8f0;
    border-color: #334155;
    transform: translateY(-11px); /* Adjusted for 30px port size */
}

/* ==========================================
   FIBER OPTIC SPLICING STYLING
   ========================================== */
.fo-tool.disabled, .fo-test-tool.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.fo-laser-beam {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: laser-pulse 0.5s alternate infinite;
}

@keyframes laser-pulse {
    0% { opacity: 0.6; box-shadow: 0 0 5px #ef4444; }
    100% { opacity: 1; box-shadow: 0 0 15px #ef4444; }
}

@keyframes arc-flash {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

#splicer-monitor {
    width: 100% !important;
    max-width: 320px;
    height: 220px;
}

@media (max-width: 1024px) {
    .screen {
        padding: 15px;
    }
    .activity-workspace {
        flex-direction: column;
    }
    .inventory-grid {
        grid-template-columns: 1fr;
    }
    #splicer-monitor {
        height: auto !important;
        aspect-ratio: 4/3;
    }
    .topology-panel {
        min-height: 400px;
    }
    .fo-tool span, .fo-test-tool span {
        font-size: 0.8rem;
    }
    /* Mobile Modals (Winbox, AP, dsb) */
    .winbox-window {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0 !important;
    }
    .winbox-body {
        flex-direction: column;
        overflow-y: auto;
    }
    .winbox-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--winbox-border);
    }
    .wb-form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .wb-form-group label {
        width: 100% !important;
        margin-bottom: 5px;
    }
    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .activity-header h2 {
        font-size: 1.5rem;
    }
    .progress-indicator {
        font-size: 0.9rem;
    }
    .hw-slot {
        font-size: 0.6rem; /* Smaller text for mobile slots */
    }
    /* Perakitan PC (Scale) is now handled natively via % and aspect-ratio */
    #assembly-workspace {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
    }
    /* Dashboard & Cards */
    .dash-card {
        min-width: 100%;
    }
    /* LAN Tester */
    .tester-device {
        flex-direction: column;
        align-items: center;
    }
    /* Fiber Optik OPM */
    #opm-display {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin-top: 20px;
        width: 100% !important;
        max-width: 250px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hw-slot {
        font-size: 0.5rem;
    }
    .hw-icon-anim {
        font-size: 1.2rem;
    }
    /* Fiber Optik Cables */
    #fo-cable-left { transform: scale(0.6); transform-origin: left center; }
    #fo-cable-right { transform: scale(0.6); transform-origin: right center; }
    #opm-display {
        padding: 10px;
    }
    #opm-display #opm-value { font-size: 1.2rem; }
}

