/* === General === */
body {
    margin: 0;
    font-family: 'Playfair Display', serif;
    background-color: floralwhite;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #330000;
    overflow: hidden;
}

/* === Auth === */
.auth-container {
    background-color: #330000e0;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(51, 0, 0, 0.7);
    width: 320px;
    color: floralwhite;
    text-align: center;
}

h2 {
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 2em;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-family: 'Playfair Display', serif;
}

input::placeholder {
    font-style: italic;
    color: #bfbfbf;
}

button {
    background-color: floralwhite;
    border: none;
    color: #330000;
    font-weight: 700;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    font-family: 'Playfair Display', serif;
}

button:hover {
    background-color: #ffd1d1;
}

p {
    margin-top: 20px;
    font-size: 0.95em;
}

a {
    color: floralwhite;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffd1d1;
}

/* === Sidebar === */
.sidebar {
    height: 100vh;
    width: 250px;
    background-color: #330000e0;
    border-right: 2px solid floralwhite;
    display: flex;
    flex-direction: column;
    padding: 60px 20px 20px 20px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    transition: width 0.3s ease;
    color: floralwhite;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar a,
.dropdown-btn {
    text-decoration: none;
    color: floralwhite;
    padding: 10px 0;
    font-size: 1.1em;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-btn {
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
}

.sidebar.collapsed a,
.sidebar.collapsed .dropdown-btn {
    font-size: 0;
    padding: 8px 0;
}

.sidebar a:hover,
.dropdown-btn:hover {
    background-color: #330000a8;
}

.dropdown {
    margin-top: 10px;
}

.dropdown-content {
    display: none;
    flex-direction: column;
    margin-left: 10px;
}

.dropdown.active .dropdown-content {
    display: flex;
}

.sidebar.collapsed .dropdown-content {
    display: none !important;
}

/* === Sidebar Toggle Button === */
.toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
    color: floralwhite;
    transition: transform 0.3s ease;
    font-family: 'Playfair Display', serif;
}

.toggle-btn:hover {
    background-color: transparent;
}

.sidebar.collapsed .toggle-btn {
    transform: rotate(180deg);
}

/* === Header === */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: floralwhite;
    text-align: center;
    font-size: 2em;
    padding: 10px 0;
    z-index: 5;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.header a {
    text-decoration: none;
    color: inherit;
}

.sidebar.collapsed ~ .header {
    margin-left: 60px;
}

/* === Main Content === */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.main {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: floralwhite;
    color: #330000;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main {
    margin-left: 60px;
}

/* === File Upload === */
h1 {
  font-size: 6vw;
  margin: 0 0 20px 0;
  text-align: center;
  background: floralwhite;
  font-family: 'Playfair Display', serif;
}

.upload-form {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Playfair Display', serif;
}

.upload-form input[type="file"] {
    display: none;
}

.file-label,
.upload-form button,
.download-selected,
.delete-selected {
    background-color: #330000e0;
    color: floralwhite;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-label:hover,
.upload-form button:hover,
.download-selected:hover,
.delete-selected:hover {
    background-color: #550000;
}

.file-name-preview {
    font-size: 1rem;
    color: #330000;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: text;
}

.file-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: white;
    font-family: 'Playfair Display', serif;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #330000e0;
    transition: width 0.3s ease;
}

/* === Gallery === */
.intro-photo {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url('/images/photography/intro.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1;
}

.intro-photo h1 {
    font-family: 'Noto Serif JP', serif;
    font-weight: 800;
    font-size: 7em;
    margin: 0;
    color: white;
    text-shadow: none;
}

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

.gallery {
    column-count: 3;
    column-gap: 20px;
    transition: column-count 0.3s ease;
}

.sidebar.collapsed ~ .main .gallery {
    column-count: 3;
}

.sidebar:not(.collapsed) ~ .main .gallery {
    column-count: 2;
}

.gallery img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    display: block;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    break-inside: avoid;
}

.gallery img.loaded {
    opacity: 1;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.lightbox:target {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    text-decoration: none;
}
