/* style.css */
/* This font gives that old Tumblr vibe */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

body {
    font-family: "Roboto Mono", monospace;
    background-color: #0a0a0a; /* Pure black background */
    color: #ffffff; /* White text */
    margin: 0;
    padding: 2rem;
    line-height: 1.6;
    background-attachment: fixed;
}


/* Navigation Styles */
nav {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

nav a {
    color: #ccc;
    text-decoration: none;
    margin: 0 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

nav a:hover {
    color: #fff;
}

/* Page Header */
h1 {
    text-align: center;
    font-weight: 100;
    font-size: 2.5rem;
    letter-spacing: 5px;
    margin-bottom: 3rem;
}

h2 {
    margin: 0.3rem 0 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 400;
}

p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Grid Layout for Galleries (Closet, Outfits, Inspo) */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    background-color: #111;
    border: 1px solid #222;
    padding: 1rem;
    text-align: center;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
}

.gallery-item p {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #999;
}

/* Forum Form Styles */
form {
    max-width: 500px;
    margin: 0 auto 3rem auto;
    background: #111;
    padding: 2rem;
    border: 1px solid #222;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
}

input, textarea, select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    font-family: "Roboto Mono", monospace;
}

button {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    padding: 0.7rem 2rem;
    cursor: pointer;
    text-transform: lowercase;
    letter-spacing: 1px;
    font-family: "Roboto Mono", monospace;
}


button:hover {
    background: #222;
}

/* Comments Section */
#comments {
    max-width: 700px;
    margin: 0 auto;
}

.comment {
    background: #111;
    border: 1px solid #222;
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment .author {
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
}

.comment .text {
    color: #ccc;
}

.username-hint {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}
.username-hint.error {
    color: #ff4d4d;
}

/* Shared form field sizing for forms such as Inspo and Forum */
.form-control[type="text"],
textarea.form-control {
    display: block;
    width: 100%;
    max-width: 480px;
    margin-bottom: 0.9rem;
}

.form-control[type="file"] {
    display: block;
    width: 100%;
    max-width: 480px;
    margin-bottom: 0.9rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Shared modal frame for closet, outfits, and inspo */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: min(860px, calc(100% - 2rem));   /* was min(1200px, ...) */
    max-height: 85vh;                        /* was calc(100vh - 2rem) */
    margin: 7.5vh auto;                      /* was 1rem auto */
    background: #111;
    border: 1px solid #333;
    overflow-y: auto;
    z-index: 1001;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.8rem;
    cursor: pointer;
}

.modal-close:hover {
    background: transparent;
}

.closet-modal-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
    object-fit: contain;
}

.closet-modal-copy {
    padding: 1.5rem;
}


.card {
    display: block;
    margin: 0;
    break-inside: avoid;
    overflow: hidden;
    cursor: pointer;
    background: rgba(17, 17, 17, 0.96);
    border: 1px solid #222;
    transition: border-color 0.2s ease;
}

.gallery > .card {
    align-self: start;
}

.card:hover {
    border-color: #3a3a3a;
}

.card:focus-visible {
    border-color: #3a3a3a;
    outline: 1px solid #666;
    outline-offset: 2px;
}

.card img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(12%);
}

.card-body {
    padding: 0.75rem;
    display: grid;
    gap: 0.4rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.75rem;
}

.card h3 {
    margin: 0;
    font-size: 0.95rem;
}

.card-cta {
    color: #666;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-author {
    margin: 0;
    color: #bcbcbc;
    font-size: 0.85rem;
}

.upvote {
    justify-self: start;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    min-height: 0;
}

.modal-media {
    background: #050505;
}

.modal-media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
}

.modal-copy {
    padding: 1.25rem;
    display: grid;
    align-content: start;
    gap: 1rem;
}

.modal-label,
.modal-meta-label {
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
}

.modal-meta-label {
    display: block;
}

.modal-copy h3 {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    letter-spacing: 2px;
}

.modal-caption {
    display: grid;
    gap: 0.4rem;
    padding: 1rem 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.modal-caption span:not(.modal-meta-label) {
    color: #fff;
    font-size: 1.1rem;
}

.modal-description {
    margin: 0;
    color: #d0d0d0;
    font-size: 1rem;
    line-height: 1.8;
}

.modal-upvote {
    justify-self: start;
}

@media (max-width: 900px) {
    .modal-layout {
        grid-template-columns: 1fr;
    }

    .modal-media img {
        max-height: 50vh;
    }
}

@media (max-width: 600px) {
    .modal-content {
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
        margin: 0.5rem auto;
    }
}
