
@font-face {
  font-family: 'Kobuzan';
  src: url('../fonts/kobuzan-cy-grotesk-grand-dark.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  
  --bg-color: #050505;
  --card-bg: #111111;
  --text-main: #e0e0e0;
  --text-muted: #888888;
  --accent: #ffffff;
  --border: #333333;
  
  
  --header-height: 70px;
  --container-width: 1200px;
  
  
  --font-display: 'Kobuzan', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* =========================================
   UTILITIES & BUTTONS
   ========================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-color);
}

/* =========================================
   HEADER
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}


.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px; 
}


.nav {
  display: flex;
  gap: 30px;
}

@media (max-width: 768px) {
  .nav { display: none; }
}

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-link:hover, 
.nav-link[data-active] {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.icon-link {
  display: flex;
  align-items: center;
  opacity: 0.6;
}

.icon-link:hover {
  opacity: 1;
}

.icon-svg {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

/* =========================================
   MAIN LAYOUT
   ========================================= */
.main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  flex-direction: column;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border);
  padding: 60px 0 20px;
  margin-top: auto;
}

.footer-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent);
  display: block;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 250px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link img {
  width: 20px;
  height: 20px;
  filter: invert(0.5);
  transition: filter 0.2s;
}

.social-link:hover img {
  filter: invert(1);
}

.footer-section h4 {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 20px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-section a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: #444;
  font-size: 12px;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* =========================================
   MODAL STYLES (REQUIRED)
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  
  display: none; 
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}


.modal-overlay.is-open {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease-in-out;
}

.modal-overlay.is-open .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 5px;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-header {
  text-align: center;
  margin-bottom: 30px;
}

.modal-header h2 {
  font-family: var(--font-display);
  margin: 0 0 10px 0;
  font-size: 22px;
  color: var(--accent);
}

.modal-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
}

.auth-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.auth-icon {
  width: 22px;
  height: 22px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #222;
}

.auth-divider span {
  padding: 0 15px;
}

.modal-footer {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin-top: 25px;
  line-height: 1.4;
}

.modal-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: #444;
}

.modal-footer a:hover {
  color: var(--accent);
}

/* =========================================
   ADDITIONS FOR ROUTER.JS SUPPORT
   ========================================= */


.login-required {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 20px;
  animation: fadeUp 0.5s ease-out;
}


.login-required::before {
  content: '';
  display: block;
  width: 60px;
  height: 60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233C53FF' stroke-width='1.5'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin-bottom: 20px;
  opacity: 0.8;
}

.login-required h2 {
  font-family: var(--font-display);
  font-size: 32px;
  color: #fff;
  margin: 0 0 10px 0;
}

.login-required p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 400px;
  margin: 0 0 30px 0;
  line-height: 1.6;
}

.login-required .btn {
  padding: 12px 32px;
  font-size: 16px;
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(60, 83, 255, 0.4);
}

.login-required .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(60, 83, 255, 0.6);
}



.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-overlay.active .modal {
  transform: scale(1);
}


.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 3000;
  pointer-events: none; 
}

.toast {
  background: rgba(15, 15, 17, 0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  border-left: 3px solid #555;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hiding {
  opacity: 0;
  transform: translateX(20px);
}


.toast.success { border-left-color: #27c93f; }
.toast.success .toast-icon { color: #27c93f; }

.toast.error { border-left-color: #ff5f56; }
.toast.error .toast-icon { color: #ff5f56; }

.toast.info { border-left-color: var(--brand-cyan); }
.toast.info .toast-icon { color: var(--brand-cyan); }

.toast-icon {
  font-size: 20px;
  line-height: 1;
  padding-top: 2px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
}

.toast-message {
  font-size: 13px;
  color: #aaa;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-top: 2px;
}

.toast-close:hover { color: #fff; }


.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(60, 83, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--brand-primary);
  animation: spin 1s ease-in-out infinite;
  margin: 100px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}