/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0A1625; /* Very dark navy */
    color: #FFFFFF; /* Snow white */
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 900px;
    width: 100%;
    background-color: #0F1F33; /* Dark navy (slightly lighter) */
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid #1A2D44;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 0.25rem;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.proverb {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
    margin-top: -0.5rem;
}

.small-text {
    font-size: 0.75rem;
    opacity: 0.7;
    display: inline-block;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.7rem;
    opacity: 0.6;
    margin-bottom: 1rem;
    border-bottom: 1px solid #1A2D44;
    padding-bottom: 0.5rem;
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
    font-size: 0.6rem;
    text-align: center;
    opacity: 0.65;
    letter-spacing: 0.3px;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    padding: 0.5rem;
    background-color: #0A1625;
    border-radius: 40px;
    border: 1px solid #1A2D44;
}

/* ===== EDITOR ===== */
.editor-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

textarea {
    width: 100%;
    min-height: 420px;
    padding: 1.2rem;
    background-color: #0A1625;
    color: #FFFFFF;
    border: 1px solid #1A2D44;
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #2A4A66;
}

textarea::placeholder {
    color: #4A6A8A;
    opacity: 0.7;
}

/* ===== IMAGE PREVIEW ===== */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0.5rem 0;
    min-height: 60px;
}

.image-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    border: 1px solid #1A2D44;
    object-fit: cover;
}

/* ===== TOOLBAR ===== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.5rem 0;
}

.toolbar button {
    background-color: #0A1625;
    color: #FFFFFF;
    border: 1px solid #1A2D44;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.toolbar button:hover {
    background-color: #1A2D44;
    border-color: #2A4A66;
}

.toolbar .danger-btn:hover {
    background-color: #4A1A1A;
    border-color: #8A2A2A;
}

/* ===== AUDIO NOTICE ===== */
.audio-notice {
    font-size: 0.65rem;
    opacity: 0.5;
    margin: 0.2rem 0 0 0;
    text-align: center;
}

/* ===== AUTOSAVE STATUS ===== */
.autosave-status {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.6;
    padding: 0.2rem 0.5rem;
    border-top: 1px solid #1A2D44;
    margin-top: 0.2rem;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* ===== STATS ===== */
.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #0F1F33;
    color: #FFFFFF;
    border: 1px solid #1A2D44;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top:hover {
    background-color: #1A2D44;
    transform: scale(1.05);
}

/* ===== FOOTER ===== */
footer {
    margin-top: 2.5rem;
    width: 100%;
    max-width: 900px;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.7;
    border-top: 1px solid #1A2D44;
    padding-top: 1.5rem;
}

footer .emoji-bar {
    font-size: 1.2rem;
    letter-spacing: 6px;
    margin: 0.5rem 0;
}

.cultural-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0.5rem 0;
}

.cultural-links a {
    color: #FFFFFF;
    background-color: #0A1625;
    border: 1px solid #1A2D44;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.2s;
    display: inline-block;
}

.cultural-links a:hover {
    background-color: #1A2D44;
    border-color: #2A4A66;
}

.divider {
    border: none;
    border-top: 1px solid #1A2D44;
    margin: 0.5rem 0;
    opacity: 0.4;
}

.browser-note {
    font-size: 0.65rem;
    opacity: 0.6;
    margin: 0.5rem 0;
}

.mastodon-link {
    font-size: 0.75rem;
    opacity: 0.7;
    margin: 0.3rem 0;
}

.mastodon-link a {
    color: #FFFFFF;
    text-decoration: underline;
    opacity: 0.8;
}

.footer-credit {
    font-size: 0.65rem;
    opacity: 0.4;
    margin-top: 0.5rem;
}

/* ===== IMAGE GALLERY (nordic-photo folder) ===== */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0.5rem 0 1rem;
}

.image-gallery .gallery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #0A1625;
    border: 1px solid #1A2D44;
    border-radius: 12px;
    padding: 6px 6px 4px 6px;
    width: 60px;
    transition: transform 0.2s, border-color 0.2s;
}

.image-gallery .gallery-card:hover {
    transform: scale(1.05);
    border-color: #2A4A66;
}

.image-gallery .gallery-card img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.image-gallery .gallery-card .img-label {
    font-size: 0.5rem;
    opacity: 0.4;
    margin-top: 2px;
    line-height: 1;
}

/* ===== LIVE CLOCK ===== */
#live-clock {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
    margin: 0.5rem 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    h1 {
        font-size: 1.3rem;
    }
    .toolbar button {
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
    }
    textarea {
        min-height: 280px;
    }
    .welcome-banner {
        font-size: 0.5rem;
        padding: 0.3rem;
    }
    .image-gallery .gallery-card {
        width: 48px;
        padding: 4px;
    }
    .image-gallery .gallery-card img {
        width: 38px;
        height: 38px;
    }
}
