html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

body {
    /* Background image */
    background-image: url('../images/background.jpg'); /* adjust path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* CONTROL BAR */
.control-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 90px;
    height: 100vh;
    background-color: #1e607a;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    z-index: 1000;
}

.control-icon {
    width: 50px;
    height: 50px;
    margin: 12px 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.control-icon:hover {
    transform: scale(1.1);
}

/* DROPDOWNS */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 90px;
    top: 0;
    background-color: #1e607a;
    min-width: 120px;
    flex-direction: column;
    z-index: 1000;
}

.dropdown-content a {
    color: white;
    padding: 8px 10px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #48e082;
}

.dropdown.show .dropdown-content {
    display: flex;
}

.slide-container {
    position: absolute;
    left: 90px;
    top: 0;
    width: calc(100% - 90px);
    height: 100vh;
    overflow: auto;
    
    background-image: url('../images/background.jpg'); /* use correct path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* SLIDE WRAPPER */
.slide-wrapper {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    min-width: 100%;
}

/* SLIDE IMAGE */
#slide-image {
    display: block;
    transform-origin: top left;
}

/* NAVIGATION BUTTONS */
#prev-btn,
#next-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

#prev-btn { left: 110px; }
#next-btn { right: 20px; }

#prev-btn:hover,
#next-btn:hover {
    background-color: rgba(0,0,0,0.8);
}
/* ==========================
   AUDIO LIST POSITION & PLAYER
   ========================== */

/* Audio buttons container */
#audio-list-container {
    position: fixed;
    top: 50px;              /* distance from the top of the page */
    left: 120px;            /* to the right of the control panel */
    display: none;          /* hidden by default */
    flex-direction: column; 
    gap: 8px;               /* space between buttons */
    background-color: rgba(0,0,0,0.7); /* semi-transparent background */
    padding: 10px;
    border-radius: 8px;
    z-index: 2000;          /* on top of everything */
}

/* Audio buttons */
#audio-list-container button {
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    color: white;
    background-color: #1e607a;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
#audio-list-container button:hover {
    background-color: #1e607a;
}

/* Audio player */
#slide-audio {
    position: fixed;
    bottom: 50px;           /* distance from bottom */
    left: 120px;            /* align with audio buttons */
    z-index: 2000;          /* above everything */
}
#hide-audio-btn {
    background-color: #1e607a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#hide-audio-btn:hover {
    background-color: #1e607a;
}
/* ==========================
   VIDEO LIST POSITION & PLAYER
   ========================== */

/* Video buttons container */

 #video-list-container {

    position: fixed;

    top: 80px;
    left: 120px;

    display: none;

    flex-direction: column;

    gap: 10px;

    background: rgba(15,15,15,0.95);

    padding: 16px;

    border-radius: 12px;

    z-index: 4000;

    min-width: 220px;

    box-shadow:
        0 0 20px rgba(0,0,0,0.4);

    backdrop-filter: blur(6px);
}

/* Video buttons */
#video-list-container button {

    padding: 12px 16px;

    font-size: 15px;

    cursor: pointer;

    color: white;

    background: #1e607a;

    border: none;

    border-radius: 8px;

    text-align: left;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

#video-list-container button:hover {

    background: #48e082;

    transform: translateX(4px);
}

/* Video player */
#slide-video {
    max-width: 80%;           /* max width */
    max-height: 70%;          /* max height */
    position: fixed;
    top: 50%;                 /* center vertically */
    left: 50%;                /* center horizontally */
    transform: translate(-50%, -50%);
    z-index: 2000;            /* above everything */
}

/* Hide video button */
#hide-video-btn {
    background-color: #1e607a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#hide-video-btn:hover {
    background-color: #1e607a;
}
/* ==========================
   EDIT TRAY SYSTEM
========================== */

#edit-tray {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* hidden by default */
    gap: 15px;
    background-color: rgba(0,0,0,0.85);
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 5000; /* ABOVE EVERYTHING */
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.edit-tool-btn {
    font-size: 40px;
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #1e607a;
    color: white;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.edit-tool-btn:hover {
    background-color: #1e607a;
    transform: scale(1.1);
}
/* WHITEBOARD */
#whiteboard {
    position: fixed;
    top: 3%;
    left: 130px; /* leaves space for control panel */
    width: calc(95% - 90px);
    height: 80vh;
    background-color: white;
    border: 10px solid #a0a0a0; /* metal edge color */
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    display: none; /* hidden by default */
    z-index: 3000; /* above slides but below edit tray (5000) */
}
/* ==========================
   PENCIL SIZE MENU
========================== */

#pencil-size-menu {
    position: absolute;
    bottom: 70px; /* appears above tray */
    left: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(0,0,0,0.9);
    padding: 10px;
    border-radius: 10px;
}

.size-option {
    background-color: rgb(182, 55, 55);
    border-radius: 50%;
    cursor: pointer;
}

/* Small */
.size-option[data-size="2"] {
    width: 8px;
    height: 8px;
}

/* Medium */
.size-option[data-size="5"] {
    width: 14px;
    height: 14px;
}

/* Large */
.size-option[data-size="10"] {
    width: 22px;
    height: 22px;
}

.size-option:hover {
    transform: scale(1.2);
}
#whiteboard-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair; /* shows a pencil cursor */
}
/* ==========================
   SLIDE EDIT CANVAS
========================== */

.edit-tool-btn {

    font-size: 40px;

    padding: 10px 14px;

    cursor: pointer;

    border: none;

    border-radius: 12px;

    background-color: #1e607a;

    color: white;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;

    /* 3D EFFECT */
    box-shadow:
        0 8px 0 #12485d,
        0 12px 18px rgba(0,0,0,0.35);
}

/* HOVER */

.edit-tool-btn:hover {

    transform:
        translateY(-3px)
        scale(1.05);
}

/* CLICK EFFECT */

.edit-tool-btn:active {

    transform:
        translateY(5px);

    box-shadow:
        0 2px 0 #12485d,
        0 5px 10px rgba(0,0,0,0.25);
}

/* CLICK EFFECT */

.edit-tool-btn:active {

    transform:
        translateY(5px);

    box-shadow:
        0 2px 0 #12485d,
        0 5px 10px rgba(0,0,0,0.25);
}
/* Text box styling */
.text-box {
    position: absolute;
    min-width: 50px;
    min-height: 20px;
    padding: 4px;
    border: 1px solid #666;
    outline: none;
    font-size: 20px;
    color: black;
    z-index: 1000;
    background: #fff;
}

/* Toolbar above text box */
.text-box-toolbar {
    position: absolute;
    display: flex;
    gap: 5px;
    padding: 3px 5px;
    background: #f0f0f0;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    z-index: 1100;
}
.text-box-toolbar button {
    cursor: pointer;
    border: 1px solid #aaa;
    background: #fff;
    padding: 2px 5px;
    border-radius: 3px;
}
.text-box-toolbar input[type="color"] {
    padding: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
}
.text-box {
    position: absolute;
    background: #fff;
    border: 1px solid #888;
    padding: 2px 4px;
    min-width: 80px;
    min-height: 24px;
    z-index: 1000;
}
#clear-tool img{
    width:24px;
    height:24px;
}
.active-tool {

    background-color: #48e082;

    box-shadow:
        0 4px 0 #1d7f4a,
        0 8px 14px rgba(0,0,0,0.35);
}
.slide-container {
    position: relative;
}

#slide-image {
    position: relative;
    z-index: 1;
}

#edit-canvas {
    position: absolute;
    z-index: 2;
}

.slide-textbox {
    position: absolute;
    z-index: 999999;
    pointer-events: auto;
}
.control-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 90px;
    height: 100vh;
    background-color: #1e607a;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    z-index: 1000;

    /* IMPORTANT ADD THIS */
    justify-content: flex-start;
}

/* pushes logo to the bottom */
.control-logo {
    margin-top: auto;
    margin-bottom: -50px;
    width: 250px;
    height: 250px;
}

.control-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-label {
    color: white;
    font-size: 11px;
    margin-top: -6px;
    margin-bottom: 8px;
    text-align: center;
}
/* ==========================
   PRESENTATION LIST
========================== */

#presentation-list-container {
    position: fixed;
    top: 60px;
    left: 220px;
    display: none;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(0,0,0,0.85);
    padding: 12px;
    border-radius: 8px;
    z-index: 3000;
    max-height: 70vh;
    overflow-y: auto;
}

#presentation-list-container button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #1e607a;
    color: white;
    font-size: 14px;
}

#presentation-list-container button:hover {
    background-color: #48e082;
}
/* ==========================
   PRESENTATION UNIT LIST
========================== */

#presentations-unit-container {
    position: fixed;
    top: 60px;
    left: 120px;
    display: none;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(0,0,0,0.85);
    padding: 10px;
    border-radius: 8px;
    z-index: 3000;
}

#presentations-unit-container button {
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    color: white;
    background-color: #1e607a;
    border: none;
    border-radius: 4px;
}


/* ==========================
   PRESENTATION LIST
========================== */

#presentation-list-container {
    position: fixed;
    top: 60px;
    left: 120px;
    display: none;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(0,0,0,0.85);
    padding: 10px;
    border-radius: 8px;
    z-index: 3000;
}

#presentation-list-container button {
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    color: white;
    background-color: #1e607a;
    border: none;
    border-radius: 4px;
}

#presentation-list-container button:hover {
    background-color: #48e082;
}
/* ==========================
   PRESENTATION VIEWER
========================== */

#presentation-viewer {

    position: fixed;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 90%;
    height: 90%;

    background: black;

    display: none;

    z-index: 4000;

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* iframe */

#presentation-frame {

    width: 100%;
    height: 100%;

    border: none;

    background: white;
}

/* close button */

#hide-presentation-btn {

    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 4500;

    display: none;

    padding: 10px 16px;

    background: #1e607a;

    color: white;

    border: none;

    border-radius: 6px;

    cursor: pointer;

    font-size: 14px;
}

#hide-presentation-btn:hover {

    background: #48e082;
}
/* ==========================
   GAMES HUB
========================== */

#games-hub {

    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    display: none;

    grid-template-columns: repeat(2, 240px);

    gap: 30px;

    z-index: 5000;
}

/* ==========================
   GAME CARDS
========================== */

.game-card {

    width: 220px;
    height: 220px;

    display: flex;

    justify-content: center;
    align-items: center;

    text-align: center;

    padding: 15px;

    font-size: 26px;
    font-weight: bold;

    color: white;

    background:
        linear-gradient(
            145deg,
            #2a7d9e,
            #1e607a
        );

    border-radius: 22px;

    cursor: pointer;

    user-select: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    /* 3D EFFECT */
    box-shadow:
        0 10px 0 #12485d,
        0 14px 24px rgba(0,0,0,0.35);
}

/* HOVER */

.game-card:hover {

    transform:
        translateY(-5px)
        scale(1.04);

    background:
        linear-gradient(
            145deg,
            #48e082,
            #1e607a
        );
}

/* CLICK EFFECT */

.game-card:active {

    transform:
        translateY(5px);

    box-shadow:
        0 3px 0 #12485d,
        0 6px 12px rgba(0,0,0,0.25);
}
/* ==========================
   GAME VIEWER
========================== */

#game-viewer {

    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 92%;
    height: 92%;

    background: black;

    display: none;

    z-index: 6000;

    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 0 25px rgba(0,0,0,0.7);
}

/* iframe */

#game-frame {

    width: 100%;
    height: 100%;

    border: none;

    background: white;
}

/* close button */

#hide-game-btn {

    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 7000;

    display: none;

    padding: 10px 16px;

    background: #1e607a;

    color: white;

    border: none;

    border-radius: 8px;

    cursor: pointer;

    font-size: 15px;
}

#hide-game-btn:hover {

    background: #48e082;
}