/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
}

*, iframe, .iframe-window {
  cursor: url('https://cdn.cursors-4u.net/previews/sega-nomad-c6ba1244-32.webp') 32 32, auto !important;
}




html,
body {

    margin: 0;
    padding: 0;

    width: 100%;
    min-height: 100%;

}


/* =====================================================
   PAGE
===================================================== */

body {

    min-height: 100vh;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 30px;

    background: #e7e2df;

    font-family:
        "Courier New",
        monospace;

    overflow-x: hidden;

}


/* =====================================================
   MAIN DESKTOP WINDOW

   This is the ONLY outer container.
===================================================== */

.desktop-window {

    width: min(920px, 92vw);

    height: min(680px, 88vh);

    min-height: 500px;

    display: flex;

    flex-direction: column;

    position: relative;

    background: #d9d1d0;

    border: 3px solid #16162b;

    box-shadow:
        6px 6px 0 #777276;

    overflow: hidden;

}


/* =====================================================
   TITLE BAR
===================================================== */

.title-bar {

    width: 100%;

    height: 40px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-left: 10px;

    background: #f3dfd8;

    border-bottom: 2px solid #29243d;

    color: #201b2d;

    font-size: 15px;

    font-weight: bold;

}


.window-title {

    display: flex;

    align-items: center;

    gap: 8px;

}


.title-icon {

    color: #40335e;

    font-size: 14px;

}


.window-controls {

    height: 100%;

    display: flex;

}


.window-controls button {

    width: 42px;

    height: 100%;

    border: none;

    border-left: 1px solid #c5b2b4;

    background: transparent;

    color: #293bb0;

    font-family: Arial, sans-serif;

    font-size: 18px;

    cursor: pointer;

}


.window-controls button:hover {

    background: #dfc6c8;

}


/* =====================================================
   HEADER BAR
===================================================== */

.header-bar {

    width: 100%;
    height: 48px;

    flex-shrink: 0;

    display: flex;
    align-items: center;

    padding: 5px 5px;

    background: #263db1;

    border: 2px solid #111b68;

}


/* =====================================================
   INNER HEADER BOX
===================================================== */

.header-inner {

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;

    padding: 0 5px;

    border: 1px solid #ffffff;

    color: #ffffff;

    font-family:
        "Courier New",
        monospace;

    font-size: 12px;

}

.header-inner a{
    color: #ffffff;
    text-decoration: underline;
}


/* =====================================================
   DESKTOP

   THIS IS THE MAIN CANVAS.

   Everything belonging to the desktop
   goes inside this element.
===================================================== */

.desktop {

    flex: 1;

    min-height: 0;

    width: 100%;

    position: relative;

    overflow: hidden;


    background-image:
        url("shrine_media/new_shrinebg.gif");


    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

}


/* =====================================================
   TOOLBAR

   Positioned INSIDE desktop.
===================================================== */

.toolbar {

    position: absolute;

    top: 0;

    left: 0;

    width: 58px;

    height: 100%;

    padding: 5px;

    background: #e9e0df;

    border-right: 2px solid #191832;

    overflow: hidden;

    z-index: 20;

}


/* =====================================================
   TWO-COLUMN TOOLBAR
===================================================== */

.toolbar-grid {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 3px;

}


.toolbar-grid button {

    width: 22px;

    height: 27px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 2px solid #4a4155;

    background: #f4eeee;

    color: #3C56A4;

    font-family:
        "Courier New",
        monospace;

    font-size: 12px;

    cursor: pointer;

}


.toolbar-grid button:hover {

    background: #cdd4ee;

}


.toolbar-grid button:active {

    background: #aeb8df;

}


/* =====================================================
   TOOLBAR LINES
===================================================== */

.toolbar-lines {

    margin-top: 6px;

    padding: 5px 3px;

    border: 2px solid #4b4251;

    background: #eee5e4;

}


.toolbar-lines span {

    display: block;

    height: 3px;

    margin: 4px 0;

    background: #293bb0;

}


/* =====================================================
   IFRAME WINDOW

   Positioned directly to the right of the toolbar.

   It is intentionally a THIN VERTICAL
   rectangle.
===================================================== */

.iframe-window {

    position: absolute;

    top: 2%;

    left: 68px;

    width: 250px;

    height: 70%;

    background:#f4eeee ;

    border: 2px solid #29243d;

    z-index: 15;

    overflow: hidden;

}


/* =====================================================
   IFRAME
===================================================== */

.iframe-window iframe {

    display: block;

    width: 100%;

    height: 100%;

    border: none;

    background: #f4eeee;

}


/* =====================================================
   SCREEN CONTENT

   This is the area where your future
   content goes.

   It sits inside .desktop.
===================================================== */

.screen-content {

    position: absolute;


    /*
        Leave room for the toolbar.
    */

    top: 0;

    left: 58px;

    right: 20px;

    bottom: 0;

    padding: 20px;

    overflow-x: hidden;

    overflow-y: auto;

    overflow-wrap: break-word;

    word-break: break-word;

    color: white;

    z-index: 5;

}


/* =====================================================
   SCREEN CONTENT SCROLLBAR
===================================================== */

.screen-content::-webkit-scrollbar {

    width: 7px;

}


.screen-content::-webkit-scrollbar-track {

    background: rgba(5, 8, 25, 0.5);

}


.screen-content::-webkit-scrollbar-thumb {

    background: #777b9b;

    border: 1px solid #242642;

}


/* =====================================================
   QUOTE SECTION

   IMPORTANT:

   This belongs to .desktop.

   It is NOT inside a bottom container.

   It can overlap the background.
===================================================== */

.quote-section {
    position: absolute;
    left: 0;
    bottom: 0;

    width: 175px;
    height: 140px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;

    background: #293bb0;
    border-top: 2px solid #111b69;
    border-right: 2px solid #111b69;

    color: #ffffff;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;

    z-index: 30;
}

.quote-text {
    position: relative;

    width: 100%;
    height: 100%;
    font-style: italic;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid white;

    text-align: center;
}


/* ===== QUOTE TOOLTIP ===== */

.quote-text::after {
    content: attr(data-tooltip);

    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);

    width: 160px;
    padding: 6px 8px;

    background: #f1e5e2;
    color: #25203a;

    border: 1px solid #29243d;

    font-family: "Courier New", monospace;
    font-style: italic;
    font-weight: bold;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition: opacity 0.15s ease;
    z-index: 100;
}

.quote-text:hover::after {
    opacity: 1;
    visibility: visible;
}


/* =====================================================
   COLOR PALETTE

   ALSO BELONGS DIRECTLY TO .desktop.

   It is independent from the quote.
===================================================== */

.color-palette {

    position: absolute;


    /*
        Position relative to the desktop.
    */

    left: 180px;

    bottom: 8px;

    width: 300px;

    height: 46px;

    display: grid;

    grid-template-columns:
        repeat(10, 1fr);

    grid-template-rows:
        repeat(2, 23px);

    border: 1px solid #403a45;

    z-index: 30;

}


/* =====================================================
   PALETTE BUTTONS
===================================================== */

.palette-color {

    width: 100%;

    height: 23px;

    padding: 0;

    border: 1px solid black;

    cursor: pointer;

}


.palette-color:hover {

    outline: 2px solid #ffffff;

    outline-offset: -3px;

    z-index: 2;

}


/* =====================================================
   PALETTE COLORS
===================================================== */

.color-1  { background: #fff1b8; }  /* soft yellow */
.color-2  { background: #ffd166; }  /* golden yellow */
.color-3  { background: #ff9f43; }  /* orange */
.color-4  { background: #ff6b35; }  /* bright orange-red */
.color-5  { background: #ff4f6d; }  /* coral red */

.color-6  { background: #ff6fae; }  /* pink */
.color-7  { background: #ff4f9a; }  /* hot pink */
.color-8  { background: #f72585; }  /* vivid pink */
.color-9  { background: #e63972; }  /* raspberry */
.color-10 { background: #d6285f; }  /* deep pink-red */

.color-11 { background: #ff7b54; }  /* warm coral */
.color-12 { background: #ffb347; }  /* pastel orange */
.color-13 { background: #ffe066; }  /* bright yellow */
.color-14 { background: #70d6ff; }  /* sky blue */
.color-15 { background: #48cae4; }  /* cyan blue */

.color-16 { background: #2196f3; }  /* bright blue */
.color-17 { background: #4361ee; }  /* electric blue */
.color-18 { background: #3a0ca3; }  /* deep violet-blue */
.color-19 { background: #7209b7; }  /* purple */
.color-20 { background: #b5179e; }  /* magenta */


/* =====================================================
   STATUS BAR

   DIRECT CHILD OF DESKTOP-WINDOW.

   NOT PART OF DESKTOP.
===================================================== */

.status-bar {

    width: 100%;

    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 15px;

    background: #f2e4df;

    border-top: 2px solid #29243b;

    color: #252037;

    font-size: 14px;

}


.status-left {

    display: flex;

    align-items: center;

    gap: 12px;

}


.status-symbol {

    font-size: 13px;

}


.status-right {

    font-weight: bold;

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {


    body {

        padding: 10px;

    }


    .desktop-window {

        width: 96vw;

        height: auto;

        aspect-ratio: 920 / 680;

        min-height: 0;

    }


    /* TITLE BAR */

    .title-bar {

        height: 6%;

        min-height: 28px;

        font-size: 10px;

    }


    .window-controls button {

        width: 28px;

        font-size: 14px;

    }


    /* HEADER */

    .header-bar {

        height: 7%;

        min-height: 30px;

        font-size: 12px;

    }
    .header-inner {
        font-size: 10px;
    }
    .header-inner img {
        width: 12px;
    }


    /* =================================================
       DESKTOP
    ================================================= */

    .desktop {

        min-height: 0;

    }


    /* =================================================
       TOOLBAR
    ================================================= */

    .toolbar {

        width: 7%;

        padding: 3px;

    }


    .toolbar-grid {

        gap: 2px;

    }


    .toolbar-grid button {

        width: 100%;

        height: 24px;

        font-size: 8px;

    }


    .toolbar-lines {

        padding: 2px;

    }


    .toolbar-lines span {

        height: 2px;

        margin: 3px 0;

    }


    /* =================================================
       IFRAME WINDOW — MOBILE
    ================================================= */

    .iframe-window {

        top: 6%;

        left: 9%;

        width: 25%;

        height: 72%;

    }


    /* =================================================
       CONTENT
    ================================================= */

    .screen-content {

        left: 7%;

        right: 2%;

        padding: 10px;

    }


    /* =================================================
       QUOTE

       Still belongs directly to desktop.
    ================================================= */

    .quote-section {

        width: 25%;

        height: 20.5%;

        padding: 8px;

        font-size: 8px;

    }


    /* =================================================
       PALETTE

       Still completely independent.
    ================================================= */

    .color-palette {

        left: 26%;

        bottom: 2%;

        width: 28%;

        height: 28px;

        grid-template-rows:
            repeat(2, 14px);

    }


    .palette-color {

        height: 14px;

    }


    /* =================================================
       STATUS
    ================================================= */

    .status-bar {

        height: 6%;

        min-height: 25px;

        padding: 0 8px;

        font-size: 8px;

    }

}


/* =====================================================
   VERY SMALL MOBILE
===================================================== */

@media (max-width: 420px) {


    body {

        padding: 5px;

    }


    .desktop-window {

        width: 98vw;

    }


    /* TOOLBAR */

    .toolbar {

        width: 8%;

    }


    .toolbar-grid button {

        height: 18px;

        font-size: 6px;

    }


    .toolbar-lines {

        display: none;

    }

    .header-inner {
        font-size: 8px;
    }
    .header-inner img{
        width: 10px;
    }


    /* =================================================
       IFRAME WINDOW — VERY SMALL MOBILE
    ================================================= */

    .iframe-window {

        top: 5%;

        left: 10%;

        width: 27%;

        height: 70%;

    }


    /* CONTENT */

    .screen-content {

        left: 8%;

        padding: 6px;

    }


    /* QUOTE */

    .quote-section {

        width: 27%;

        height: 20.5%;

        padding: 5px;

        font-size: 6px;

    }


    /* PALETTE */

    .color-palette {

        left: 28%;

        bottom: 3%;

        width: 32%;

        height: 18px;

        grid-template-rows:
            repeat(2, 9px);

    }


    .palette-color {

        height: 9px;

    }


}