html {
    height: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    text-align: center;
    margin: 0;
    height: 100%;
    background: var(--bodyback);
}

#header {    
    position: relative;
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
    overflow: auto;
}

.header-left,
.header-right {
	display: flex;
	align-items: center;
}

.header-left {
    gap: 12px;
}

.header-center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
}

#modalOverlay {
    display: flex;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    z-index: 5;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease-in-out, width 0.3s ease-in-out;
}

#modalOverlay.shifted {
    width: calc(100% - 320px);
}

#modalOverlay.active {
    opacity: 1;
    visibility: visible;
}

#logo {
    margin-left: 10px;
    padding: 15px;
    width: auto;
    text-align: left;
    position: relative;
}

#logo img {
    cursor: pointer;
    height: 40px;
    width: 40px;
    border: none;
}

#logo.animate img {
    animation: wobble 0.75s ease;
}

@keyframes wobble {
    0%, 100% {
        transform: translateX(0%);
    }
    15% {
        transform: translateX(-10px) rotate(-10deg);
    }
    30% {
        transform: translateX(5px) rotate(10deg);
    }
    45% {
        transform: translateX(-5px) rotate(-5.56deg);
    }
    60% {
        transform: translateX(3px) rotate(3.33deg);
    }
    75% {
        transform: translateX(-1.82px) rotate(-2deg);
    }
}

.zzz-container {
    position: absolute;
    top: 15px;
    left: 50px;
}

.zzz-animate {
    animation-name: zzz;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
    color: rgba(54, 54, 54, 0);
    font-weight: bold;
    position: absolute;
    z-index: 1;
    transform: translateY(100%);
    font-family: 'sans-serif';
}

.zzz-z { animation-delay: 0s; right: 5px; }
.zzz-zz { animation-delay: 0.2s; right: -15px; }
.zzz-zzz { animation-delay: 0.4s; right: 0; }

@keyframes zzz {
    0% {
        color: rgba(54, 54, 54, 0);
        font-size: 1px;
        transform: translateY(100%);
    }
    95% {
        color: var(--secondary);
        font-size: 18px;
        transform: translateY(-100%);
    }
    100% {
        color: rgba(54, 54, 54, 0);
        font-size: 18px;
        transform: translateY(-100%);
    }
}

.pulse {
    animation: pulse 0.25s ease-in-out alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#searchContainer {
    display: flex;
}

.search-box {
    display: flex;
    width: 100%;
    align-items: center;
    background-color: var(--modeback);
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    max-width: 250px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-box:hover:not(:focus-within) {
    filter: brightness(1.2);
}

.search-icon {
    position: absolute;
    height: 20px;
    line-height: 20px;
    width: 20px;
    padding-right: 2px;
}

.search-icon svg {
    display: block;
    height: 100%;
    width: 100%;
    color: var(--modetext2);
    fill: currentColor;
}

.search-box input {
    border: none;
    outline: none;
    padding-left: 24px;
    font-size: 16px;
    flex: 1;
    background-color: transparent;
    color: var(--modetext);
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px var(--backtext);
}

.close {
	position: absolute;
	top: 2px;
	right: 4px;
	padding: 5px 6px;
	font-size: 24px;
	font-weight: bold;
	color: #ff5353;
	cursor: pointer;
	transition: color 0.25s ease;
}

.close:hover {
	color: #e71313;
}

#dataModal, #tutorialModal {
    display: none;
}

#tutorialModal {
    bottom: 0;
    height: fit-content;
    max-height: 98%;
    width:80%;
    max-width: 740px;
    box-sizing: border-box;
    text-align: justify;
    align-items: start;
    padding: 0;
    gap: 0;
    overflow: auto;
}

#tutorialModal .modal-title {
    margin: 0;
    padding: 0 30px;
    padding-top: 34px;
    text-transform: none;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 18px;
    color: var(--modetext);
    text-align: left;
}

#tutorialModal .modal-title.how-to {
    padding-top: 24px;
}

.tutorial-section {
    padding: 18px 30px;
    border-top: 1px solid var(--bodyback);
    font-size: 16px;
    line-height: 1.6;
}

.tutorial-section.first {
    border-top: none;
    padding-top: 0;
}

.tutorial-section.how-to {
    margin-bottom: 0;
    padding-bottom: 34px;
    background-color: var(--bodyback);
}

.tutorial-section h3 {
    margin: 0 0 8px;
    color: var(--modetext);
    font-size: 16px;
    font-weight: 600;
}

.tutorial-section p {
    margin: 0.4rem 0;
    color: var(--modetext);
}

.tutorial-section p strong {
    color: var(--hover);
}

.tutorial-section a, .back-button {
    color: var(--secondary);
    text-decoration: none;
}

.tutorial-section a:hover, .back-button:hover {
    color: var(--secondaryhover);
    text-decoration: underline;
}

.how-to-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--secondarytext);
  background-color: var(--secondary);
}

.how-to-toggle:hover {
  background-color: var(--secondaryhover);
}

.how-to-toggle .arrow {
  font-size: 16px;
}

.back-button {
  margin: 20px 30px 0;
  width: max-content;
  font-size: 14px;
  cursor: pointer;
}

.back-button span::before {
    content: "<";
}

.browser-full-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.browser-wide-card {
  flex: 1 1 calc(50% - 10px);
  text-align: left;
  box-sizing: border-box;
  display: flex;
  padding: 10px;
}

.browser-wide-card.full-width {
  flex: 1 1 100%;
}

.browser-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--modetext);
}

.browser-text {
  font-size: 15px;
  color: var(--modetext);
  line-height: 1.4;
}

.browser-icon-wrap {
  width: 80px;
  background-color: var(--bodyback);
  display: flex;
  justify-content: center;
  align-items: center;
}

.browser-icon-img {
  width: 48px;
}

.browser-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border: 1px solid var(--bodyback);
}

.modal-content {
    position: relative;
    background-color: var(--modeback);
    margin: auto;
    bottom: 10%;
    padding: 50px 0px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.modal-title {
    font-weight: bold;
    font-size: 22px;
    color: var(--modetext);
    text-transform: uppercase;
    margin: 18px;
    margin-top: 6px;
    margin-bottom: 8px;
}
.modal-content button {
    border: 2px solid var(--backtext);
    background: transparent;
    color: var(--modetext2);
    font-size: 15px;
    font-weight: bold;
    padding: 0 24px;
    cursor: pointer;
    border-radius: 4px;
    height: 40px;
    width: 200px;
    white-space: nowrap;
    text-transform: uppercase;
}

.modal-content button:hover {
    background: var(--bodyback);
}

@-moz-document url-prefix() {
    .tutorial-section {
        font-size: 15px;
    }

    .browser-text {
        font-size: 14px;
    }

    .back-button span:before {
        content: "←";
    }
}

@media (max-width: 750px) {
    .header-center {
        position: initial;
        transform: none;
        padding: 0 10px;
    }
} 