/* Icon attribution styling */
.icon-attribution {
    text-align: center;
    font-size: 0.7rem;
    color: #888;
    margin-top: 40px;
    margin-bottom: 10px;
}

.icon-attribution a {
    color: #888;
    text-decoration: none;
}

.icon-attribution a:hover {
    text-decoration: underline;
}

/* Subtitle below the main heading */
.subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: #aaa;
    margin-top: -10px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* General page styling */
body {
    font-family: 'Fira Sans', Arial, sans-serif;
    /* for headings / general text */
    background: #121212;
    /* dark theme */
    color: #f0f0f0;
    padding: 20px;
    margin: 0;
}

h1 {
    font-family: 'Fira Sans', Arial, sans-serif;
    text-align: center;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Wall grid */
#wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    /* bigger boxes */
    gap: 20px;
    margin-top: 20px;
}

/* Post boxes */
.post {
    font-family: 'Source Code Pro', monospace;
    /* techy style for posts */
    background: #1e1e1e;
    padding: 44px 25px 25px 25px; /* extra top padding for header */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-size: 24px;
    line-height: 1.5;
    transition: transform 0.2s, box-shadow 0.2s;
    justify-content: center;
    position: relative;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
} 

.post .char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.8rem;
    color: #777;
    font-family: 'Source Code Pro', monospace;
}

/* New Post button styling */
.title-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-post-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: #f4d35e; /* medium yellow */
    color: #1a1a1a;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.45);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 1000;
}
.new-post-btn:hover {
    transform: translateY(-52%);
    box-shadow: 0 10px 22px rgba(0,0,0,0.55);
}
.new-post-btn:focus {
    outline: 2px solid rgba(255,255,255,0.12);
    outline-offset: 2px;
}

/* About button (beside New Post) */
.about-btn {
    position: absolute;
    left: 120px;
    top: 50%;
    transform: translateY(-50%);
    background: #f4d35e; /* medium yellow */
    color: #1a1a1a;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.45);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 1000;
}
.about-btn:hover {
    transform: translateY(-52%);
    box-shadow: 0 10px 22px rgba(0,0,0,0.55);
}
.about-btn:focus {
    outline: 2px solid rgba(255,255,255,0.12);
    outline-offset: 2px;
}

/* Modal & form styling for new post */
.modal.hidden { display: none; }
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.modal .modal-content {
    position: relative;
    box-sizing: border-box;
    background: #1e1e1e;
    color: #f0f0f0;
    padding: 18px;
    border-radius: 12px;
    width: min(700px, 92%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}
.modal-close {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
}
.field {
    display: block;
    margin: 8px 0 12px 0;
}
.field .label-text {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 6px;
}
.field input,
.field textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    background: #0f0f0f;
    color: #f0f0f0;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.95rem;
}
.field textarea { resize: vertical; }
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.char-preview {
    color: #aaa;
    font-size: 0.9rem;
}
.buttons {
    display: flex;
    gap: 8px;
}
.btn-cancel {
    background: transparent;
    color: #ccc;
    border: 1px solid #2a2a2a;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.btn-post {
    background: #f4d35e;
    color: #111;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* Post header bar (contains username) */
.post-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 25px; /* align with post content */
    background: rgba(255,255,255,0.02);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    z-index: 3;
}

/* Username on posts (inside header) */
.post .post-username {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    color: #777; /* match char-count color */
    font-weight: 800; /* stronger bold for emphasis */
    letter-spacing: 0.2px;
    margin: 0;
}

.post .post-timestamp {
    margin-left: auto;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8rem;
    color: #777;
}

/* Empty / loading states for the wall */
.no-posts {
    /* make the message occupy the full row so it's centered on the page */
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #aaa;
    font-size: 1rem;
    padding: 28px 12px;
    min-height: 120px;
}

