@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200..1000&display=swap');

:root {
    --bd-green-bg: #87a700;
    --brand-green: #87a700;
    --bd-green-bg-hover: #627800;
    --bd-green-bg-active: #3e4c00;
    --bd-green-bg-focus: #3e4c00;
    --sidebar-width: 120px;
    --header-height: 10vh;
}

.custom-popover {
    /* --bs-popover-max-width: fit-content; */
    --bs-popover-border-color: var(--bd-green-bg);
    --bs-popover-header-bg: var(--bd-green-bg);
    --bs-popover-header-color: var(--bs-white);
    --bs-popover-body-padding-x: 1rem;
    --bs-popover-body-padding-y: .5rem;
}

body {
    background-color: #f1f1f1;
    min-width: 100%;
    font-family: "Nunito", serif;
    font-optical-sizing: auto;
    font-style: normal;
}

hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 0;
    background-color: #87a700;
    height: 3px;
    opacity: 100%;
}

/* Base sidebar styles (single element) */
#sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding-top: 0.75rem;
    z-index: 1040;
    transition: transform .28s ease, box-shadow .28s ease;
    -webkit-overflow-scrolling: touch;
}

/* Small screens: hide by default (off-canvas) */
@media (max-width: 767.98px) {
    #sidebar {
        transform: translateX(-105%);
        /* hide off-canvas */
        width: 78%;
        /* overlay width on mobile */
        max-width: 320px;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
        border-right: 1px solid rgba(0, 0, 0, 0.06);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    /* floating toggle button (mobile only) */
    .sidebarToggle {
        display: inline-flex;
        position: fixed;
        left: 0.75rem;
        top: calc(var(--header-height) + 0.5rem);
        z-index: 1060;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    }

    /* backdrop for overlay */
    #sidebarBackdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1035;
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease;
    }

    #sidebarBackdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Desktop & tablet: show sidebar, add left margin to content */
@media (min-width: 768px) {
    .sidebarToggle {
        display: none;
    }

    #sidebar {
        transform: translateX(0);
    }
}

/* small niceties to match your original visual style */
#sidebar a {
    text-decoration: none;
}

#sidebar .btn {
    pointer-events: none;
}

/* your icons are buttons visually; anchors are the actionable items */
#sidebar .btn img {
    pointer-events: none;
}

.main-content {
    padding-top: 10vh;
    padding-bottom: 10vh;
    width: 100%;
    height: 100%;
    margin: auto;
}

.header {
    width: 100%;
    height: 10vh;
    background-color: #87a700;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 20px;
}

.content {
    height: 100%;
    overflow-y: auto;
}

@media (min-width: 767.98px) {
    .content {
        margin-left: var(--sidebar-width);
    }
}

.dashboard-welcome {
    background-color: #9c28b1;
    color: white;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.card {
    margin: 20px 0;
}

.card:hover {
    cursor: pointer;
    transition: background-color .2s ease-in-out;
    background-color: rgb(246, 255, 240);
}

.card img {
    max-width: 100%;
    border-radius: 5px;
}

.img-preview:hover {
    transform: scale(2);
    transition: transform 0.3s ease-in-out;
    border-radius: 25px;
}

.play-recording {
    background-color: #87a700;
    color: white;
}

.gemini-button {
    background: linear-gradient(45deg, #EC5858 1%, #6042a0 40%, #4332ff 100%);
    color: white;
    /* Make the text itself transparent */
}

.gemini-button:hover {
    transition: all 0.8s ease-in-out;
    color: white;
    background: linear-gradient(100deg, #4332ff 10%, #6042a0 75%, #EC5F5F 100%);
}

.check-icon {
    font-size: smaller;
    position: absolute;
    top: 25%;
    transform: translate(-50%, -50%);
    /* Adjust to position the icon in the corner */
}

.timer {
    color: #87a700;
    font-weight: bold;
    font-size: 24px;
}

.box {
    display: flex;
    justify-content: center;
    align-items: center;
}

.box span {
    position: relative;
    top: 0px;
    display: inline-block;
    animation: bounce 0.3s ease 10 alternate;
}

.remark-category {
    text-shadow: 0 6px rgba(136, 167, 0, 0.1);
    animation: hard-pop 0.8s ease-in-out;
}

.btn-student {
    /* Give your button a class */
    background-color: #a1c200;
    transition: background-color 0.3s ease;
}

.btn-student:hover {
    background-color: #e4a800;
    cursor: pointer;
    /* Change cursor to a pointer on hover */
}

.btn-teacher {
    /* Give your button a class */
    background-color: #8fb300;
    transition: background-color 0.3s ease;
}

.btn-teacher:hover {
    background-color: #e4a800;
    cursor: pointer;
    /* Change cursor to a pointer on hover */
}

.btn-signup-link:hover {
    text-decoration: none;
    background-color: #e45b00;
    cursor: pointer;
    /* Change cursor to a pointer on hover */
}

@keyframes bounce {
    100% {
        top: -20px;
        text-shadow: 0 1px #ccc,
            0 2px #ccc,
            0 3px #ccc,
            0 4px #ccc,
            0 5px #ccc,
            0 6px #ccc,
            0 7px #ccc,
            0 8px #ccc,
            0 9px #ccc,
            0 25px 12.5px rgba(209, 205, 205, 0.9);
    }
}

@keyframes hard-pop {
    0% {
        transform: scale(0);
    }

    40% {
        transform: scale(2);
    }

    100% {
        transform: scale(1);
    }
}

.box span:nth-child(2) {
    animation-delay: 0.1s;
}

.box span:nth-child(3) {
    animation-delay: 0.2s;
}

.box span:nth-child(4) {
    animation-delay: 0.3s;
}

.box span:nth-child(5) {
    animation-delay: 0.4s;
}


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        /* Slightly enlarges the image */
        opacity: 0.9;
        /* Optional: Slight fade */
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#wizard-dialog {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    transform: translate(50%, 0);
}

#wizard-image {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Confetti */
#confetti-container {
    overflow: hidden;
}

/* Confetti container */
.confetti-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Confetti pieces */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--confetti-color);
    opacity: 0.8;
    animation: confetti-fall linear infinite;
    transform-origin: center;
}

/* Keyframes for falling animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0);
    }

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

.activity-card {
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.activity-card:hover {
    border-color: #87a700;
    transform: translateY(-5px);
}

.activity-card.selected {
    border-color: #87a700;
    background-color: rgba(135, 167, 0, 0.1);
    /* Light background for selected card */
}

.activity-card .form-check-input:checked {
    background-color: #87a700;
    border-color: #87a700;
}

.activity-card .form-check-label {
    margin-left: 5px;
}


.wordlist-info-wrapper {
    margin: 20px;
}

.wordlist-info-wrapper * {
    transition: all 0.2s ease;
}

.wordlist-info-wrapper .extra-info {
    display: none;
    line-height: 30px;
    font-size: 12px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 110%;
    white-space: nowrap;
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.wordlist-info-wrapper .info:hover .extra-info {
    display: block;
}

.wordlist-info-wrapper .info {
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
    background-color: transparent;
    position: relative;
    cursor: pointer;
}

.wordlist-info-wrapper .info:hover {
    background-color: white;
    text-align: left !important;
}


/* Shimmering effect for Avatars */
.shimmer {
    color: gray;
    display: inline-block;
    mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) right/350% 100%;
    animation: shimmer 3s infinite;
    font-size: 50px;
    max-width: 200px;
}

.avatar-gold {
    filter: sepia(70%) saturate(250%) hue-rotate(360deg) brightness(1) contrast(1.1);
    animation: shimmer 2s infinite;
}

.avatar-silver {
    filter: sepia(83%) saturate(50%) hue-rotate(360deg) brightness(1) contrast(1.1);
    animation: shimmer 2.5s infinite;
}

@-webkit-keyframes shimmer {
    100% {
        -webkit-mask-position: left;
    }
}
@keyframes shimmer {
    100% {
        mask-position: left;
    }
}