@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

/* ========== CSS Variables ========== */
:root {
    /* Light Mode Colors */
    --loader-background-color: #fff;
    --loader-text-color: #760c0c;
    --loader-ring-color: #760c0c;
    --sidebar-primary-color: #fff;
    --sidebar-secondary-color: #760c0c;
    --searchbox-primary-color: #fff;
    --searchbox-secondary-color: #760c0c;
    --searchbox-background-color: #fff;
    --searchbox-hover-color: #972323;
    --center-background-color: #fff;
    --center-icon-color: #760c0c;
    --favorites-background-color: #fff;
    --favorites-hover-color: #760c0c;
    --favorites-title-color: #760c0c;
    --favorites-text-color: #fff;
    --content-background-color: #fff;
    --content-icons-color: #760c0c;
    --content-text-color: #760c0c;
}

/* ========== Global Styles ========== */
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-family: "Rubik", sans-serif;
    transition: background-color 0.3s ease;
    width: 100%;
    height: 100%;
}

/* ========== Loader ========== */
.loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--loader-background-color);
    z-index: 100;
    transition: opacity 0.75s, visibility 0.75s;
}

.loader--hidden {
    opacity: 0;
    visibility: hidden;
}

.ring {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ring 2s linear infinite;
}

.ring:before {
    position: absolute;
    content: "";
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.loader span {
    position: absolute;
    color: var(--loader-text-color);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: text 3s ease-in-out infinite;
}

@keyframes ring {
    0% {
        transform: rotate(0deg);
        box-shadow: 1px 5px 2px var(--loader-ring-color);
    }
    50% {
        transform: rotate(180deg);
        box-shadow: 1px 5px 2px var(--loader-ring-color);
    }
    100% {
        transform: rotate(360deg);
        box-shadow: 1px 5px 2px var(--loader-ring-color);
    }
}

@keyframes text {
    50% {
        color: var(--loader-text-color);
    }
}

/* ========== Logo ========== */
.pup_logo {
    width: 35px;
    height: 35px;
    margin-left: 5px;
    background-color: #fff;
    border-radius: 50px;
    padding: 6px;
}

.logo span {
    font-size: 22px;
    font-weight: 650;
    margin-left: 5px;
}

/* ========== Sidebar ========== */
.sidebar {
    position: absolute;
    z-index: 99;
    top: 0;
    left: 0;
    height: 100vh;
    width: 8vh;
    background-color: var(--sidebar-secondary-color);
    padding: 0.4rem 0.8rem;
    transition: width 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.sidebar.active {
    width: 250px;
}

.sidebar #btn {
    position: absolute;
    color: var(--sidebar-primary-color);
    top: 0.4rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    line-height: 50px;
    cursor: pointer;
    margin-top: 20px;
}

.sidebar.active #btn {
    margin-top: 20px;
    left: calc(100% - 30px);
}

.sidebar .top .logo {
    color: var(--sidebar-primary-color);
    display: flex;
    height: 50px;
    width: 100%;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    margin-top: 20px;
}

.sidebar.active .top .logo {
    opacity: 1;
}

.top .logo .pup_logo {
    margin-right: 10px;
}

.sidebar ul {
    flex-grow: 1;
    padding: 0;
    margin: 1rem 0;
}

.sidebar ul:last-child {
    position: absolute;
    bottom: 0;
}

.sidebar ul li {
    position: relative;
    list-style-type: none;
    height: 50px;
    width: 90%;
    margin: 0.8rem 0;
    line-height: 50px;
}

.sidebar ul li a {
    color: var(--sidebar-primary-color);
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 0.8rem;
}

.sidebar ul li a i {
    min-width: 56px;
    text-align: center;
    height: 50px;
    border-radius: 12px;
    line-height: 50px;
    font-size: 1.5rem;
    margin-right: 11px;
}

.sidebar ul li a:hover i {
    background-color: var(--sidebar-primary-color);
    color: var(--sidebar-secondary-color);
}

.sidebar .nav-item {
    display: none;
    white-space: nowrap;
}

.sidebar.active .nav-item {
    display: block;
}

/* ========== Search Box ========== */
.search-box {
    display: none;
    transition: opacity 0.3s ease, visibility 0.3s ease 0.3s;
}

.search-box.active {
    display: block;
    position: absolute;
    width: 400px;
    background: var(--searchbox-background-color);
    top: 20px;
    left: 100px;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease,
        background-color 0.3s ease;
    z-index: 90;
}

.row {
    display: flex;
    align-items: center;
    padding: 0px;
}

input {
    flex: 1;
    height: 20px;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 16px;
    color: var(--searchbox-secondary-color);
}

button {
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
}

button .fa-solid {
    width: 13px;
    color: var(--searchbox-secondary-color);
    font-size: 18px;
}

::placeholder {
    color: var(--searchbox-secondary-color);
    font-size: 14px;
}

.result-box {
    max-height: 200px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.result-box::-webkit-scrollbar {
    display: none;
}

.result-box ul {
    border-top: 1px solid var(--searchbox-secondary-color);
    padding: 5px 0;
    margin-top: 6px;
}

.result-box ul li {
    list-style: none;
    border-radius: 3px;
    padding: 10px 0;
    cursor: pointer;
    color: var(--searchbox-secondary-color);
}

.result-box ul li:hover {
    background: var(--searchbox-hover-color);
    color: #fff;
}

/* ========== Tooltip ========== */
.tooltip {
    background-color: var(--searchbox-primary-color);
    color: var(--searchbox-secondary-color);
    font-weight: 700;
    padding: 10px;
    position: relative;
    top: -18px;
    border-radius: 15px;
    opacity: 0;
    transition-duration: 0.3s;
    transition-property: opacity, top;
}

.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.show {
    opacity: 1;
    transform: translateY(0px);
}

/* ========== Images ========== */
img {
    height: 250px;
    width: 250px;
}

/* ========== Control Buttons ========== */
.recenter {
    position: absolute;
    bottom: 2%;
    left: 7%;
    background-color: var(--center-background-color);
    padding: 11px;
    border-radius: 30%;
    transition: width 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    z-index: 98;
}

.recenter i {
    font-size: 2rem;
    color: var(--center-icon-color);
}

.maps {
    position: absolute;
    bottom: 11%;
    left: 7%;
    background-color: var(--center-background-color);
    padding: 11px;
    border-radius: 30%;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    transition: width 0.3s ease, background-color 0.3s ease;
    z-index: 98;
}

.maps i {
    font-size: 1.8rem;
    color: var(--center-icon-color);
    position: absolute;
}

/* ========== Favorites Container ========== */
.favorite-container {
    z-index: 5;
    position: absolute;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70vh;
    background-color: var(--favorites-background-color);
    padding: 0.4rem 0.8rem;
    transition: transform 0.3s ease, opacity 0.3s ease,
        background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.favorite-container .top {
    display: flex;
    height: 50px;
    width: 100%;
    align-items: center;
    pointer-events: none;
    margin-top: -5px;
}

.favorite-container h1 {
    margin-top: 10px;
    margin-left: 10px;
    color: var(--favorites-title-color);
}

.clear {
    margin-left: auto;
    margin-top: -47px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: var(--favorites-title-color);
}

.favorite-container ul {
    flex-grow: 1;
    padding: 0;
    margin: 1rem 0;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.favorite-container ul::-webkit-scrollbar {
    display: none;
}

.favorite-container ul li {
    font-weight: 500;
    font-size: 18px;
    color: var(--favorites-text-color);
    text-align: center;
    position: relative;
    list-style-type: none;
    width: 70vh;
    margin: 0.8rem 0;
    line-height: 50px;
    background-color: var(--favorites-hover-color);
    border-radius: 0.8rem;
    overflow: hidden;
    cursor: pointer;
}

/* ========== Content Container (Hidden - Using Toast Instead) ========== */
.content-container {
    display: none !important;
}

.content-container.active {
    transform: translateX(0);
    opacity: 1;
}

.content-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(118, 12, 12, 0.08);
    z-index: 1;
    transition: all 0.3s ease;
}

.fa-solid.fa-bookmark {
    font-size: 24px;
    left: 27px;
    position: absolute;
    top: 15px;
    color: var(--content-icons-color);
    cursor: pointer;
    z-index: 2;
    display: none;
}

.fa-regular.fa-bookmark {
    font-size: 24px;
    left: 27px;
    position: absolute;
    top: 15px;
    color: var(--content-icons-color);
    cursor: pointer;
    z-index: 2;
}

.collapsed {
    transform: translateX(100%);
    opacity: 0;
}

#closeBtn {
    position: absolute;
    top: 15px;
    right: 27px;
    font-size: 24px;
    color: var(--content-icons-color);
    cursor: pointer;
    z-index: 2;
}

.content-container .main-content {
    max-height: calc(102vh - 50px);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 60px 15px 20px 15px;
}

.content-container .main-content::-webkit-scrollbar {
    display: none;
}

.content-container h2 {
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    font-size: 1.5rem;
}

.content-container p {
    font-weight: 400;
    margin: 0 0 15px 0;
    text-align: justify;
    line-height: 1.7;
    color: #4a4a4a;
    letter-spacing: 0.1px;
    font-size: 0.95rem;
}

.content-container.active {
    display: block;
}

.content-container.collapsed {
    transform: translateX(100%);
}

/* ========== Prevent Text Selection ========== */
.sidebar,
.content-container,
.favorite-container h1,
.favorite-container ul {
    user-select: none;
}

/* 2D Map removed per user request */

/* ========== Landscape Orientation Warning ========== */
.orientation-warning {
    display: none;
    position: fixed;
    inset: -20px;
    width: calc(100vw + 40px);
    width: calc(100svw + 40px);
    height: calc(100vh + 40px);
    height: calc(100dvh + 40px);
    min-width: calc(100vw + 40px);
    min-height: calc(100vh + 40px);
    min-height: calc(100dvh + 40px);
    min-height: -webkit-fill-available;
    background: #760c0c;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.orientation-content {
    text-align: center;
    color: white;
    padding: 40px 20px;
    max-width: 90%;
}

.orientation-content i {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate-icon 2s ease-in-out infinite;
    display: block;
}

.orientation-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
    color: white;
}

.orientation-content p {
    font-size: 16px;
    opacity: 0.9;
    color: white;
}

@keyframes rotate-icon {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(90deg);
    }
}

/* Show warning only on mobile devices in portrait mode */
@media (max-width: 900px) and (orientation: portrait) {
    .orientation-warning {
        display: flex !important;
    }
    
    html {
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        width: 100vw !important;
        width: 100svw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        width: 100vw !important;
        width: 100svw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
    }
}
