* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

header {
    background-color: #f0f0f0;
    /*flex-direction: row;
    color: black;
    padding: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;*/
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    height: 80px;
    padding: 10px;
}

#header-svg-text {
    grid-column: 2;
    width: 52vw;
    max-width: 320px;
    justify-self: center;
}

#header-svg-icon {
    grid-column: 3;
    width: 60px;
    justify-self:right;
}

/*======================
HAMBURGER AND NAVIGATION
========================*/

#hamburger {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: #f0f0f0;
    border: 2px solid rgb(0, 0, 0, 1);
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
    align-items: center;
    z-index: 2001;
    border-radius: 8px;
}

/*the lines inside the button that make the hamburger*/
#hamburger span {
    display: block;
    width: 42px;
    height: 4px;
    padding: 0;
    margin: 0;
    background-color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/*==========*/
/*SLIDE MENU*/
/*==========*/

/*
MENU STATE MANAGEMENT
All menu open/close behavior is controlled by toggling
the 'menu-open' class on the body element.
When body has class 'menu-open':
  - slide menu slides in from left
  - overlay appears behind menu
  - page scroll is disabled
  - hamburger animates into an X
JavaScript only needs to add/remove this one class.
*/

#slide-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: #f0f0f0;
    z-index: 2000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    padding: 4rem 1rem 1rem 1rem;
}

/*
The menu-open class can be toggled on the body element
This activates and deactives the css to open menu
and style to hamburger into an x
The individual elements are selected with
a descendant combinator ID
*/

/*slide out menu when menu-open class is added to body element*/
body.menu-open #slide-menu {
    left: 0;
}

/*changes the display on the overlay from none to block
when menu-open class is added to body element*/
body.menu-open #menu-overlay {
    display: block;
}

/*stops the feed scroll when menu-open class is added
to body element*/
body.menu-open {
    overflow: hidden;
}

/*translates the hamburger into an x
when menu-open class added to body element*/

body.menu-open #hamburger span:nth-child(1) {
        transform: translateY(12px) rotate(45deg);
    }

body.menu-open #hamburger span:nth-child(2) {
        opacity: 0;
    }

body.menu-open #hamburger span:nth-child(3) {
        transform: translateY(-12px) rotate(-45deg);
    }

#slide-menu ul {
    list-style: none;
}

#slide-menu ul li {
    border-bottom: 1px solid #ddd;
}

#slide-menu ul li a {
    display: block;
    padding: 1rem 0.5rem;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
}

#slide-menu ul li a:hover {
    color: #0066cc;
}

#menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

/*============
FEED AND POSTS
==============*/

.post {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.post img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 0.75rem;
}

.post a {
    display: block;
    margin-top: 0.75rem;
    color: #0066cc;
}

.post-date {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.5rem;
}

.repost-indicator {
    font-size: 0.8rem;
    color: #00ba7c;
    margin-bottom: 0.5rem;
}

.quoted-post {
    border-left: 3px solid #ccc;
    padding: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.quoted-author {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/*video stuff*/

.video-wrapper {
    cursor: pointer;
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/*load more button*/

#load-more {
    display: block;
    margin: 1rem auto;
    padding: 0.75rem 2rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

#load-more:hover {
    background-color: #555;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.display-name {
    font-weight: bold;
    font-size: 0.95rem;
}

.handle {
    font-size: 0.8rem;
    color: #999;
}

/*=================
IMAGES AND LIGHTBOX
===================*/

.image-grid {
    display: grid;
    gap: 4px;
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
}

/* single image */
.image-grid.count-1 {
    grid-template-columns: 1fr;
}

/* two images side by side */
.image-grid.count-2 {
    grid-template-columns: 1fr 1fr;
}

/* three images - first one full width */
.image-grid.count-3 {
    grid-template-columns: 1fr 1fr;
}

.image-grid.count-3 .image-wrapper:first-child {
    grid-column: span 2;
}

/* four images - 2x2 grid */
.image-grid.count-4 {
    grid-template-columns: 1fr 1fr;
}

.image-wrapper {
    overflow: hidden;
    width: 100%;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin-top: 0;
}

#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#lightbox.active {
    display: flex;
}

#lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1);
}

#lightbox-img {
    position: relative;
    z-index: 1001;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

#lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1002;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.post .facet-tag,
.post .facet-mention,
.post .facet-link {
    display: inline;
    color: #0066cc;
    text-decoration: none;
    margin-top: 0;
}

.post .facet-tag:hover,
.post .facet-mention:hover,
.post .facet-link:hover {
    text-decoration: underline;
}

/*=======
PROFILE
=========*/

#profile {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

#profile-banner {
    width: 100%;
    height: 130px;
    overflow: hidden;
    background-color: #ccc;
}

#profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-top: 0;
    border-radius: 0;
}

#profile-body {
    padding: 0 1rem 1rem 1rem;
    position: relative;
}

#profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    top: -40px;
    left: 1rem;
    object-fit: cover;
}

#profile-info {
    padding-top: 48px;
}

#profile-display-name {
    font-size: 1.2rem;
    font-weight: bold;
}

#profile-handle {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.1rem;
}

#profile-description {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
}

#profile-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #555;
}

#profile-stats span strong {
    color: #333;
    font-weight: bold;
}
