/* Global box-sizing rule */
* {
    box-sizing: border-box;
}

/* ===== COLOR VARIABLES ===== */
:root {
     --dk-color: #bf776b;
     --mid-color: #34436f;
     --lt-color: #f1e3c9;
     --dkest-color: white;
     --accent: #226051; 
     --bk_col1: #28292A;
     --bk_col2: #2D2F31;
     --primary: #E7E0FE;
     --primary-rgb: 231, 224, 254;
     --secondary: #DEF9FF;
     --secondary-rgb: 222, 249, 255;
     --dark: #3A3541;
}

/* ===== FONTS ===== */
@font-face {
    font-family: 'Inter-Regular';
    src: url("fonts/Inter-Regular.woff");
}
@font-face {
    font-family: fontawesome-mini;
    src: url("fonts/fa-regular-400.woff2");
}
@font-face {
    font-family: 'SolBlack';
    src: url("/fonts/Sol_Condensed_W01_Black.woff") format('woff');
}

/* ===== BASE STYLES ===== */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: 18px;
    font-family: "Inter-Regular", sans-serif;
    background-color: #d8d8d8;
    background-image: 
        linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 75%),
        radial-gradient(circle at center, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.5) 1.5px, transparent 2px);
    background-size: 
        100% 100vh,
        14px 14px;
    background-attachment: fixed;
}

body a {
    color: var(--accent);
    font-weight: bold;
}

#container {
    max-width: 1000px;
    margin: 3em auto 0;
    height: auto;
}

/* ===== TYPOGRAPHY ===== */
h1, h3, h5 {
    font-family: "Inter-Regular", sans-serif;
    color: var(--dk-color);
}

h2, h4, h6 {
    font-family: "Inter-Regular", sans-serif;
    color: var(--accent);
}

p {
    line-height: 1.6em;
    padding: 5px;
}

p a {
    color: var(--dkest-color);
    font-weight: bold;
}

hr {
    border: solid #c7b591;
    border-width: 2px 0 0 0;
}

/* ===== BUBBLE CONTAINERS ===== */
.bubble-container {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.1) 0%, 
        rgba(var(--secondary-rgb), 0.1) 100%);
    border-radius: 30px;
    margin: 20px;
    padding: 20px;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 1),
        inset 0 0 45px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(5px);
}

.header-bubble,
.header-bubble * {
    font-family: 'SolBlack', sans-serif;
    color: var(--dark);
    font-size: 64px;
    margin: 0;
    text-shadow: 4px 4px 1px rgba(0, 0, 0, 0.1);
}

.header-bubble {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.8) 0%, 
        rgba(var(--secondary-rgb), 0.8) 100%);
    text-align: center;
    padding: 10px;
    margin-bottom: 50px;
    border-radius: 80px;
}

.content-bubble {
    flex: 1;
    padding: 40px;
    border-radius: 80px;
    margin: 0; /* Remove bubble margin to align with sidebar */
}

.sidebar-bubble {
    margin: 0; /* Remove the default bubble margin for sidebar items */
    padding: 15px; /* Tighter padding for sidebar */
    border-radius: 20px;
}

.section-title {
    text-align: center;
    font-weight: bold;
    padding: 8px;
    background-color: var(--mid-color);
    color: var(--dkest-color);
    font-size: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* ===== LAYOUT ===== */
.wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    align-items: flex-start;
}

#sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== MEDIA ===== */
.iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

iframe {
    max-width: 100%;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
}

img:not(.modal-content):hover {
    opacity: 0.7;
}

/* ===== IMAGE MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    cursor: default;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

.close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* ===== SCROLLBAR ===== */
.scroll::-webkit-scrollbar-track {
    background-color: var(--lt-color);
}

.scroll::-webkit-scrollbar {
    width: 10px;
    background-color: #f2b1a4;
}

.scroll::-webkit-scrollbar-thumb {
    background-color: var(--dk-color);
}

/* ===== MUSIC PLAYER ===== */
#musicplayer {
    font-family: 'Arial';
    background: white;
    width: 100%;
    padding: 2px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.songtitle, .track-info, .now-playing {
    padding: 2px;
    font-size: 12px;
    line-height: 1.2;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 1px;
    padding: 0;
    margin: 0;
    min-height: 0;
}

.buttons div {
    width: 33.3%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.seeking, .volume {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    width: 100%;
}

.seeking {
    display: none;
} 

.seeking input[type=range],
.volume input[type=range] {
    width: 100%;
    flex-grow: 1;
}

.now-playing, .track-info {
    background-color: #c9eff2;
    padding: 3px;
}

.now-playing {
    font-weight: bold;
}

.material-icons {
    color: #e74492;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    margin: 0;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: #e74492;
}

input[type=range]::-webkit-slider-runnable-track {
    height: 2px;
    background: #e74492;
}

input[type=range]::-webkit-slider-thumb {
    height: 6px;
    width: 6px;
    margin-top: -2px;
    background: #e74492;
    -webkit-appearance: none;
}

input[type=range]::-moz-range-track {
    height: 2px;
    background: #e74492;
}

input[type=range]::-moz-range-thumb {
    height: 6px;
    width: 6px;
    background: #e74492;
    border: none;
}

/* ===== POST TAGS ===== */
.post-tags {
    text-align: center;
    margin: 10px 0;
    font-size: 0.9em;
}

.post-tag {
    display: inline-block;
    background-color: var(--accent);
    color: var(--dkest-color);
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-tag:hover {
    background-color: var(--mid-color);
    transform: translateY(-1px);
}

/* ===== POST LIST ===== */
#postlistdiv ul,
#recentpostlistdiv ul {
    font-size: 1.2em;
    padding: 0;
    list-style-type: none;
}

.moreposts {
    font-size: 0.8em;
    margin-top: 0.2em;
}

/* ===== FOOTER ===== */
#footer {
    font-size: 0.8em;
    padding: 0 5% 10px 5%;
}

/* ===== RESPONSIVE ===== */
@media only screen and (max-width: 917px) {
    .wrapper {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        order: 2;
    }
    
    .content-bubble {
        order: 1;
        width: 100%;
    }
}