body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: #f5f5f5;
}

a {
    color: #f5f5f5;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #333;
}

.logo-small {
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.user-info a {
    color: #f5f5f5;
    text-decoration: none;
}

h1 {
    margin: 1rem 1.5rem;
}

main {
    padding-bottom: 2rem;
}

/* Login page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    background: #1c1c1c;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
    width: 320px;
}

.login-container h1 {
    margin-top: 0;
    text-align: center;
}

.login-container label {
    display: block;
    margin-bottom: 0.75rem;
}

.login-container input {
    width: 100%;
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid #555;
    background: #111;
    color: #f5f5f5;
}

.login-container button {
    width: 100%;
    padding: 0.6rem;
    border-radius: 4px;
    border: none;
    background: #e6398f;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
}

.error {
    background: #802020;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

/* Grids */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1100px;      /* NEW: limit overall width */
    margin: 0 auto;         /* center the grid */
}

.grid-item {
    text-decoration: none;
    color: inherit;
}


.grid-item img {
    width: 100%;
    height: 260px;          /* NEW: fixed height for consistent cards */
    display: block;
    border-radius: 4px;
    object-fit: cover;      /* crop image instead of stretching it */
}

.grid-title {
    margin-top: 0.5rem;
    text-align: center;
}

.placeholder-thumb {
    width: 100%;
    height: 200px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* Photoshoot thumbnails */
.thumbnail-container {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.thumb {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
}

/* Blur background when overlay open */
body.overlay-open .thumbnail-container {
    filter: blur(5px);
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    background: rgba(0,0,0,0.75);
    z-index: 1000;
}

.overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
}

.overlay .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.overlay .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
}

.overlay .nav.prev { left: 40px; }
.overlay .nav.next { right: 40px; }

/* Stories page */

.stories-page main {
    padding: 1.5rem;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.story-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.story-thumb-wrap img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 220px;
}

.story-content {
    padding: 1rem;
}

.story-content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.story-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

/* Buttons and links */

.story-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    background: #e6398f;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
}

.btn:hover {
    background: #ff4da0;
}

.audio-details summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: #ddd;
}

audio {
    width: 100%;
    margin-top: 0.4rem;
}

.no-content {
    font-size: 0.85rem;
    color: #aaa;
}

/* Homepage */

.home-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #111;
    color: #f5f5f5;
}

.home-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.home-logo {
    font-size: 3rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.home-menu-ring {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.home-menu-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.95rem;
}

.home-menu-item span {
    margin-top: 0.5rem;
}

/* Icon styles: film, book, card (simple, sophisticated) */

.icon {
    width: 60px;
    height: 40px;
    border: 2px solid #f5f5f5;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Film roll: side perforations */
.icon-film::before,
.icon-film::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 64px;
    border: 2px solid #f5f5f5;
    border-radius: 3px;
    transform: translateY(-50%);
}
.icon-film::before { left: -12px; }
.icon-film::after  { right: -12px; }

/* Book: spine */
.icon-book::before {
    content: "";
    position: absolute;
    left: 45%;
    top: 4px;
    bottom: 4px;
    border-left: 2px solid #f5f5f5;
}

/* Card: lower detail line */
.icon-card::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 10px;
    border-bottom: 2px solid #f5f5f5;
}

/* About page layout */

.about-main {
    padding: 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Admin layout */

.admin-main {
    padding: 1.5rem 2rem;
}

.admin-menu {
    list-style: none;
    padding-left: 0;
}

.admin-menu li {
    margin-bottom: 0.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    border: 1px solid #333;
    padding: 0.4rem 0.6rem;
    text-align: left;
}

.success {
    background: #1f5f2f;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

/* Admin photos grid */

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-photo-item {
    background: #181818;
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

.admin-photo-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

.admin-photo-actions {
    font-size: 0.8rem;
}

.cover-label {
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: #e6398f;
    color: #fff;
}
