/* base.css */
/* #pragma region CSS Variables */
:root{
  --bg:#0e141a;
  --panel:#161d23;
  --text:#E6E9EF;
  --muted:#A8A8A8;
  --accent:#4DA3FF;
  --success:#3BA55D;
  --danger:#E05C5C;
  --card-border:#1f2a33;
  --card-radius:12px;
  --max-width:1200px;
  --gap:24px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* #pragma endregion */

/* #pragma region Font Faces */
@font-face {
  font-family: "Styrene A Web";
  src: url('../fonts/styrene/StyreneAWeb-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Styrene A Web";
  src: url('../fonts/styrene/StyreneAWeb-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Styrene A Web";
  src: url('../fonts/styrene/StyreneAWeb-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Styrene A Web";
  src: url('../fonts/styrene/StyreneAWeb-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Styrene A Web";
  src: url('../fonts/styrene/StyreneAWeb-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
/* #pragma endregion */

/* #pragma region Base Reset */
*{box-sizing:border-box}
html,body{
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}
/* #pragma endregion */

/* #pragma region Topbar Styles */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 32px;
  background:linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
  border-bottom:1px solid var(--card-border);
  height: 70px;
  box-sizing: border-box;
  position: relative;
  z-index: 1000;
}

.brand{
  display: flex;
  align-items: center;
  height: 100%;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 25px;
  width: auto;
  transition: all 0.3s ease;
}

.user{
  display: flex;
  align-items: center;
  height: 100%;
}

.user-avatar {
  height: 55px;
  width: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
/* #pragma endregion */

/* #pragma region Navigation */
.nav{
  display:flex;
  gap:18px;
  align-items: center;
  height: 100%;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.nav-link{
  color:var(--muted);
  text-decoration:none;
  padding:8px 12px;
  border-radius:6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  position: relative;
  border: 1px solid transparent;
}

.nav-link.active{
  color:var(--text);
  background:rgba(77,163,255,0.06);
  font-weight: 600;
  border-color: rgba(77,163,255,0.3);
}

.nav-link:hover:not(.active) {
  color: var(--text);
  background: rgba(77,163,255,0.03);
  border-color: rgba(77,163,255,0.15);
  transform: translateY(-1px);
}

.nav-link::after {
  display: none;
}
/* #pragma endregion */

/* #pragma region Mobile Navigation */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  position: relative;
}

.mobile-menu-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
  background-color: var(--accent);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
  background-color: var(--accent);
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--card-border);
    border-top: none;
    flex-direction: column;
    padding: 20px 16px;
    gap: 12px;
    display: none;
    z-index: 999;
    height: auto;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .nav.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
    transform: translateY(10px);
    opacity: 0;
  }

  .nav.active .nav-link {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
    transition-delay: calc(0.1s * var(--i, 0));
  }

  .nav-link.active {
    background: rgba(77, 163, 255, 0.1);
    border-color: rgba(77, 163, 255, 0.2);
    color: var(--accent);
    font-weight: 600;
  }

  .nav-link:not(.active) {
    background: rgba(255, 255, 255, 0.03);
    border-color: transparent;
  }

  .nav-link:active:not(.active) {
    background: rgba(77, 163, 255, 0.05);
    transform: scale(0.98) !important;
    transition: transform 0.1s ease !important;
  }

  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
  }

  body.menu-open::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
    animation: overlayFadeIn 0.3s ease;
  }

  @keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .nav-link:nth-child(1) { --i: 1; }
  .nav-link:nth-child(2) { --i: 2; }
  .nav-link:nth-child(3) { --i: 3; }
  .nav-link:nth-child(4) { --i: 4; }
}

@media (max-width: 480px) {
  .nav {
    top: 56px;
    padding: 16px 12px;
    gap: 10px;
  }

  .nav-link {
    padding: 14px 16px;
    min-height: 48px;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .nav {
    top: 52px;
    padding: 14px 10px;
    gap: 8px;
  }

  .nav-link {
    padding: 12px 14px;
    min-height: 44px;
    font-size: 14px;
  }
}
/* #pragma endregion */

/* #pragma region Layout */
.container{
  max-width:var(--max-width);
  margin:28px auto;
  padding:0 24px;
  display:grid;
  gap:32px
}
/* #pragma endregion */

/* #pragma region Footer */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  border-top: 1px solid var(--card-border);
  font-size: 0.9rem;
  color: var(--muted);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}
/* #pragma endregion */

/* #pragma region Cards */
.card {
  background:var(--panel);
  padding:18px;
  border-radius:var(--card-radius);
  border:1px solid var(--card-border);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* #pragma endregion */

/* #pragma region Typography */
h1, h2, h3, h4 {
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.8rem;
  line-height: 1.2;
}

h1 { 
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 { 
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h3 { 
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

h4 { 
  font-size: 1.25rem;
  font-weight: 600;
}

p, li, div, span {
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

.btn, .link, button {
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.meta, .muted {
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  opacity: 0.8;
}

.terminal-header,
.term-output,
.term-input-row,
.prompt,
#terminal-input {
  font-family: "JetBrains Mono", "SF Mono", Monaco, Inconsolata, "Roboto Mono", monospace;
  font-weight: 400;
}

.form-input, .form-select, .form-textarea, .form-label {
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

.form-label {
  font-weight: 500;
}
/* #pragma endregion */

/* #pragma region Tablet Responsive */
@media (max-width: 900px) {
  .topbar {
    padding: 8px 24px;
    height: 65px;
  }
  
  .user-avatar {
    height: 50px;
    width: 50px;
  }
  
  .brand-logo {
    height: 22px;
  }
  
  .nav {
    gap: 14px;
  }
  
  .nav-link {
    padding: 6px 10px;
    font-size: 14px;
  }
}
/* #pragma endregion */

/* #pragma region Mobile Responsive */
@media (max-width: 768px) {
  .topbar {
    padding: 8px 16px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-menu-btn {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .brand {
    order: 1;
    flex: 1;
  }

  .user {
    order: 3;
    display: none;
  }

  .topbar {
    position: relative;
    z-index: 1001;
    background: var(--bg);
  }

  .user {
    display: none !important;
  }

  .brand {
    z-index: 1002;
  }

  .mobile-menu-btn {
    z-index: 1002;
  }
  
  .container {
    padding: 0 16px;
    margin: 1.5rem auto;
  }
  
  h1 { 
    font-size: 2rem;
    font-weight: 700;
  }
  
  h2 { 
    font-size: 1.75rem;
    font-weight: 700;
  }
  
  h3 { 
    font-size: 1.35rem;
    font-weight: 600;
  }
  
  .brand {
    font-size: 1.1rem;
    font-weight: 700;
  }
  
  .footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 16px;
  }
  
  .nav-link, .btn, .link {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  input, textarea, button, select {
    font-size: 16px;
  }
  
  body {
    font-size: 15px;
    line-height: 1.5;
  }
}
/* #pragma endregion */

/* #pragma region Small Mobile Responsive */
@media (max-width: 480px) {
  .topbar {
    padding: 6px 12px;
    height: 56px;
  }
  
  .brand-logo {
    height: 20px;
  }
  
  .mobile-menu-btn {
    width: 28px;
    height: 20px;
  }
  
  .mobile-menu-btn span {
    height: 2.5px;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .container {
    padding: 0 12px;
    margin: 1rem auto;
  }
  
  h1 { 
    font-size: 1.8rem;
  }
  
  h2 { 
    font-size: 1.5rem;
  }
  
  h3 { 
    font-size: 1.2rem;
  }
  
  .footer {
    padding: 14px;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .topbar {
    padding: 4px 10px;
    height: 52px;
  }
  
  .brand-logo {
    height: 18px;
  }
  
  .mobile-menu-btn {
    width: 26px;
    height: 18px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  h1 { 
    font-size: 1.6rem;
  }
  
  h2 { 
    font-size: 1.3rem;
  }
  
  h3 { 
    font-size: 1.1rem;
  }
  
  .footer {
    padding: 12px;
    font-size: 13px;
  }
}
/* #pragma endregion */

/* #pragma region Body States */
body.menu-open {
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
}

.nav-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mobile-menu-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
/* #pragma endregion */

/* #pragma region Mood Themes */
body.mood-happy {
  --accent: #FF6B6B;
  --card-border: #FF9E7D;
}

body.mood-happy .terminal-header,
body.mood-happy .prompt {
  color: #FF6B6B;
}

body.mood-happy .btn:hover {
  box-shadow: 0 10px 26px rgba(255, 107, 107, 0.3);
}

body.mood-chill {
  --accent: #4ECDC4;
  --card-border: #88D3CE;
}

body.mood-chill .terminal-header,
body.mood-chill .prompt {
  color: #4ECDC4;
}

body.mood-chill .btn:hover {
  box-shadow: 0 10px 26px rgba(78, 205, 196, 0.3);
}

body.mood-focus {
  --accent: #45B7D1;
  --card-border: #7BCFE0;
}

body.mood-focus .terminal-header,
body.mood-focus .prompt {
  color: #45B7D1;
}

body.mood-focus .btn:hover {
  box-shadow: 0 10px 26px rgba(69, 183, 209, 0.3);
}
/* #pragma endregion */

/* #pragma region Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

.terminal-game {
  border: 1px solid var(--accent);
  padding: 10px;
  margin: 10px 0;
  background: rgba(0, 0, 0, 0.3);
  font-family: "JetBrains Mono", monospace;
  white-space: pre;
}

@media (max-width: 768px) {
  .terminal-game {
    font-size: 12px;
    padding: 8px;
  }
}
/* #pragma endregion */