body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f8f6f2;
    color: #333;
}

h1 {
    margin-bottom: 10px;
}

input[type="file"] {
    display: none;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.button {
    display: block;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: white;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    opacity: 0.9;
}

.button:disabled {
    background: #aaa;
    cursor: not-allowed;
    opacity: 0.6;
}

.upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.photo-preview-container {
    position: relative;
    display: none;
}

.photo-preview {
    display: block;
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
}

.clear-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 22px;
    line-height: 30px;
    padding: 0;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 30px 0;
}

.gallery-photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.access-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.password-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.access-form input[type="password"],
.access-form input[type="text"] {
    flex: 1;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.password-input-wrapper button {
    flex-shrink: 0;
    white-space: nowrap;
}

.error-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 20px;
    text-align: center;
}

.error-container h1 {
    margin-bottom: 15px;
}

.error-code {
    color: #888;
    font-size: 0.9rem;
}

.error-button {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    background: #333;
    color: white;
}

.access-error {
    text-align: center;
    padding: 12px;
    color: #8a0000;
}

#preview-error {
    display: none;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
