/* ======================================================
   FONTS
====================================================== */

@font-face {
    font-family: 'prstart';
    src: url('prstart.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'saturno';
    src: url('saturno.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: '712serif';
    src: url('712serif.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}



/* ======================================================
   GLOBAL RESET & BASE
====================================================== */

* {
    box-sizing: border-box;
}

html {
    cursor: url(../assets/images/spider6.png), auto;
    height: 100%;
}

html, body {
    overflow-x: hidden;
}

body {
    background-color: black;
    background-image: url('../assets/backgrounds/candlestick.jpg');
    margin-left: 40px;
    margin-right: 40px;
    min-height: 100vh;
}

main {
    margin: 0;
}


/* ======================================================
   TYPOGRAPHY
====================================================== */

h1 {
    color: palevioletred;
    font-size: 50px;
    font-weight: 100;
    text-shadow: 1px 1px 2px black;
    text-align: center;
    transition: transform 0.3s;
}

h1:hover {
    transform: scale(1.1);
}

h1 a {
    color: palevioletred;
    text-decoration: none;
    display: block;
}

h2, h3, h4 {
   font-family: '712serif';
    color: red;
    font-size: large;
}

p,
pre,
#p1 {
font-family: '712serif';
    color: red;
    font-weight: 100;
}

pre {
    font-size: small;
}

h4 {
font-family: '712serif';
    color: red;
}




/* ======================================================
   HEADER
====================================================== */

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    margin-top: 50px;
font-family: '712serif';
}


/* ======================================================
   NAVIGATION
====================================================== */
.navbar {
    border: 2px palevioletred solid; /* Specified 2px for clarity */
    list-style-type: none;
    border-radius: 20px;
    box-shadow: 1px 1px 5px rgb(23, 23, 23);
    text-align: center;
    overflow: hidden;
    
    display: flex;
    flex-direction: column;
    width: 100px;
    
    /* CHANGE THIS LINE */
    height: auto;           /* Now the border stops after the last link */
    
    position: fixed;
    left: 40px;
    top: 30px;
    padding: 10px 0;        /* Optional: adds a little space at the top/bottom inside the border */
    
    font-family:'712serif'; /* This changes the font */
    font-weight: bold;              /* Optional: makes the text thicker */
    font-size: 18px
}

.navbar a {
    color: palevioletred;
    text-decoration: none;
    padding: 10px;
    display: block;
    text-align: center;
    text-shadow: 1px 1px 2px black;
    /* Removed flex: 1 to prevent links from stretching weirdly */
    transition: transform 0.3s;
}

.navbar a:hover {
    background-color: rgba(153, 205, 50, 0.344);
    transform: scale(1.1); /* Slightly reduced scale so it doesn't overlap other links */
}
/* This ensures the link stays pink even after being clicked */
.navbar a:visited {
    color: palevioletred;
}

/* ======================================================
   LAYOUT CONTAINERS
====================================================== */

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 30px;
    align-items: flex-start;
}

.bottom-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
}
#container1 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(354px, 1fr)); /* Match Box 1's min-width */
    gap: 20px;
    margin-left: 160px;
    align-items: stretch;
    
}

.box {
    border: 2px palevioletred solid;
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 20px;
    background-color: white;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    height: fit-content; /* Critical: tells the box only to be as tall as its content */
}
.box img {
    max-width: 100%;
    height: auto;
}
/* ======================================================
   BOX SYSTEM
====================================================== */

#box1 {
    padding: 10px;
    box-shadow: 2px 2px 5px rgb(23, 23, 23);
    background-color: rgba(0, 0, 0, 0.687);
    display: flex;
    flex-direction: column;
    width: 100%;           
    max-width: 100%;
    min-width: 354px;
    

    /* ADD THESE TWO LINES */
    overflow: hidden;      /* Clips anything that sticks out */
    word-wrap: break-word; /* Forces long words to wrap to the next line */
}


#box2 {
    background-color:#f0ced8;
    padding: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;  
    grid-column: span 1
    box-shadow: 2px 2px 5px rgb(23, 23, 23);
}

#box3 {
    display: flex;
    flex-direction: column;
    padding: 10px;
    width: 100%;
    max-width: 400px;
    text-align: center;
  
    
}
.pet-iframe {
    width: 100%;          /* Grow to fill the box */
    max-width: 314px;     /* ...but stop at the original size */
    margin: 0 auto;       /* Optional: centers the pet if the box is wide */
    display: block;
}


/* ======================================================
   MEDIA QUERIES
====================================================== */

@media (min-width: 2000px) {
    header, footer {
        margin-left: 250px !important;
        margin-right: 250px !important;
    }
}

@media (max-width: 800px) {
    body {
        margin-left: 20px;
        margin-right: 20px;
    }

    #box2 { height: 800px; max-width: none; }
    #box1, #box3 { max-width: none; }
}

@media (max-width: 600px) {
    #spotify {
        min-height: 500px;
    }
