body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f9;
    color: #333;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    text-align: center;
}

.login-container h1 {
    color: #333;
    margin-bottom: 20px;
}

.input-form {
    max-width: 400px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.input-form label {
    display: block;
    margin-top: 10px;
    color: #333;
    font-size: 1.2em;
}

.input-form input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 8px;
    font-size: 1.1em;
    box-sizing: border-box;
}

.input-form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 8px;
    overflow: hidden;
    resize: none;
    box-sizing: border-box;
    min-height: 100px;
}

.input-form button.login-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #fff;
    color: #333;
    font-size: 1.2em;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.input-form button.login-btn:hover {
    background: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.entry-description {
    white-space: pre-wrap;
}

.error-message {
    color: darkred;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: center;
}

header {
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    flex-wrap: wrap;
}

header .blog-name {
    flex: 1;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

button, .back-btn, .logout-btn, .login-btn, #add-blog-btn, #add-entry-btn, .edit-entry-btn, .edit-blog-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: 5px;
}

button:hover, .back-btn:hover, .logout-btn:hover, .login-btn:hover, #add-blog-btn:hover, #add-entry-btn:hover, .edit-entry-btn:hover, .edit-blog-btn:hover {
    background: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.logout-btn {
    margin-right: 15px;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.timeline-line {
    position: absolute;
    left: 50px;
    transform: translateX(-50%);
    top: 15px;
    bottom: 0;
    width: 4px;
    background: #ccc;
    z-index: 1;
}

.timeline-start, .timeline-end {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.blog-group, .day-group {
    position: relative;
    margin-bottom: 60px;
}

.dot {
    width: 20px;
    height: 20px;
    background: #333232;
    border-radius: 50%;
    position: absolute;
    left: 20px;
    z-index: 2;
}

.large-dot {
    width: 30px;
    height: 30px;
    left: 15px;
    z-index: 2;
}

.date-label {
    margin-left: 80px;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

.day-label {
    position: absolute;
    left: 80px;
    top: -10px;
    font-weight: bold;
    color: #333;
}

.entries {
    margin-left: 200px;
    position: relative;
    top: 30px;
}

.entries::before {
    content: '';
    position: absolute;
    left: -120px;
    top: -20px;
    width: 120px;
    height: 2px;
    background: #ddd;
    z-index: 1;
}

.blog-tile-wrapper {
    position: relative;
    width: 70%;
    padding-top: 39.375%;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.blog-tile-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.blog-tile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 20px;
    text-align: center;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.edit-link {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.delete-link {
    position: absolute;
    top: 50px;
    right: 10px;
    background: #ff4d4d;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.blog-tile-wrapper:hover .edit-link, .blog-tile-wrapper:hover .delete-link {
    opacity: 1;
}

.edit-link:hover {
    background: #f9f9f9;
}

.delete-link:hover {
    background: #cc0000;
}

.entry-frame {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.entry-frame:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.entry-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.entry-title h3 {
    margin: 0;
    color: #333;
}

.pictures, .videos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.videos {
    margin-top: 10px;
}

.pictures img {
    width: 30%;
    max-width: 20%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.videos video {
    width: 50%;
    max-width: 50%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.input-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.input-form h2 {
    color: #333;
    margin-top: 0;
}

.input-form label {
    display: block;
    margin-top: 10px;
    color: #333;
}

.input-form input, .input-form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 8px;
}

.input-form button {
    margin-top: 20px;
}

.image-item {
    position: relative;
}

.image-item input {
    position: absolute;
    top: 5px;
    left: 5px;
}

.remove-btn {
    background: red;
    color: white;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.8em;
    border-radius: 50%;
}

#media-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#media-viewer-modal #media-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

#media-viewer-modal img, #media-viewer-modal video {
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 10px;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 3em;
    color: #e0e0e0;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.nav-btn.prev {
    left: 20px;
}

.nav-btn.next {
    right: 20px;
}

.nav-btn:hover {
    color: #ffffff;
}

#media-viewer-modal button.close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 3em;
    color: #e0e0e0;
    cursor: pointer;
}

#media-viewer-modal button.close:hover {
    color: #ffffff;
}

.progress-container {
    margin-top: 10px;
    text-align: center;
}

.progress-container progress {
    width: 100%;
    height: 20px;
}

.progress-percent {
    margin-left: 10px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }

    .dot {
        left: -10px;
    }

    .large-dot {
        left: -15px;
    }

    .date-label {
        margin-left: 40px;
    }

    .day-label {
        left: 40px;
    }

    .entries {
        margin-left: 40px;
    }

    .entries::before {
        left: -20px;
        width: 20px;
    }

    .blog-tile-wrapper {
        width: 100%;
        padding-top: 56.25%; /* 16:9 aspect ratio for mobile */
    }

    .entry-frame {
        padding: 15px;
    }

    header {
        justify-content: center;
        flex-wrap: wrap;
    }

    header .blog-name {
        order: -1;
        width: 100%;
        margin: 5px 0;
    }
}