* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0a;
    --text-white: #ffffff;
    --brunette: #8b6f47;
    --brunette-light: #a6895d;
    --brunette-dark: #6b5435;
    --accent: #c9a882;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Home page - center content vertically */
body:not(:has(.site-header)) .landing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Pages with header need padding */
body:has(.site-header) {
    padding-top: 80px;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brunette);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text-white);
    transition: opacity 0.3s ease;
}

.header-brand:hover {
    opacity: 0.8;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brunette);
}

.header-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brunette-light);
    letter-spacing: 0.5px;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Landing Page Styles */
.landing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.logo-container {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(0 0 20px rgba(139, 111, 71, 0.3));
    border: 3px solid var(--brunette);
}

.brand-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--brunette-light);
    letter-spacing: 1px;
    margin: 0;
    text-transform: lowercase;
}

.intro-text {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
}

.intro-line {
    margin: 0.5rem 0;
    opacity: 0.95;
}

.navigation {
    margin-top: 0.5rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--brunette-light);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--brunette);
    border-radius: 5px;
    transition: all 0.3s ease;
    background: rgba(139, 111, 71, 0.1);
}

.nav-link:hover {
    background: rgba(139, 111, 71, 0.2);
    border-color: var(--brunette-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 111, 71, 0.3);
}

.nav-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.nav-link:hover .nav-arrow {
    transform: translateX(5px);
}

/* Stories List Page */
.stories-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.stories-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--brunette-light);
}

.back-link {
    display: inline-block;
    color: var(--brunette-light);
    text-decoration: none;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--brunette);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(139, 111, 71, 0.2);
}

.stories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.story-card {
    background: rgba(139, 111, 71, 0.08);
    border: 1px solid var(--brunette);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-white);
    display: block;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brunette), var(--brunette-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.story-card:hover {
    background: rgba(139, 111, 71, 0.15);
    border-color: var(--brunette-light);
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(139, 111, 71, 0.4);
}

.story-card:hover::before {
    transform: scaleX(1);
}

.story-card h2 {
    color: var(--brunette-light);
    margin-bottom: 0.75rem;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.story-card:hover h2 {
    color: var(--brunette-light);
}

.story-card .story-date {
    color: var(--brunette);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.story-card .story-hashtags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.story-card .story-excerpt {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Story Page */
.story-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.story-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--brunette);
}

.story-title {
    font-size: 2.5rem;
    color: var(--brunette-light);
    margin-bottom: 1rem;
}

.story-meta {
    color: var(--brunette);
    font-size: 0.9rem;
}

/* Story Main Layout - Side by Side */
.story-main-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.story-content-wrapper {
    min-width: 0; /* Prevents overflow */
}

.story-content {
    font-size: 1.1rem;
    line-height: 1.8;
    min-height: 200px;
}

/* Act headings in stories */
.story-content .act-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brunette-light);
    margin: 2rem 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--brunette);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Story music/video player (no autoplay; user clicks to play/pause) */
.story-content .story-audio-player {
    margin: 1.5rem 0;
}
.story-content .story-audio-player .dark-chocolate-video {
    width: 100%;
    max-width: 480px;
    border-radius: 8px;
    border: 1px solid var(--brunette);
    background: rgba(10, 10, 10, 0.9);
}
.story-content .story-audio-player .player-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--brunette-light);
    opacity: 0.9;
}
.story-content .story-audio-player .player-disclaimer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--brunette-light);
    opacity: 0.8;
    font-style: italic;
}

/* Video-center layout: single column, video centered (e.g. dark_chocolate) */
.story-main-layout.story-layout-video-center {
    grid-template-columns: 1fr;
    max-width: 420px; /* ~iPhone 12 size + padding */
    margin-left: auto;
    margin-right: auto;
}
.story-main-layout.story-layout-video-center .story-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.story-main-layout.story-layout-video-center .story-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.story-content .story-video-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}
.story-content .story-video-center .story-center-video {
    width: 100%;
    max-width: 360px; /* iPhone 12 portrait width */
    max-height: 600px;
    border-radius: 12px;
    border: 1px solid var(--brunette);
    background: #000;
    box-shadow: 0 8px 30px rgba(139, 111, 71, 0.2);
}
.story-content .story-video-center .story-video-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--brunette);
    opacity: 0.9;
    font-style: italic;
    text-align: center;
}

.story-images-wrapper {
    /* Images scroll with the story content */
}

/* Story Images */
.story-images-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.story-image-container {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--brunette);
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(139, 111, 71, 0.1);
}

.story-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 111, 71, 0.3);
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.story-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--brunette);
}

/* Upvote Section */
.upvote-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--brunette);
    text-align: left;
}

.upvote-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(139, 111, 71, 0.1);
    border: 1px solid var(--brunette);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.upvote-button:hover:not(:disabled) {
    background: rgba(139, 111, 71, 0.2);
    border-color: var(--brunette-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.upvote-button:active:not(:disabled) {
    transform: translateY(0);
}

.upvote-button.upvoted {
    background: rgba(139, 111, 71, 0.3);
    border-color: var(--brunette-light);
    cursor: not-allowed;
    opacity: 0.8;
}

.upvote-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.upvote-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.upvote-button:hover:not(:disabled) .upvote-icon {
    transform: scale(1.2);
}

.upvote-count {
    font-weight: 600;
    color: var(--brunette-light);
    min-width: 1.5rem;
    text-align: center;
}

/* Site Footer */
.site-footer {
    width: 100%;
    margin-top: auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--brunette);
    background: rgba(10, 10, 10, 0.5);
    flex-shrink: 0;
}

.show-love-section {
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    background: rgba(139, 111, 71, 0.1);
    border: 1px solid var(--brunette);
    border-radius: 8px;
    text-align: center;
}

.show-love-text {
    font-size: 1rem;
    color: var(--brunette-light);
    margin-bottom: 0.8rem;
    font-style: italic;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-white);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    background: rgba(139, 111, 71, 0.2);
    border: 1px solid var(--brunette);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.email-link:hover {
    background: rgba(139, 111, 71, 0.3);
    border-color: var(--brunette-light);
    transform: translateY(-2px);
}

.gmail-icon {
    width: 20px;
    height: 20px;
    color: var(--brunette-light);
    transition: color 0.3s ease;
}

.email-link:hover .gmail-icon {
    color: var(--accent);
}

.email-address {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--brunette-light);
    transition: color 0.3s ease;
}

.email-link:hover .email-address {
    color: var(--accent);
}

.empty-state {
    text-align: center;
    color: var(--brunette);
    padding: 3rem;
    font-style: italic;
}

/* Hashtags Section */
.hashtags-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--brunette);
}

.hashtags-list {
    color: var(--brunette-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Hashtags in story cards */
.story-hashtags {
    margin-top: 0.5rem;
}

.hashtag-small {
    color: var(--brunette);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .story-main-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .story-images-wrapper {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .story-images-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .story-image-container {
        aspect-ratio: 1;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .site-header {
        padding: 0.8rem 1rem;
    }
    
    .header-logo {
        width: 35px;
        height: 35px;
    }
    
    .header-name {
        font-size: 0.95rem;
    }
    
    .logo {
        width: 200px;
        height: 200px;
    }
    
    .intro-text {
        font-size: 1.1rem;
    }
    
    .stories-list {
        grid-template-columns: 1fr;
    }
    
    .story-title {
        font-size: 2rem;
    }
    
    .story-container {
        padding: 1rem;
    }
    
    .story-main-layout {
        gap: 1.5rem;
    }
    
    .story-images-gallery {
        grid-template-columns: 1fr;
    }
}

