/* Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Custom Font Definitions */
@font-face {
    font-family: 'Onciale';
    src: url('/fonts/Onciale-PhF01.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DejaVuSansMono';
    src: url('/fonts/DejaVuSansMono.woff2') format('woff2'),
         url('/fonts/DejaVuSansMono.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/*############################### Body Styles for DIARY MAINLY########################### */
/* Update these core styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'DejaVuSansMono', serif;
    background-color: #020202;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    background-color: transparent;
    padding: clamp(5px, 1vw, 7px);
    text-align: center;
    position: fixed;
    top: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header h1 {
    margin: 0;
    font-size: clamp(0.8em, 2vw, 1em);
    font-family: 'Onciale', sans-serif;
}

header nav {
    margin-top: 7px;
    display: flex;
    gap: 10px;
}

header nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
}

header nav a:hover {
    text-decoration: underline;
}




/* ################# Diary-specific styles ################## */
/*
 * CRITICAL LAYOUT STRUCTURE
 * This is a crucial layout setup that ensures the navigation appears correctly
 * at the bottom of diary entries while maintaining good UX:
 * 1. Takes full viewport height to allow content to push nav down
 * 2. Uses flex column to create a vertical stack
 */
.diary-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.diary-content .entry {
    margin: 0;
    width: 100%;
    white-space: pre-wrap;
    flex: 1;
    overflow-y: auto;
    background-color: transparent;
}

.diary-content .entry .content {
    font-size: 12px;
    line-height: 1.8;
    display: block;
    margin-left: 3%;
    padding: 50px;
    max-width: 35%;
}

@media (max-width: 600px) {
    .diary-content .entry .content {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        padding-left: 10px;
        padding-right: 10px;
    }
}

.diary-content .entry h1 {
    font-size: 12px;
    margin-bottom: 20px;
}

.diary-content .entry .content > *:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Navigation styles for diary page */
/* firefox focus is the only browser, on mobile, thats fucking weird and not showing the prior and former nav buttons
spent a lot of time on this to find out im not the problem*/
.diary-content .navigation {
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
    margin-top: auto; /* Push to bottom */
}

/* responsive styling when needed */
@media (max-width: 600px) {
    .diary-content .navigation {
        flex-wrap: wrap;
        padding: 30px 5px;
        justify-content: flex-end;
    }
    
    /* On mobile, we want the page number to appear significantly to the left
     * margin-right: auto pushes it left while transform provides additional offset
     * This creates better visual hierarchy between the number and navigation buttons */
    .diary-content .navigation .page-number {
        text-align: left;
        margin-right: auto;
        transform: translateX(-80px);
        margin-bottom: 10px;
    }
}

.diary-content .navigation .page-number {
    flex: 0 1 100%;
    text-align: center;
    order: -1;
}

.diary-content .navigation a {
    background-color: #000000;
    color: #ffffff;
    padding: 8px 24px;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    flex: 0 1 auto;
    min-width: 70px;
    text-align: center;
    margin-left: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.diary-content .navigation a:hover {
    background: linear-gradient(135deg, #241303, #5C3A21, #994d00);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7);
}

/* Diary background styles */
.diary-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-image: url('/images/diary/compressed_P1000242.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100%;
    padding: 20px;
}

.diary-content {
    position: relative;
    z-index: 1;
    color: #ffffff; /* Ensure text is visible */
}

/* Ensure the entry content is visible */
.diary-background .entry {
    padding: 20px;
    margin: 0 auto;
    max-width: 800px;
    border-radius: 0px; /* rounded edges around the diary text content container box */
}

@media (min-width: 2560px) {
    .diary-background {
        background-size: contain; /* Prevent stretching on very large screens */
    }
}

/* static/css/styles.css */
/* Update the existing .artwork-placeholder styles and add new ones */

.artwork-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* Tab Navigation */
.tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #4a5568;
    margin-bottom: 1.5rem;
    justify-content: space-around;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #a0aec0;
    position: relative;
    transition: color 0.3s ease;
    outline: none;
}

.tab-button:hover {
    color: #cbd5e0;
}

.tab-button.active {
    color: #8b5cf6;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background-color: #8b5cf6;
    border-radius: 2px;
}

/* Tab Content */
.tabcontent {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tabcontent.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tabcontent h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #edf2f7;
}

.tabcontent p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #a0aec0;
}

/* Upload Buttons */
.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    outline: none;
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.upload-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 600px) {
    .tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
    }
}

