/* =========================================================
   SkillSphere AI – FINAL GLOBAL STABLE VERSION
   ========================================================= */

/* ===============================
   🎨 THEME SYSTEM
================================ */

:root {
  --bg-main: #03060c;
  --bg-deep: #010309;
  --panel-bg: rgba(8, 16, 30, 0.95);

  --neon: #00f6ff;
  --text-main: #c8f7ff;

  --green: #00ff9c;
  --red: #ff4c4c;
}

html[data-theme="bright"] {
  --bg-main: #f4f0ff;
  --bg-deep: #e4dbff;
  --panel-bg: #ffffff;

  --neon: #6a00ff;
  --text-main: #1c1c2b;

  --green: #00c853;
  --red: #d50000;
}

/* ================= GLOBAL RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Orbitron, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, var(--bg-main), var(--bg-deep));
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

/* ================= MATRIX ================= */

#matrix {
  position: fixed;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="bright"] #matrix {
  opacity: 0.05;
}

/* ================= LAYOUT ================= */

.system-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.hud-panel {
  width: 100%;
  max-width: 500px;
  padding: 30px;
  background: var(--panel-bg);
  border: 1px solid var(--neon);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,246,255,0.25);
}

html[data-theme="bright"] .hud-panel {
  box-shadow: 0 12px 30px rgba(106, 0, 255, 0.15);
  border: 1px solid rgba(106, 0, 255, 0.25);
}

/* ================= TITLES ================= */

.hud-title {
  text-align: center;
  color: var(--neon);
  margin-bottom: 20px;
}

.hero-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 10px;
}

.hero-tagline {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 20px;
}

/* ================= FORMS ================= */

input, textarea, select {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  background: transparent;
  border: 1px solid var(--neon);
  color: var(--text-main);
  border-radius: 6px;
}

input:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 10px var(--neon);
}

/* ================= BUTTONS ================= */

button {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: transparent;
  border: 1px solid var(--neon);
  color: var(--neon);
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s ease;
}

button:hover {
  background: var(--neon);
  color: #000;
}

/* ================= FOOTER ================= */

.site-footer {
  text-align: center;
  padding: 16px;
  border-top: 1px solid var(--neon);
}

/* ===============================
   🎛 PERFECT TOGGLE SWITCH
================================ */

.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
}

.theme-switch input {
  display: none;
}

.slider {
  position: relative;
  width: 58px;
  height: 28px;
  background: var(--panel-bg);
  border: 2px solid var(--neon);
  border-radius: 50px;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: var(--neon);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.theme-switch input:checked + .slider::before {
  transform: translateX(28px);
}

.slider:hover {
  box-shadow: 0 0 10px var(--neon);
}
.logo {
  width: 28px !important;
  height: auto !important;
  max-height: 28px !important;
  object-fit: contain;
  display: block;
}
/* ===============================
   🎛 ULTRA PRECISE TOGGLE
================================ */

.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
}

.theme-switch input {
  display: none;
}

.slider {
  position: relative;
  width: 54px;
  height: 26px;
  border-radius: 50px;
  background: var(--panel-bg);
  border: 2px solid var(--neon);
  cursor: pointer;
  box-sizing: border-box;
  transition: 0.3s ease;
}

/* Knob */
.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 1px;
  left: 1px;
  border-radius: 50%;
  background: var(--neon);
  transition: transform 0.28s ease;
}

/* Perfect slide */
.theme-switch input:checked + .slider::before {
  transform: translateX(26px);
}

.slider:hover {
  box-shadow: 0 0 6px var(--neon);
}
/* ================= CHAT UI ================= */

.chat-panel{
max-width:700px;
height:70vh;
display:flex;
flex-direction:column;
padding:0;
}

.chat-header{
padding:16px;
text-align:center;
border-bottom:1px solid var(--neon);
font-weight:600;
color:var(--neon);
}

.messages{
flex:1;
overflow-y:auto;
padding:20px;
display:flex;
flex-direction:column;
gap:12px;
}

.msg-row{
display:flex;
width:100%;
}

.msg-row.mine{
justify-content:flex-end;
}

.msg-row.theirs{
justify-content:flex-start;
}

.bubble{
max-width:70%;
padding:12px 14px;
border-radius:12px;
font-size:14px;
line-height:1.4;
word-wrap:break-word;
}

.msg-row.mine .bubble{
background:var(--neon);
color:#000;
border-bottom-right-radius:4px;
}

.msg-row.theirs .bubble{
background:rgba(0,246,255,0.08);
border:1px solid var(--neon);
border-bottom-left-radius:4px;
}

.meta{
display:block;
font-size:10px;
opacity:0.6;
margin-top:4px;
}

.chat-input{
display:flex;
border-top:1px solid var(--neon);
}

.chat-input input{
flex:1;
margin:0;
border:none;
border-radius:0;
padding:14px;
background:transparent;
}

.chat-input button{
width:80px;
margin:0;
border:none;
border-left:1px solid var(--neon);
border-radius:0;
font-size:18px;
}
/* ================= CHAT PANEL ================= */

.chat-panel{
max-width:700px;
height:70vh;
display:flex;
flex-direction:column;
padding:0;
}

.chat-header{
padding:16px;
text-align:center;
border-bottom:1px solid var(--neon);
font-weight:600;
color:var(--neon);
}

/* MESSAGE AREA */

.messages{
flex:1;
overflow-y:auto;
padding:20px;
display:flex;
flex-direction:column;
gap:12px;
}

.msg-row{
display:flex;
width:100%;
}

.msg-row.mine{
justify-content:flex-end;
}

.msg-row.theirs{
justify-content:flex-start;
}

.bubble{
max-width:70%;
padding:12px 14px;
border-radius:12px;
font-size:14px;
line-height:1.4;
word-wrap:break-word;
}

/* MY MESSAGE */

.msg-row.mine .bubble{
background:var(--neon);
color:#000;
border-bottom-right-radius:4px;
}

/* THEIR MESSAGE */

.msg-row.theirs .bubble{
background:rgba(0,246,255,0.08);
border:1px solid var(--neon);
border-bottom-left-radius:4px;
}

/* META */

.meta-row{
display:flex;
gap:6px;
justify-content:flex-end;
margin-top:4px;
}

.meta{
font-size:10px;
opacity:0.7;
}

/* MESSAGE STATUS */

.msg-status{
font-size:10px;
}

.msg-status.sent{
color:gray;
}

.msg-status.delivered{
color:var(--neon);
opacity:0.6;
}

.msg-status.seen{
color:var(--green);
text-shadow:0 0 6px var(--green);
}

/* INPUT */

.chat-input{
display:flex;
border-top:1px solid var(--neon);
}

.chat-input input{
flex:1;
margin:0;
border:none;
border-radius:0;
padding:14px;
background:transparent;
}

.chat-input button{
width:80px;
margin:0;
border:none;
border-left:1px solid var(--neon);
border-radius:0;
font-size:18px;
}
/* ================= MESSAGE STATUS ================= */

.meta-row{
display:flex;
align-items:center;
gap:6px;
margin-top:4px;
justify-content:flex-end;
}

.msg-status{
font-size:12px;
letter-spacing:1px;
}

/* delivered */

.msg-status.delivered{
color:var(--neon);
opacity:0.6;
}

/* seen */

.msg-status.seen{
color:var(--green);
text-shadow:0 0 6px var(--green);
}