/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    /*background-color: var(--background);*/
    background: url(../stucco.gif);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header styles */
header {
    background-color: #333;
    color: white;
    padding: 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

/* Main content */
main {
    max-width: 1200px; /*100%;*/
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Gallery grid */
.gallery-container {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    background: transparent;
    padding: 0;
    transition: transform 0.3s ease;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border: none;
    filter: none;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.ebay-link-text {
    color: white;
    background: #e53238;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

/* Fancybox styles 
.fancybox__content {
    position: relative;
    cursor: pointer;
}

.fancybox__content::before {
    content: 'Click to view on eBay';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.fancybox__content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 9998;
}

.fancybox__content:hover::before {
    opacity: 1;
}

.fancybox__content:hover::after {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: none;
}*/

/* Pagination styles */
.pagination-container {
    margin: 20px 0;
    overflow-x: auto;
    padding-bottom: 15px; /* Increased padding to accommodate thicker scrollbar */
}

.pagination {
    display: flex;
    gap: 5px;
    padding: 10px 0;
    min-width: min-content;
}

/* Custom scrollbar for pagination container */
.pagination-container::-webkit-scrollbar {
    height: 12px; /* Increased height for thicker scrollbar */
}

.pagination-container::-webkit-scrollbar-track {
    background: var(--light-grey);
    border-radius: 6px;
}

.pagination-container::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 6px;
    border: 2px solid var(--light-grey); /* Added border for better visibility */
}

.pagination-container::-webkit-scrollbar-thumb:hover {
    background: var(--hover-blue);
}

/* For Firefox */
.pagination-container {
    scrollbar-width: thick;
    scrollbar-color: var(--primary-blue) var(--light-grey);
}

.pagination a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--light-grey);
}

.pagination a.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.page-jump input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-align: center;
}

.page-jump button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.page-jump button:hover {
    background-color: var(--hover-blue);
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination {
        width: 100%;
        justify-content: flex-start;
    }
    
    .page-jump {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: white;
    margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    nav {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Fancybox eBay button styles */
.fancybox__button--ebay {
    background: #e53238;
    color: white;
    border-radius: 4px;
    padding: 4px;
    margin: 0 4px;
    transition: background-color 0.3s;
}

.fancybox__button--ebay:hover {
    background: #c31e24;
}

.fancybox__button--ebay svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Fancybox Overlay Styles */
.fancybox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 9999;
    cursor: pointer;
    transition: background-color 0.3s ease;
    opacity: 0;
}

.fancybox-overlay:hover {
    background: rgb(0 0 0 / 21%);
    opacity: 1;
}

/* Ensure the overlay is above the image */
.fancybox__content {
    position: relative;
}

.fancybox__content img {
    position: relative;
    z-index: 1;
}

.fancybox-overlay .overlay-text {
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.fancybox-overlay:hover .overlay-text {
    transform: scale(1.1);
}

/* Base styles */
:root {
    --text-color: #2c3e50;
    --background: #f5f7fa;
    --border-color: #e1e8ed;
    --primary-blue: #3498db;
    --hover-blue: #2980b9;
    --light-grey: #ecf0f1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Gallery styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.gallery-item {
    position: relative;
    background: white;
    padding: 0;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: auto; /*170px;*/
    object-fit: cover;
    border: none;
    filter: none;
}

/* Upload form styles */
.upload-form {
    background: var(--light-grey);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

input[type="text"],
input[type="file"],
input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    border-radius: 3px;
}

.submit-btn {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--hover-blue);
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 3px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Fancybox customization */
.fancybox__content {
    background-color: white !important;
    padding: 0;
}

.fancybox__toolbar {
    background-color: rgba(44, 62, 80, 0.9) !important;
}

.fancybox__button {
    color: white !important;
}

.fancybox__button--ebay {
    background-color: var(--primary-blue) !important;
}

.fancybox-overlay {
    background: transparent !important;
    color: white;
}

/* Authentication styles */
.auth-info {
    text-align: right;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    color: var(--text-color);
}

.auth-info p {
    margin: 0;
}

.logout-link {
    color: var(--primary-blue);
    text-decoration: none;
}

.logout-link:hover {
    color: var(--hover-blue);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .gallery-item img {
        height: 150px;
    }
}

/* Remove all decorative elements */
.gallery-item::before,
.gallery-item::after {
    display: none;
}

/* Message Content Styles */
.message-content {
    background: var(--light-grey);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.message-content-inner {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.message-content-inner img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.message-content-inner p {
    margin-bottom: 15px;
}

.message-content-inner h1,
.message-content-inner h2,
.message-content-inner h3,
.message-content-inner h4,
.message-content-inner h5,
.message-content-inner h6 {
    margin: 20px 0 10px;
    color: var(--text-color);
}

.message-content-inner ul,
.message-content-inner ol {
    margin: 15px 0;
    padding-left: 20px;
}

.message-content-inner a {
    color: var(--primary-blue);
    text-decoration: none;
}

.message-content-inner a:hover {
    text-decoration: underline;
}

/* Make message content responsive */
@media (max-width: 768px) {
    .message-content {
        padding: 15px;
        margin: 15px 0;
    }
}