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

body {
    font-family: 'Fredoka', cursive;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    min-height: 100vh;
    color: #2d3436;
}

/* IT'S HAPPENING Banner */
.happening-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

.banner-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 1.3rem;
    margin: 10px 0 0 0;
    font-weight: 500;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Arrival Message */
.arrival-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
    animation: celebrate 3s infinite;
}

.arrival-message .big-text {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

.arrival-message .arrival-text {
    font-size: 3rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Game Section */
.game-section {
    text-align: center;
    margin: 20px 0;
}

.game-toggle {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-family: 'Fredoka', cursive;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.game-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-container h3 {
    color: #2d3436;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
}

#flappy-baby-canvas {
    border: 3px solid #74b9ff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.game-instructions {
    color: #636e72;
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

.game-instructions strong {
    color: #2d3436;
}

.game-close {
    background: #ddd;
    color: #636e72;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Fredoka', cursive;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-close:hover {
    background: #ccc;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.3rem;
    color: #636e72;
    font-weight: 400;
}

/* Countdown Section */
.countdown-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.countdown-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #74b9ff;
}

.countdown-display {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.time-unit {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 20px;
    border-radius: 15px;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.3);
    transition: transform 0.3s ease;
}

.time-unit:hover {
    transform: translateY(-5px);
}

.time-unit .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1;
}

.time-unit .label {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    margin-top: 5px;
    opacity: 0.9;
}

.due-date {
    font-size: 1.2rem;
    color: #636e72;
    font-weight: 500;
}

/* Footer Photo */
.footer-photo {
    margin-bottom: 20px;
    text-align: center;
}

.footer-photo img {
    max-width: 300px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    margin-bottom: 15px;
    object-fit: cover;
}

.photo-caption {
    font-size: 1rem;
    color: #636e72;
    font-weight: 500;
    margin: 0;
}

/* Microblog Section */
.microblog-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.microblog-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fd79a8;
    text-align: center;
}


/* Posts */
.posts-container {
    /* Removed max-height and overflow to allow natural page scrolling */
}

.post {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.post:hover {
    transform: translateX(5px);
}

.post-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 15px;
    margin-top: 0;
}

.post-content {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #2d3436;
    white-space: pre-wrap;
}

/* Ensure embedded media never overflows the post */
.post-content img,
.post-content video,
.post-content iframe {
    max-width: 100%;
    height: auto;
}

/* Make large inline images look nice */
.post-content img {
    display: block;
    margin: 8px auto;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.post-content img:hover {
    transform: scale(1.01);
    opacity: 0.98;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.post-date {
    font-size: 0.9rem;
    color: #636e72;
    font-weight: 400;
}

.github-link {
    font-size: 0.8rem;
    color: #74b9ff;
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid #74b9ff;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: #74b9ff;
    color: white;
}

.delete-btn {
    background: #e17055;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

.delete-btn:hover {
    background: #d63031;
}

.no-posts {
    text-align: center;
    color: #636e72;
    font-style: italic;
    padding: 40px 20px;
}

.error {
    text-align: center;
    color: #e17055;
    font-style: italic;
    padding: 40px 20px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
}

/* Comments Section */
.comments-section {
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.show-comments-btn {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Fredoka', cursive;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.show-comments-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.comments-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

/* Utterances styling */
.comments-container .utterances {
    max-width: 100%;
}

.comments-container iframe {
    border-radius: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #636e72;
    font-size: 1rem;
}

.contact-email {
    margin-top: 10px;
}

.contact-email a {
    color: #74b9ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: #0984e3;
}

/* Clickable Image */
.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.click-hint {
    font-size: 0.8rem;
    color: #a0a0a0;
    font-style: italic;
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    background: #f1f1f1;
    transform: scale(1.1);
}

.lightbox-caption {
    color: white;
    font-size: 1.2rem;
    margin-top: 20px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 20px;
    }

    .footer-photo img {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .countdown-section {
        padding: 20px;
    }

    .microblog-section {
        padding: 20px;
    }

    .countdown-section h2,
    .microblog-section h2 {
        font-size: 1.7rem;
    }

    .countdown-display {
        gap: 15px;
    }

    .time-unit {
        min-width: 100px;
        padding: 15px;
    }

    .time-unit .number {
        font-size: 2rem;
    }

    .time-unit .label {
        font-size: 0.9rem;
    }

    .footer-photo img {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 1rem;
    }

    .countdown-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .countdown-section h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .countdown-display {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .time-unit {
        min-width: 80px;
        padding: 12px 8px;
        margin: 0;
        flex: 1;
        max-width: calc(50% - 5px);
    }

    .time-unit .number {
        font-size: 1.5rem;
    }

    .time-unit .label {
        font-size: 0.8rem;
    }

    .due-date {
        font-size: 1rem;
        margin-top: 15px;
    }

    .microblog-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .microblog-section h2 {
        font-size: 1.5rem;
    }

    .post {
        padding: 15px;
        margin-bottom: 12px;
    }

    .post-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .post-meta {
        margin-top: 8px;
    }

    .post-date {
        font-size: 0.8rem;
    }

    .footer-photo img {
        max-width: 200px;
    }

    .photo-caption {
        font-size: 0.9rem;
    }

    footer {
        padding: 15px;
    }

    footer p {
        font-size: 0.9rem;
    }

    .contact-email a {
        font-size: 0.9rem;
    }

    /* Password dialog mobile */
    .password-dialog {
        padding: 25px !important;
        max-width: 350px !important;
    }

    .password-dialog h2 {
        font-size: 1.5rem !important;
    }

    .password-dialog p {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
    }

    .password-dialog input {
        padding: 12px !important;
        font-size: 1rem !important;
        margin-bottom: 15px !important;
    }

    .password-dialog button {
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }

    /* Lightbox mobile */
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-content img {
        max-height: 70vh;
    }

    .lightbox-close {
        width: 35px !important;
        height: 35px !important;
        font-size: 20px !important;
        top: -10px !important;
        right: -10px !important;
    }

    .lightbox-caption {
        font-size: 1rem !important;
        margin-top: 15px !important;
    }

    .click-hint {
        font-size: 0.7rem !important;
    }
}

/* Family Website Styles */
.announcement-section {
    text-align: center;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 30px 20px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(116, 185, 255, 0.3);
}

.birth-info {
    margin-top: 20px;
}

.birth-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.birth-details-main {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.baby-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.birth-date {
    font-size: 1.1rem;
    opacity: 0.9;
}

.family-content {
    margin: 30px 0;
}

.family-announcement {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(253, 203, 110, 0.3);
}

.birth-announcement {
    margin-top: 20px;
}

.birth-details {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #2d3436;
}

.journey-link {
    display: inline-block;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.3);
}

.journey-link:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.family-updates {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #f1f2f6;
    text-align: center;
}

.family-updates h2 {
    color: #2d3436;
    margin-bottom: 15px;
}

.family-updates p {
    color: #636e72;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Journey Page Styles */
.journey-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.journey-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border-radius: 20px;
}

.journey-nav {
    margin-top: 20px;
}

.back-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transition: background 0.3s ease;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: white;
}

.posts-timeline {
    space-y: 20px;
}

.timeline-post {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #74b9ff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.timeline-post .post-title {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.timeline-post .post-content {
    color: #636e72;
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-post .post-meta {
    border-top: 1px solid #f1f2f6;
    padding-top: 15px;
}

.timeline-post .post-date {
    color: #74b9ff;
    font-weight: 500;
}

/* iCloud Dashboard Styles */
.dashboard {
    padding: 20px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dashboard-card.large-card {
    grid-column: span 2;
}

.card-content {
    text-align: center;
    position: relative;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.family-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3436;
}

.dashboard-card p {
    color: #636e72;
    line-height: 1.5;
    margin-bottom: 15px;
}

.birth-info {
    font-size: 1rem;
    line-height: 1.4;
}

.card-link {
    display: inline-block;
    color: #74b9ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #0984e3;
    text-decoration: none;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-badge.coming-soon {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}

/* Individual Card Styles */
.family-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.family-card h3,
.family-card p {
    color: white;
}

.birth-card {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.journey-card {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

.journey-card h3,
.journey-card p {
    color: white;
}

.journey-card .card-link {
    color: white;
    text-decoration: underline;
}

.updates-card {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
}

.updates-card h3,
.updates-card p {
    color: white;
}

.updates-card .card-link {
    color: white;
    text-decoration: underline;
}

.calendar-card {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: white;
}

.calendar-card h3,
.calendar-card p {
    color: white;
}

.contact-card {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    color: white;
}

.contact-card h3,
.contact-card p {
    color: white;
}

.contact-card .card-link {
    color: white;
    text-decoration: underline;
}

/* Updates Page Styles */
.updates-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.updates-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    border-radius: 20px;
}

.updates-nav {
    margin-top: 20px;
}

.posts-list {
    space-y: 20px;
}

.update-post {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #fd79a8;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.update-post .post-title {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.update-post .post-content {
    color: #636e72;
    line-height: 1.6;
    margin-bottom: 15px;
}

.update-post .post-meta {
    border-top: 1px solid #f1f2f6;
    padding-top: 15px;
}

.update-post .post-date {
    color: #fd79a8;
    font-weight: 500;
}

.no-updates {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
}

.no-updates-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }

    .dashboard-card.large-card {
        grid-column: span 1;
    }

    .family-photo {
        width: 100px;
        height: 100px;
    }

    .card-icon {
        font-size: 2rem;
    }
}

/* Clean up main layout */
.main-content {
    flex: 1;
}

/* Remove announcement section spacing since it's now in dashboard */
.announcement-section {
    display: none;
}
