/* assets/css/terminal.css */
/* Only apply inside .terminal-window to avoid leaking to other pages */

.terminal-window {
    width: 100%;
    max-width: 800px;               /* bit wider for comfort */
    margin: 0 auto;
    background: #0f0f0f;            /* deeper black for cyberpunk */
    border: 1px solid #FF4500;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.25), 0 25px 50px -12px rgba(0,0,0,0.6);
    overflow: hidden;
    font-family: 'Orbitron', "Courier New", Courier, monospace;
}

[data-theme="light"] .terminal-window {
    background: #111111;
    border-color: #FF7518;
    box-shadow: 0 0 25px rgba(255, 117, 24, 0.4);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #FF450033;
}

[data-theme="light"] .terminal-header {
    background: #222;
    border-bottom-color: #FF751833;
}

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

.buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}

.close    { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.title {
    flex: 1;
    text-align: center;
    color: #FF4500;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    pointer-events: none;
}

.terminal-body {
    padding: 20px;
    height: 420px;                  /* taller for more output */
    overflow-y: auto;
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.6;
    background: linear-gradient(to bottom, #0a0a0a, #111);
}

[data-theme="light"] .terminal-body {
    background: linear-gradient(to bottom, #1a1a1a, #222);
    color: #f0f0f0;
}

.line { margin-bottom: 10px; }

.highlight {
    color: #FF4500;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255,69,0,0.7);
}

[data-theme="light"] .highlight {
    color: #FF7518;
    text-shadow: 0 0 8px rgba(255,117,24,0.8);
}

.prompt {
    color: #FF4500;
    margin-right: 10px;
    font-weight: bold;
}

[data-theme="light"] .prompt {
    color: #FF7518;
}

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

#term-input {
    background: transparent;
    border: none;
    color: #e5e5e5;
    font-family: inherit;
    font-size: 1.05rem;
    outline: none;
    flex-grow: 1;
    caret-color: #FF4500;
}

[data-theme="light"] #term-input {
    color: #f5f5f5;
    caret-color: #FF7518;
}

/* Scrollbar styling (cyberpunk glow) */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}
.terminal-body::-webkit-scrollbar-track {
    background: #111;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: #FF4500;
    border-radius: 4px;
    box-shadow: 0 0 10px #FF4500;
}
[data-theme="light"] .terminal-body::-webkit-scrollbar-thumb {
    background: #FF7518;
    box-shadow: 0 0 12px #FF7518;
}
/* typing cursor animation */
.typing::after {
    content: "▋";
    margin-left: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
#terminal-init{
display:flex;
justify-content:center;
align-items:center;
height:300px;
}

#init-btn{
background:black;
color:#00ff9c;
border:1px solid #00ff9c;
padding:12px 24px;
font-family:monospace;
font-size:16px;
cursor:pointer;
transition:0.2s;
}

#init-btn:hover{
background:#00ff9c;
color:black;
}

.access-granted {
    color: #00ff9c !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 255, 156, 0.6);
}

[data-theme="light"] .access-granted {
    color: #00ff9c !important;
    text-shadow: 0 0 10px rgba(0, 255, 156, 0.7);
}

.help-highlight {
    color: #FF4500 !important;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 69, 0, 0.7);
}

[data-theme="light"] .help-highlight {
    color: #FF7518 !important;
    text-shadow: 0 0 8px rgba(255, 117, 24, 0.8);
}

/* RZ IDE Viewer Styles */
.rz-ide-container {
    height: 100%;
    display: flex;
    font-family: 'Consolas', 'Monaco', monospace;
    background: #0f172a;
}

.rz-ide {
    flex: 1;
    display: flex;
    height: 100%;
}

.rz-ide-sidebar {
    width: 220px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 20px 0;
}

.rz-sidebar-title {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 0 15px 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.rz-file-item {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    color: #cbd5e1;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.rz-file-item:hover {
    background: #334155;
    color: #f1f5f9;
}

.rz-file-item.active {
    background: #0f172a;
    color: #FF7518;
    border-left-color: #FF7518;
}

.rz-ide-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0f172a;
}

.rz-ide-tabs {
    display: flex;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.rz-tab {
    padding: 12px 20px;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    border-right: 1px solid #334155;
    transition: all 0.2s;
}

.rz-tab:last-child {
    border-right: none;
}

.rz-tab.active {
    background: #0f172a;
    color: #f1f5f9;
}

.rz-ide-editor {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.rz-code-view {
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    display: none;
}

.rz-code-view.active-code {
    display: block;
}

.rz-code-line {
    display: flex;
    line-height: 1.6;
    margin-bottom: 2px;
}

.rz-line-num {
    width: 40px;
    color: #64748b;
    font-size: 12px;
    user-select: none;
}

.kw { color: #89b4fa; font-weight: 600; }
.var { color: #f38ba8; }
.obj { color: #a6e3a1; }
.func { color: #fab387; }
.str { color: #f9e2af; }

/* VS Code-style File Tree */
.rz-file-tree {
  padding: 10px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 13px;
}

.rz-folder {
  margin-bottom: 2px;
}

.rz-tree-item {
  padding: 4px 8px 4px 24px;
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  transition: background 0.2s;
  user-select: none;
}

.rz-tree-item:hover {
  background: #334155;
}

.rz-tree-item.active {
  background: #0f172a;
  color: #FF7518;
}

.folder-item {
  font-weight: 500;
  color: #facc15;
}

.file-item {
  color: #e2e8f0;
}

.rz-tree-item i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

.folder-chevron {
  position: absolute;
  left: 4px;
  transition: transform 0.2s;
}

.rz-folder-children {
  display: none;
  padding-left: 16px;
  border-left: 1px solid #475569;
  margin-left: 8px;
}

.rz-tab-placeholder {
  padding: 20px;
  color: #94a3b8;
  text-align: center;
}

.rz-code-view .code-content {
  flex: 1;
  white-space: pre-wrap;
  font-family: 'Fira Code', 'Consolas', monospace;
}

/* ===== DESKTOP MODE ===== */

.desktop {
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  overflow: hidden;
  color: white;
  font-family: 'Segoe UI', sans-serif;
}

/* ICONS */
.desktop-icons {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.icon {
  width: 80px;
  text-align: center;
  cursor: pointer;
  font-size: 30px;
}

.icon span {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

/* TASKBAR */
.taskbar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40px;
  background: rgba(20, 20, 20, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-top: 1px solid #000;
}

/* START BUTTON */
.start-btn {
  cursor: pointer;
  font-size: 18px;
  padding: 5px 10px;
}

.start-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* CLOCK */
.taskbar-time {
  font-size: 13px;
}

/* START MENU */
.start-menu {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 200px;
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid #000;
  display: none;
  flex-direction: column;
}

.start-menu.open {
  display: flex;
}

.start-item {
  padding: 10px;
  cursor: pointer;
}

.start-item:hover {
  background: rgba(255,255,255,0.1);
}

/* ===== WINDOWS 11 STYLE DESKTOP ===== */

.desktop {
  width: 100%;
  height: 100%;
  background: url('https://wallpaperaccess.com/full/317501.jpg') center/cover no-repeat;
  position: relative;
  font-family: 'Segoe UI', sans-serif;
}

/* ICONS */
.desktop-icons {
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 70px);
  gap: 15px;
}

.icon {
  text-align: center;
  font-size: 22px;
  cursor: pointer;
}

.icon span {
  font-size: 11px;
  display: block;
}

/* TASKBAR */
.taskbar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 48px;
  backdrop-filter: blur(15px);
  background: rgba(20,20,20,0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
}

.taskbar-center {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex: 1;
}

.task-icon {
  font-size: 20px;
  cursor: pointer;
}

/* START MENU */
.start-menu {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: rgba(30,30,30,0.9);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  display: none;
  padding: 15px;
}

.start-menu.open {
  display: block;
}

.start-app {
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.start-app:hover {
  background: rgba(255,255,255,0.1);
}

/* WINDOWS */
.window {
  position: absolute;
  width: 400px;
  height: 300px;
  background: rgba(40,40,40,0.9);
  backdrop-filter: blur(20px);
  border-radius: 10px;
  overflow: hidden;
}

.window-header {
  background: rgba(20,20,20,0.8);
  padding: 8px;
  display: flex;
  justify-content: space-between;
  cursor: move;
}

.window-body {
  padding: 10px;
  height: calc(100% - 40px);
  overflow: auto;
}

/* FILE EXPLORER */
.explorer .folder,
.explorer .file {
  padding: 6px;
  cursor: pointer;
}

.explorer .folder:hover,
.explorer .file:hover {
  background: rgba(255,255,255,0.1);
}

/* NOTEPAD */
.notepad {
  width: 100%;
  height: 100%;
  background: transparent;
  color: white;
  border: none;
  outline: none;
}

.desktop {
  width: 100%;
  height: 100%;
  position: relative;
  background: url("https://wallpaperaccess.com/full/2637581.jpg") center/cover;
}

.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.icon {
  width: 70px;
  text-align: center;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

.icon span {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.taskbar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 48px;
  backdrop-filter: blur(20px);
  background: rgba(20,20,20,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.taskbar-inner {
  display: flex;
  gap: 12px;
}

.taskbar-right {
  position: absolute;
  right: 15px;
  color: white;
  font-size: 12px;
}

.start-menu {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 500px;
  background: rgba(30,30,30,0.85);
  backdrop-filter: blur(30px);
  border-radius: 16px;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}

.start-menu.open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.start-item {
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
}

.start-recommended {
  margin-top: 20px;
  font-size: 12px;
  color: #aaa;
}

.window {
  position: absolute;
  width: 400px;
  background: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.window-header {
  background: #2a2a2a;
  padding: 8px;
  cursor: grab;
  display: flex;
  justify-content: space-between;
}

.macos-wrapper,
.windows-wrapper {
  width: 100%;
  height: 100%;
  background: black;
}

.macos-frame,
.windows-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.tv-wrapper {
  width: 100%;
  height: 100%;
  background: black;
}

.tv-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.webapp-wrapper {
  width: 100%;
  height: 100%;
  background: black;
}

.webapp-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.pcfolio-wrapper {
  width: 100%;
  height: 100%;
  background: black;
}

.pcfolio-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.html-wrapper {
  width: 100%;
  height: 100%;
  background: black;
}

.html-frame {
  width: 100%;
  height: 100%;
  border: none;
}
