@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: fallback;
}

html {
    background-color: #050505;
}

body {
    font-family: 'Lexend', sans-serif;
    background-image:
        radial-gradient(circle at 50% 50%, #05050580 0%, rgb(5, 5, 5) 80%),
        linear-gradient(#1b1b1b 1px, transparent 1px),
        linear-gradient(to right, #1b1b1b 1px, #050505 1px);
    background-size: 100% 100%, 20px 20px, 20px 20px;
    background-color: #050505;
    height: 100vh;
    margin: 0;
    padding: 0;
    color: #e0e0e0;
    overflow: hidden;
    display: flex;
    position: relative;
}

body.games-view::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 130px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.1s ease;

    background: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,1) 35%,
        rgba(0,0,0,.97) 55%,
        rgba(0,0,0,.90) 70%,
        rgba(0,0,0,.75) 82%,
        rgba(0,0,0,.50) 92%,
        rgba(0,0,0,.25) 97%,
        rgba(0,0,0,0) 100%
    );

    mask-image: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,1) 40%,
        rgba(0,0,0,.95) 60%,
        rgba(0,0,0,.80) 78%,
        rgba(0,0,0,.55) 90%,
        rgba(0,0,0,.32) 97%,
        rgba(0,0,0,0) 100%
    );
}

body.games-view.has-scroll-shadow::before {
    opacity: 1;
}
body.is-resizing {
    cursor: ew-resize !important;
    user-select: none !important;
}
body.is-resizing .iframe {
    pointer-events: none !important;
    user-select: none !important;
    cursor: ew-resize !important;
}

.sidebar {
    background-color: #0a0a0a;
    border-right: 1px solid #ffffff00;
    width: 190px;
    flex-shrink: 0;
    height: 100vh;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.1s ease;
    position: relative;
    z-index: 3;
}

.wrapper {
    flex-grow: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body.sidebar-hidden .sidebar {
    width: 0;
    padding: 0;
    opacity: 0;
    transition: width 0.1s ease, padding 0.1s ease-, opacity 0.1s ease, visibility 0s 0.1s;
    visibility: hidden; 
}

body.browser-view .sidebar {
    display: flex;
    visibility: visible;
}

body:not(.browser-view) .sidebar {
    display: none;
}

body.split-view #iframe-container,
body.is-picking-split #iframe-container {
    display: flex;
    flex-direction: row;
    height: 99%; 
    gap: 0; 
    border: none; 
}

body.split-view #iframe-container .iframe,
body.is-picking-split #iframe-container .iframe {
    position: relative; 
    height: 100%;
    top: auto; 
    left: auto;
    transition: none;
    border: 0 !important; 
    border-radius: 6px; 
    overflow: hidden; 
    display: none; 
    flex-grow: 1;
    flex-basis: 0;
    z-index: 0; 
    transform: translateZ(0); 
}

body.split-view #iframe-container .iframe:not(.active-focus),
body.is-picking-split #iframe-container .iframe:not(.active-focus) {
    box-shadow: none !important;
    border: 0 !important;
}

body.split-view #iframe-container .iframe.active-focus {
    box-shadow: 0 0 0 1px #ffffff80 !important;
    border: 0 !important;
    z-index: 1;
}

body.split-view #iframe-container .iframe:focus,
body.is-picking-split #iframe-container .iframe:focus {
    outline: none;
}

body.split-view #iframe-container .iframe.active,
body.is-picking-split #iframe-container .iframe.active {
    display: none; 
}

body.split-view #iframe-container .iframe.active-split-left,
body.is-picking-split #iframe-container .iframe.active-split-left {
    display: block;
    order: 1;
}

body.split-view #iframe-container .iframe.active-split-right {
    display: block;
    order: 3;
}

#iframe-container {
    flex-grow: 1;
    position: relative;
    display: none;
    width: calc(100% - 10px);
    height: 99%;
    margin: 0 auto 5px auto;
    transition: all 0.1s ease;
    border: 1px solid #ffffff1f;
    border-radius: 6px;
    overflow: hidden; 
    transform: translateZ(0);
    z-index: 1;
}

#iframe-container .iframe {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%; 
    height: 100%; 
    background-color: #050505;
    background-image:
        radial-gradient(circle at 50% 50%, #05050580 0%, rgb(5, 5, 5) 80%),
        linear-gradient(#1b1b1b 1px, transparent 1px),
        linear-gradient(to right, #1b1b1b 1px, #050505 1px);
    background-size: 100% 100%, 20px 20px, 20px 20px;
    display: none;
    box-sizing: border-box;
    border: none; 
    border-radius: 0; 
    transition: all 0.1s ease; 
}

#iframe-container .iframe.loaded {
    background: #ffffff;
}

#iframe-container .iframe.active {
    display: block;
    width: 100% !important; 
    height: 100% !important;
}

#iframe-resize-divider {
    display: none; 
}

body.split-view #iframe-resize-divider {
    display: block;
    width: 4px;
    background-color: #0a0a0a; 
    cursor: ew-resize;
    flex-shrink: 0;
    order: 2; 
    z-index: 10;
}

body:not(.split-view):not(.is-picking-split) #iframe-container .iframe.active-split-left,
body:not(.split-view):not(.is-picking-split) #iframe-container .iframe.active-split-right {
    display: none; 
}

body:not(.split-view):not(.is-picking-split) #iframe-container .iframe.active {
    display: block; 
}

#splitViewBtn.active {
    color: #ffffff;
    background-color: #ffffff1f;
}

.tab.split-pair {
    position: relative;
    padding-left: 20px; 
}
.tab.split-pair::before {
    content: '';
    position: absolute;
    left: 8px; 
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #ffffffe5; 
    border-radius: 50%;
}

body.is-picking-split .tab.split-active-left {
    cursor: not-allowed;
    opacity: 0.7;
}

#toggle-sidebar-btn {
    color: #c4c4c4;
    text-decoration: none;
    font-size: 15px;
    padding: 8px;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#toggle-sidebar-btn:hover {
    background-color: #ffffff14;
    color: white;
}

body.browser-view .main-container,
body.browser-view #bookmarks-container,
body.browser-view #ad-container-bottom,
body.browser-view #top-left-icons,
body.browser-view #top-right-icons,
body.browser-view #disclaimer,
body.browser-view #discord,
body.browser-view .footer-info,
body.browser-view .snowflakes {
    display: none;
}

body.browser-view #iframe-container {
    display: flex;
    height: 100%;
}

body.browser-view .wrapper {
    margin-left: 0;
}
body.browser-view::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: #0a0a0a;
    z-index: 0;
    pointer-events: none;
}


::selection {
    background-color: #ffffff;
    color: #000000;
}

::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #4e4e4e;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b6b6b;
}

.icon-btn {
    background-color: #0c0c0c;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    padding: 10px;
    border-radius: 50%;
    width: 17px; 
    height: 17px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.icon-btn:hover {
    background-color: #131313;
    transform: scale(1.05);
}

.icon-btn:active {
    transform: scale(1);
}

.icon-btn i {
    margin: 0 !important; 
}

#top-left-icons {
    position: fixed;
    top: 25px; 
    left: 25px; 
    z-index: 1200; 
    display: flex;
    align-items: center;
    gap: 10px; 
    height: 35px;
}

#top-right-icons {
    position: fixed;
    top: 25px; 
    right: 25px; 
    z-index: 1200; 
    display: flex;
    align-items: center;
    gap: 10px; 
    height: 35px;
}

#branding-container {
    width: auto;
    height: auto;
    padding: 8px 14px 7px 14px;
    border-radius: 25px; 
    position: relative;
    gap: 8px;
    cursor: pointer;
}

#brand {
    font-size: 15px;
    color: #ffffff;
    display: inline-block;
    text-align: left;
    margin: 0; 
    white-space: nowrap;
    cursor: default;
    font-weight: 300;
    transition: all 0.1s ease;
    cursor: pointer;
    position: relative;
    padding-left: 2px;
}

#brand::after {
    content: '';
    position: absolute;
    top: -13.6px;
    left: -3.3px;
    width: 34px;
    height: 26px;
    background-image: url('./santahat.png');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transform: rotate(13deg);
}

#oneko {
    width: 32px;
    height: 32px;
    background-image: url('../images/gifs/oneko.gif');
    image-rendering: pixelated;
    display: inline-block;
    vertical-align: middle;
    margin-top: -10px;
    margin-left: -7px;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 25px 25px;
    margin-top: auto;
}

#disclaimer,
#discord {
    position: static;
    left: auto;
    right: auto;
    color: #858585;
    font-size: 10px;
    max-width: 280px;
    z-index: 1;
}

#disclaimer {
    text-align: left;
    margin-right: auto;
}

#disclaimer a {
    cursor: text;
}

#discord {
    text-align: right;
    margin-left: auto;
}

#discord a {
    cursor: text;
}

.main-nav {
    display: none;
    align-items: center;
    padding: 8px;
    background-color: #0a0a0a;
    border-bottom: 1px solid #ffffff00;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.main-nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    z-index: -1;
}

body.browser-view .main-nav {
    display: flex;
}

.nav-controls, .window-controls {
    display: flex;
    gap: 8px;
}

.nav-controls a, .window-controls a {
    color: #c4c4c4;
    text-decoration: none;
    font-size: 15px;
    padding: 8px;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-controls a:hover, .window-controls a:hover {
    background-color: #ffffff14;
    color: white;
}

.nav-controls a.disabled,
.window-controls a.disabled {
    color: #4a4a4a;
    pointer-events: none;
    background-color: transparent;
}

.omnibox {
    display: flex;
    align-items: center;
    flex-grow: 1;
    position: relative;
    margin: 0 15px;
}

.omnibox input[type=text] {
    padding: 10px 15px 10px 35px;
    width: 100%;
    background-color: #ffffff05;
    border: none;
    border-radius: 20px;
    color: #b9b9b9;
    font-size: 13px;
    text-align: left;
    outline: none;
    box-sizing: border-box;
    transition: all 0.1s ease;
}

.omnibox input[type=text]:focus,
.omnibox input[type=text]:hover {
    background-color: #ffffff10;
}

.omnibox input[type=text]::placeholder {
    color: #818181;
}

#lockIcon {
    position: absolute;
    left: 13px;
    top: 50%;
    font-size: 14px;
    transform: translateY(-50%);
    color: #818181;
    pointer-events: none;
}

.main-container {
    position: relative;
    margin-top: 34vh;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    z-index: 5;
}

.phrases {
    font-size: 52px;
    font-family: 'Lexend Deca', sans-serif;
    font-weight: 400;
    margin-bottom: 7px;
    text-align: center;
    display: inline-block;
    color: white;
    transition: all 0.1s ease;
}

.search-bar {
    justify-content: center;
    align-items: center;
    z-index: 8;
    margin: 0 auto;
    position: relative;
    width: 520px;
    max-width: 100%;
    margin-bottom: 5px;
}

.search-bar input[type=text] {
    padding: 18px 18px 18px;
    z-index: 3;
    width: 430px;
    border-radius: 25px;
    color: #e0e0e0;
    font-size: 14px;
    border: transparent;
    background-color: transparent; 
    outline: none;
    transition: all 0.1s ease;
    position: relative;
}

.search-bar input[type=text]::placeholder {
    color: #ffffff43;
}

.light-border {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: 25px;
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 1;
     background-image: radial-gradient(circle at center, rgba(211 211 211 / 0.8), rgba(211 211 211 / 0) 60%);
    background-position: var(--bg-x) var(--bg-y);
    background-repeat: no-repeat;
    background-size: 300px 300px;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.light {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: 25px;
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 10;
    background-image: radial-gradient(circle at center, 
        #FF000050 10%,
        #00800050 15%,
        #00800000 60%
    );
    background-position: var(--bg-x) var(--bg-y);
    background-repeat: no-repeat;
    background-size: 300px 300px;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.light-inset-bg {
    position: absolute;
    inset: 0.8px; 
    border-radius: 24px; 
    background-color: #0d0d0d;
    transition: all 0.1s ease;
    z-index: 2;
}

.search-bar:focus-within .light-inset-bg {
    background-color: #111111;
}

::placeholder {
    color: #e0e0e0;
}

.hover-link {
    color: #b3b3b3;
    text-decoration: none;
    transition: all 0.1s ease;
    position: relative;
}

.hover-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000de;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.1s ease;
    pointer-events: none;
}

#overlay.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.1s ease-in-out;
    pointer-events: auto;
}

#overlay.fade-out {
    animation: fadeOut 0.1s forwards;
}

.popup {
    position: fixed;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #080808;
    color: #e0e0e0;
    padding: 25px 30px;
    border-radius: 20px;
    width: 350px;
    z-index: 999999;
    text-align: left;
    display: none;
    opacity: 0;
}

.popup.is-visible {
    display: block;
    opacity: 1;
}

.popup.new-tab-popup.is-visible {
  display: block;
  opacity: 1;
}

.popup .input-container label {
    display: block;
    font-size: 20px;
    margin-bottom: -5px;
    color: #e0e0e0;
    font-weight: 500;
    text-align: left;
    cursor: text;
}

.popup.new-tab-popup {
    top: 45%;
    width: 500px;
    padding: 0;
    z-index: 9999999999999;
    background: transparent;
    box-shadow: 1px 1px 40px #00000080;
    border: none;
    display: none;
    opacity: 0;
}

.input-container input {
    width: 100%;
    max-width: 280px;
    padding: 14px;
    padding-left: 30px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 15px;
    box-sizing: border-box;
}

.input-container input::placeholder {
    color: #6d6d6d;
}

#updateSuccess,
#sharePrompt {
  position: fixed;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #080808;
  color: #e0e0e0;
  padding: 25px 30px;
  width: 250px;
  border-radius: 20px;
  z-index: 999999;
  backdrop-filter: blur(10px);
  text-align: center;
  display: none;
  opacity: 0;
  transition: all 0.1s ease;
  animation: fadeIn 0.1s forwards;
}

#updateSuccess label,
#sharePrompt label {
  display: block;
  font-size: 20px;
  color: #e0e0e0;
  cursor: text;
}

#updateSuccess p,
#sharePrompt p {
  font-size: 14px;
  color: #727272;
  margin-top: 10px;
}

.prompt-close-btn {
    padding: 10px 25px;
    background-color: #0f0f0f;
    border: none;
    color: #d8d8d8;
    font-size: 16px;
    border-radius: 15px;
    width: auto;
    cursor: pointer;
    transition: all 0.1s ease;
    margin-top: 2px;
}

.prompt-close-btn:hover {
    background-color: #1f1f1f;
    color: #ffffff;
}

#updateSuccess.fade-out,
#sharePrompt.fade-out {
    animation: fadeOut 0.1s forwards;
}

.popup .input-container input {
    width: 100%;
    padding: 12px;
    background-color: #181818;
    border: 1px solid transparent;
    color: #ffffff;
    margin-bottom: 5px;
    border-radius: 15px;
    font-size: 15px;
    outline: none;
    transition: all 0.1s ease;
}

.popup .input-container input:focus,
.popup .input-container input:hover {
    background-color: #222222;
}

.popup .input-container button {
    padding: 10px;
    background-color: #d3d3d3;
    border: none;
    color: #000000;
    font-size: 16px;
    border-radius: 15px;
    width: 48%;
    cursor: pointer;
    transition: all 0.1s ease;
}

.popup .input-container button:hover {
    background-color: #ffffff;
}

.popup.fade-in-prompt {
    animation: fadeIn 0.1s forwards;
}

.popup.fade-out-prompt {
    animation: fadeOut 0.1s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.snowflake {
  width: 13px;
  height: 13px;
  pointer-events: none;
  background-color: #ffffff;
  -webkit-mask-image: url('snowflake.png');
  mask-image: url('snowflake.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  image-rendering: pixelated;
}

@-webkit-keyframes snowflakes-fall {
  0% { top: -2% }
  100% { top: 100% }
}

@-webkit-keyframes snowflakes-shake {
  0% { -webkit-transform: translateX(0px); transform: translateX(0px) }
  50% { -webkit-transform: translateX(80px); transform: translateX(80px) }
  100% { -webkit-transform: translateX(0px); transform: translateX(0px) }
}

@keyframes snowflakes-fall {
  0% { top: -2% }
  100% { top: 100% }
}

@keyframes snowflakes-shake {
  0% { transform: translateX(0px) }
  50% { transform: translateX(80px) }
  100% { transform: translateX(0px) }
}

.snowflake {
  position: fixed;
  top: -50%;
  z-index: 9999;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
  -webkit-animation-name: snowflakes-fall, snowflakes-shake;
  -webkit-animation-duration: 8s, 3s; 
  -webkit-animation-timing-function: linear, ease-in-out;
  -webkit-animation-iteration-count: infinite, infinite;
  -webkit-animation-play-state: running, running;
  animation-name: snowflakes-fall, snowflakes-shake;
  animation-duration: 8s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-play-state: running, running;
}

.snowflake:nth-of-type(0) { left: 1%; -webkit-animation-delay: 0s, 0s; animation-delay: 0s, 0s }
.snowflake:nth-of-type(1) { left: 10%; -webkit-animation-delay: 1s, 1s; animation-delay: 1s, 1s }
.snowflake:nth-of-type(2) { left: 20%; -webkit-animation-delay: 6s, 0.5s; animation-delay: 6s, 0.5s }
.snowflake:nth-of-type(3) { left: 30%; -webkit-animation-delay: 4s, 2s; animation-delay: 4s, 2s }
.snowflake:nth-of-type(4) { left: 40%; -webkit-animation-delay: 2s, 2s; animation-delay: 2s, 2s }
.snowflake:nth-of-type(5) { left: 50%; -webkit-animation-delay: 8s, 3s; animation-delay: 8s, 3s }
.snowflake:nth-of-type(6) { left: 60%; -webkit-animation-delay: 6s, 2s; animation-delay: 6s, 2s }
.snowflake:nth-of-type(7) { left: 70%; -webkit-animation-delay: 2.5s, 1s; animation-delay: 2.5s, 1s }
.snowflake:nth-of-type(8) { left: 80%; -webkit-animation-delay: 1s, 0s; animation-delay: 1s, 0s }
.snowflake:nth-of-type(9) { left: 90%; -webkit-animation-delay: 3s, 1.5s; animation-delay: 3s, 1.5s }
.snowflake:nth-of-type(10) { left: 3%; -webkit-animation-delay: 0.5s, 0.2s; animation-delay: 0.5s, 0.2s }
.snowflake:nth-of-type(11) { left: 13%; -webkit-animation-delay: 5s, 1.8s; animation-delay: 5s, 1.8s }
.snowflake:nth-of-type(12) { left: 23%; -webkit-animation-delay: 7s, 0.8s; animation-delay: 7s, 0.8s }
.snowflake:nth-of-type(13) { left: 33%; -webkit-animation-delay: 3.5s, 2.5s; animation-delay: 3.5s, 2.5s }
.snowflake:nth-of-type(14) { left: 43%; -webkit-animation-delay: 1.5s, 2.2s; animation-delay: 1.5s, 2.2s }
.snowflake:nth-of-type(15) { left: 53%; -webkit-animation-delay: 8.5s, 3.2s; animation-delay: 8.5s, 3.2s }
.snowflake:nth-of-type(16) { left: 63%; -webkit-animation-delay: 6.5s, 2.5s; animation-delay: 6.5s, 2.5s }
.snowflake:nth-of-type(17) { left: 73%; -webkit-animation-delay: 4s, 1.2s; animation-delay: 4s, 1.2s }
.snowflake:nth-of-type(18) { left: 83%; -webkit-animation-delay: 0.8s, 0.3s; animation-delay: 0.8s, 0.3s }
.snowflake:nth-of-type(19) { left: 93%; -webkit-animation-delay: 5.5s, 1.7s; animation-delay: 5.5s, 1.7s }