@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&display=swap');

body {
    font-family: 'Kalam', cursive;
    background-color: #ffffff;
    background-image: radial-gradient(#a9a9a9 1px, transparent 1px);
    background-size: 20px 20px;
    margin: 0;
    /* padding: 15px; */
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: 3px solid #999;
    border-radius: 10px;
    box-shadow: 4px 4px 10px rgba(33, 33, 33, 0.5);
    margin: 8px 10px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Kalam', cursive;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav-logo img {
    height: 40px;
    width: auto;
    border-radius: 6px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.note-link {
    display: inline-block;
    padding: 8px 14px;
    font-family: 'Kalam', cursive;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    box-shadow: 3px 3px 5px rgba(33, 33, 33, .3);
    border-radius: 6px;
    transform: rotate(-1deg);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.note-link:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 5px 5px 8px rgba(33, 33, 33, .4);
}

/* Sticky-note colors for nav buttons */
.note-yellow {
    background-color: #fff8b3;
}

.note-green {
    background-color: #d4ffb3;
}

.note-blue {
    background-color: #b3e0ff;
}

.note-pink {
    background-color: #ffb3d1;
}

.note-purple {
    background-color: #e6b3ff;
}

.note-orange {
    background-color: #ffc4b3;
}

/* Cheatsheet Content */
.sheet {
    max-width: 21cm;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 17px rgba(33, 33, 33, 0.5);
    border-radius: 10px;
}

h1 {
    text-align: center;
    font-family: 'Kalam', cursive;
    color: #333;
    margin-top: 20px;
}

.note {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    /* transform: rotate(-1deg); */
    /* transition: transform 0.2s ease; */
}

/* Sticky note colors */
.note-yellow {
    background: #fff8b3;
}

.note-green {
    background: #d4ffb3;
}

.note-blue {
    background: #b3e0ff;
}

.note-pink {
    background: #ffb3d1;
}

.npte-purple {
    background: #e6b3ff;
}

.note-orange {
    background: #ffc4b3;
}

h2 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
    padding-bottom: 5px;
}

pre {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255, 255, 255, 0.4);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

code {
    white-space: pre-wrap;
    line-height: 1.4;
}

p {
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.command-group {
    margin: 8px 0;
}

.command-desc {
    font-size: 0.8rem;
    color: #555;
    font-style: italic;
    margin-left: 10px;
}

/* Back Button */
.back-button {
    margin-bottom: 20px;
    display: inline-block;
}

/* Top Button */
#backToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

@media print {
    body {
        background: none;
        font-size: 10pt;
        padding: 0;
    }

    .navbar,
    #backToTopBtn {
        display: none;
    }

    .sheet {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }

    .note {
        box-shadow: none;
        border: 1px solid #ddd;
        transform: none !important;
        page-break-inside: avoid;
    }
}

/* Preloader Overlay */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    /* Match site background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* The Loader */
.loader {
    border: 6px solid #fff8b3;
    /* Pastel yellow */
    border-top: 6px solid #b3e0ff;
    /* Pastel blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite, colorchange 3s ease-in-out infinite;
}

/* Spin animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    background-image: radial-gradient(#a9a9a9 1px, transparent 1px);
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    /* border: 2px solid #999; */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #333;
    padding: 12px 20px;
    margin: 10px;
    text-decoration: none;
    display: block;
    font-family: 'Kalam', cursive;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateX(-5px);
    opacity: 0;
}

.dropdown:hover .dropdown-content a {
    transform: translateX(0);
    opacity: 1;
}

.dropdown-content a:nth-child(1) {
    transition-delay: 0.1s;
}

.dropdown-content a:nth-child(2) {
    transition-delay: 0.15s;
}

.dropdown-content a:nth-child(3) {
    transition-delay: 0.2s;
}

.dropdown-content a:nth-child(4) {
    transition-delay: 0.25s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 241, 216, 0.7);
    padding-left: 25px;
}

.dropbtn {
    position: relative;
    padding-right: 25px;
}

.dropbtn::after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropbtn::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Adjust navbar spacing */
.nav-links {
    gap: 8px;
}