:root {
    --base: #E89B7A;
    --mantle: #D88A6A;
    --surface0: #C97A5A;
    --text: #3D2645;
    --subtext: #000000;
    --pink: #7A5318;
    --red: #A84A3A;
    --mauve: #4D2F5A;
}

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

body {
    font-family: 'Lora', 'Merriweather', Georgia, serif;
    background-color: var(--base);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 2px solid var(--surface0);
}

header h1 {
    font-size: 2rem;
    color: var(--pink);
    margin-bottom: 10px;
}

header .tagline {
    font-size: 1rem;
    color: var(--subtext);
    font-style: italic;
}

nav {
    background-color: var(--mantle);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--surface0);
}

nav a {
    color: var(--mauve);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
}

nav a:hover {
    color: var(--pink);
}

/* Forms */
input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--surface0);
    border-radius: 8px;
    background-color: var(--mantle);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--pink);
}

input::placeholder,
textarea::placeholder {
    color: var(--text);
    opacity: 0.6;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

button,
.btn {
    background-color: var(--pink);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover {
    background-color: var(--mauve);
}

.btn-secondary {
    background-color: var(--surface0);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: var(--mantle);
}

.btn-danger {
    background-color: var(--red);
}

.btn-danger:hover {
    background-color: #a80c2d;
}

/* Gate page */
.gate-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-box {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.gate-box h1 {
    font-size: 3rem;
    color: var(--pink);
    margin-bottom: 10px;
}

.gate-box .tagline {
    font-size: 1.1rem;
    color: var(--subtext);
    font-style: italic;
    margin-bottom: 40px;
}

.gate-box input {
    margin-bottom: 15px;
}

.gate-box .error {
    color: var(--red);
    margin-top: 15px;
}

/* Post */
.post {
    background-color: #F5E5D8;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--surface0);
}

.post-header h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 8px;
}

.post-header .date {
    color: var(--subtext);
    font-size: 0.9rem;
}

/* Blog section */
.blog-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--mantle);
    border-radius: 8px;
}

.blog-image {
    margin-bottom: 15px;
}

.blog-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.blog-content {
    color: var(--text);
    line-height: 1.7;
    white-space: pre-line;
    word-wrap: break-word;
}

.blog-content p {
    margin: 0;
}

.blog-content a {
    color: var(--pink);
    text-decoration: none;
    border-bottom: 2px solid var(--pink);
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: var(--mauve);
    border-bottom-color: var(--mauve);
}

/* Video */
.video-item {
    margin-bottom: 30px;
}

.video-embed {
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: var(--mantle);
    overflow: hidden;
}

/* YouTube videos - 16:9 aspect ratio */
.video-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* TikTok embeds - let them use their natural size */
.video-embed blockquote.tiktok-embed {
    margin: 0 auto;
    display: block;
}

/* Avatar with speech bubble */
.avatar-comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid var(--pink);
}

.speech-bubble {
    background-color: var(--mantle);
    padding: 15px;
    border-radius: 12px;
    position: relative;
    flex: 1;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--mantle);
}

.speech-bubble p {
    margin: 0;
    color: var(--text);
}

.speech-bubble .video-link {
    margin-top: 10px;
    font-size: 0.95rem;
}

.speech-bubble .video-link a {
    color: var(--pink);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--pink);
    transition: all 0.2s ease;
}

.speech-bubble .video-link a:hover {
    color: var(--mauve);
    border-bottom-color: var(--mauve);
}

/* Likes */
.likes-section {
    padding: 20px 0;
    border-top: 2px solid var(--surface0);
    border-bottom: 2px solid var(--surface0);
    margin: 20px 0;
}

.like-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.like-button.liked {
    color: var(--pink);
}

.like-button:hover {
    transform: scale(1.1);
}

/* Comments */
.comments-section {
    margin-top: 30px;
}

.comments-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.comment {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--mantle);
    border-radius: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    color: var(--pink);
    font-weight: 600;
}

.comment-date {
    color: var(--subtext);
    font-size: 0.85rem;
}

.comment-content {
    color: var(--text);
}

.comment-form {
    margin-top: 25px;
    padding: 20px;
    background-color: var(--mantle);
    border-radius: 8px;
}

.comment-form input,
.comment-form textarea {
    margin-bottom: 15px;
}

/* Archive */
.archive-list {
    list-style: none;
}

.archive-item {
    background-color: #F5E5D8;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--pink);
}

.archive-item a {
    color: var(--text);
    text-decoration: none;
    display: block;
}

.archive-item a:hover {
    color: var(--pink);
}

.archive-item h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.archive-item .date {
    color: var(--subtext);
    font-size: 0.9rem;
}

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--mantle);
    margin-bottom: 30px;
}

.admin-header h1 {
    color: var(--pink);
    font-size: 1.8rem;
}

.admin-posts {
    list-style: none;
}

.admin-post-item {
    background-color: #F5E5D8;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-post-item.published {
    border-left: 4px solid var(--pink);
}

.admin-post-item.draft {
    border-left: 4px solid var(--subtext);
}

.admin-post-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.admin-post-info .meta {
    color: var(--subtext);
    font-size: 0.9rem;
}

.admin-post-actions {
    display: flex;
    gap: 10px;
}

.admin-post-actions button,
.admin-post-actions a {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Form sections */
.form-section {
    margin-bottom: 25px;
}

.form-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.form-section input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.video-input-group {
    background-color: var(--mantle);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.video-input-group h4 {
    margin-bottom: 12px;
    color: var(--pink);
}

.video-input-group input,
.video-input-group textarea {
    margin-bottom: 10px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--subtext);
    font-size: 0.9rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 20px;
}

.mt-2 {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .gate-box h1 {
        font-size: 2rem;
    }

    .post {
        padding: 20px;
    }

    .admin-post-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-post-actions {
        margin-top: 15px;
    }
}
