/*fonts*/

@font-face {
    font-family: "Good Old Dos";
    src: url(fonts/good_old_dos/Good\ Old\ DOS\ Distorted.ttf);
}

@font-face {
    font-family: "Good Old Dos 3D";
    src: url(fonts/good_old_dos/Good\ Old\ DOS\ 3D.ttf);
}

@font-face {
    font-family: "Fake Receipt";
    src: url(fonts/Fake\ Receipt.otf);
}

@font-face {
    font-family: "LED";
    src: url(fonts/the_led_display_st/LED\ Dot-Matrix.ttf);
}

@font-face {
    font-family: "open 24 display";
    src: url(fonts/open_24_display_st/Open\ 24\ Display\ St.ttf);
}

@font-face {
    font-family: "digital dark system";
    src: url(fonts/digital\ dark\ system.ttf);
}

body {
    cursor: url('img/flames/Arrow.cur'), auto;
    background-color: rgb(167, 167, 167); 
    width: auto;
    margin: 10px;
    font-size: 100%;
    font-family: Good Old Dos, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/*custom cursor*/

a, button {
    cursor: url('img/flames/Hand.cur'), pointer;
}

a:active, button:active {
    cursor: url('img/flames/Hand.cur'), pointer;
}

input, textarea {
    cursor: url('img/flames/Text.cur'), text;
}

body:active {
    cursor: url('img/flames/Hand.cur'), auto;
}

/*header/h1*/

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70%;
    max-width: 800px;
    margin: 0 auto 20px;
    box-sizing: border-box;
}

h1 {
    color: rgb(255, 0, 0);
    text-align: center;
    max-width: 90vw;
    width: fit-content;
    background-color: rgb(0, 3, 161);
    font-size: clamp(12px, 4vw, 32px);
    letter-spacing: clamp(5px, 2vw, 30px);
    border: 1px solid rgb(255, 0, 0);
    padding: 10px;
    padding-left: calc(10px + clamp(5px, 2vw, 30px));
    box-sizing: border-box;
    margin: 0 15px auto;
}

h1:hover {
    color: rgb(255, 255, 255);
    background-color: rgb(255, 0, 0);
}

p {
    color: rgb(255, 255, 255);
}

#warning {
    color: rgb(255, 247, 0);
}

/*nav scrollbar*/

nav, main, .marquee-wrap {
    width: 70%;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.marquee-wrap {
    width: 70%;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgb(255, 0, 0);
    font-family: LED;
}

marquee {
    width: 100%;
    color: white;
    font-size: 15px;
    background-color: black;
}

/*nav*/

nav {
    background-color: rgb(0, 3, 161);
    border: 1px solid rgb(255, 0, 0);
    padding: 10px;
    text-align: center;
    width: 70%;
    margin: 0 auto;
}

nav a {
    color: white;
    margin: 0 15px;
    letter-spacing: 3px;
    text-decoration: none;
}

nav a:hover {
    color: red;
}

main {
    font-size: 14px;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid rgb(255, 0, 0);
    background-color: rgba(127, 127, 127, 0.787);
    background-size: cover;
    width: 70%;
    min-height: 960px;
}

.question {
    color: red;
    background-color: black;
}

.answer {
    color: ;
   
}

/*links*/
#links {
    text-align: center;
}
#links a:hover{
    color: red;
}

/*images/gallery*/

img {
    max-width: 100%;
    height: auto;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.gallery img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border: 2px solid red;
    cursor: url('img/flames/Hand.cur'), pointer;
}

.gallery img:hover {
    border-color: blue;
}

/*preview*/

#preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#preview-overlay.active {
    display: flex;
}

#close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: black;
    color: red;
    border: 1px solid red;
    font-size: 20px;
    padding: 5px 10px;
    z-index: 1001;
    font-family: "Good Old Dos";
}

#close-btn:hover {
    background: red;
    color: black;
}

#preview-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

#preview-img {
    width: 500px;
    height: 400px;
    object-fit: contain;
    border: 2px solid red;
    flex-shrink: 0;
}

#preview-info {
    color: white;
    min-width: 200px;
}

#preview-info h3 {
    color: red;
    margin-top: 0;
    font-size: 24px;
    font-family: "Good Old Dos 3D"; 
}

/*video grid*/

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    width: 100%;
}

.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 2px solid red;
    min-width: 0;
    box-sizing: border-box;
}

.video-wrap:hover {
    border: 2px solid blue;
}

.video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/*clock/calendar*/

.date-display {
    color: rgb(255, 255, 255);
}

#date-span {
    color: rgb(255, 0, 0);
    background-color: white;
    font-family: "Fake Receipt";
    font-weight: bold;
}

#time-span {
    color: rgb(255, 0, 0);
    background-color: white;
    font-family: "Fake Receipt";
    font-weight: bolder;
}

/*tetris*/

#tet-flex {
    display: flex; 
    gap: 20px; 
    align-items: flex-start;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(10, 20px);
    grid-template-rows: repeat(20, 20px);
    gap: 1px;
    background-color: #111;
    width: fit-content;
    margin: 20px 20px;
    border: 1px solid rgb(255, 0, 0);
}

.cell {
    width: 20px;
    height: 20px;
    background-color: #000;
}

.cell.active {
    background-color: rgb(255, 0, 0); 
}

.cell.occupied {
    background-color: rgb(0, 3, 161);
}

#score-board {
    color: white;
    text-align: left;
    font-size: 20px;
    font-weight: bold;
    font-family: Good Old Dos, Arial, Helvetica, sans-serif;
    margin: 20px;
}

#game-instructions {
    justify-content: right;
    color: white;
    font-size: 20px;
    font-family: Good Old Dos, Arial, Helvetica, sans-serif;
}

#mobile-controls {
    display: none;
    text-align: center;
    margin-top: 10px;
}

#mobile-controls button {
    background: black;
    color: red;
    border: 1px solid red;
    font-size: 24px;
    padding: 10px 20px;
    margin: 4px;
    font-family: "Good Old Dos";
}

@media (max-width: 600px) {
    #mobile-controls {
        display: block;
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 600px) {
    .mobile-only {
        display: block;
    }
}

/*secret page*/

#secret {
    color: rgba(0, 0, 0, 0.5); 
    opacity: 0; 
    position: absolute;
}

#secret:hover {
    color: white;
}

/*mobile*/

@media (max-width: 600px) {
    nav, main, .marquee-wrap, .header {
        width: 95%;
    }

    h1 {
        font-size: 24px;
        letter-spacing: 8px;
    }

    nav a {
        margin: 0 6px;
        font-size: 16px;
    }

    main {
        font-size: 18px;
    }

    .wip-img {
        width: 100px;
    }

    p {
        font-size: 18px;
    }

    marquee {
        font-size: 18px;
    }
    
    #preview-content {
    flex-direction: column;
    align-items: center;
    }

    #preview-img {
        width: 90vw;
        height: auto;
        max-height: 60vh;
    }

    #preview-info {
        min-width: unset;
        width: 90vw;
    }
    .gallery {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 6px;
    }

    .gallery img {
        width: 100% !important;
        height: 120px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}