@import url('https://fonts.googleapis.com/css2?family=Kode+Mono:wght@400..700&display=swap');
@import url('https://esm.sh/@pfmcodes/highlight.js@1.0.0/styles/atom-one-dark.css');
@import url("../nav.css");

:root {
    --sidebar-width: 0%;
    --bg: #111318;
    --surface: #1A1D24;
    --navbar: #20242D;

    --text: #F5F7FA;
    --muted: #9CA3AF;

    --purple: #9A82F2;
    --green: #5FC281;
    --pink: #F16D8E;

    --border: #2E3440;
    --max-sidebar-width: 21%;
}

* {
    scrollbar-width: none;
    transition:
        width 0.25s ease,
        opacity 0.25s ease;
}

body {
    background: var(--bg);
    margin: 0;
    padding: 0;
    color: var(--text);
}

.page-wrapper {
    display: flex;
    flex-direction: row;
}

.main {
    height: 100%;
    flex: 1;
    min-width: 0;
    width: auto;
}

.content {
    padding: 10px;
    width: auto;
}

.content svg {
    max-width: 100%;
    min-width: 1px;
}

.menu {
    background-color: transparent;
    border: none;
    color: var(--text);
}

.menu svg {
    width: 30px;
    height: 20px;
}

blockquote {
    margin: 0 !important;
    padding: 5px 50px 5px 0;
    font-style: italic;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

blockquote * {
    margin: 0;
}

.hljs-error {
    color: #f76f72;
}

.hljs-string {
    color: var(--green);
}

.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background: transparent;
    position: static;
    transition:
        left 0.25s ease,
        width 0.25s ease;
    margin-top: 15px;

}

.sidebar .sidebar-nav {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 50px;
    height: 50px !important;
    width: auto;
    color: var(--text);
}

#sidebar-back-btn {
    background-color: transparent;
    border-radius: 10px;
    padding: 5px;
    border: none;
    color: var(--text);
}

.dropDown-title {
    padding-left: 5px;
    padding-top: 1px;
    margin-bottom: 10px; 
}

.dropDown-title * {
    margin: 0;
}

.sidebar-content {
    gap: 5px;
}

.dropDown-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition:
        max-height 0.25s ease,
        opacity 0.25s ease;
}

.dropDown.open > .dropDown-content {
    max-height: 1000px;
    opacity: 1;
}

.dropDown-title {
    cursor: pointer;
    user-select: none;
}

@media screen {
    @media (width < 1025px ) {
        nav .right .links {
            display: none;
        }
    }
    @media (width < 426px) {
        .page-wrapper {
            position: relative;
            width: 100%;
            overflow-x: hidden; /* Clips the hidden sidebar without breaking body scroll */
        }
        .sidebar {
            flex: 1;
            position: absolute;
            width: calc(100% - 30px) !important;
            flex-direction: column;
            height: calc(100% - 30px);
            margin: 0;
            padding: 15px;
            top: 0;
            left: 110%;

            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);

            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 0 20px 50px rgba(255,255,255,0.1);

            z-index: 999999999999999999;
        }

        .sidebar.active {
            left: 0;
        }

        .sidebar-nav {
            display: flex !important;
        }

        .content {
            width: 100% !important;
        }
    }
    @media (width < 321px) {
        nav .right .search {
            display: none;
        }
    }
}

.hero-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(20px);
}

.hero-btn.primary { 
  background: linear-gradient(135deg, #9A82F2, #5FC281);
  color: white; 
  box-shadow: 0 8px 25px rgba(154,130,242,0.3);
}

.hero-btn.secondary { 
  background: rgba(255,255,255,0.1);
  color: var(--text); 
}

.hero-btn.npm { 
  background: linear-gradient(135deg, #CB3837, #9F1239);
  color: white; 
}

.hero-btn:hover { transform: translateY(-2px); }

.feature-card {
  background: rgba(255,255,255,0.05);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.08);
}

.feature-icon {
  font-size: 2.5em;
  display: block;
  margin-bottom: 12px;
}

.kaomoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.kaomoji-item {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.kaomoji-item:hover {
  transform: scale(1.05);
  background: rgba(154,130,242,0.15);
}

.kaomoji-display {
  font-size: 2em;
  font-family: "Kode Mono", monospace;
  display: block;
  margin-bottom: 8px;
}

.kaomoji-display.happy { color: #5FC281; }
.kaomoji-display.sad { color: #F16D8E; }
.kaomoji-display.excited { color: #9A82F2; }

.cta-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, #9A82F2, #F16D8E);
  color: white !important;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(154,130,242,0.4);
  transition: all 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(154,130,242,0.6);
}

.api-examples {
  background: rgba(0,0,0,0.4);
  border-left: 4px solid #9A82F2;
  padding: 20px;
  border-radius: 8px;
  margin: 25px 0;
}