* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.carousel-container {
	max-width: 1000px;
	margin: 0 auto;
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	display: flex;
	flex-direction: column;
	height: calc(100vh - 90px);
	min-height: 500px;
}

/* Main image display area - takes remaining space */
.main-image-container {
	position: relative;
	width: 100%;
	flex: 1;
	margin-bottom: 20px;
	background: #454545;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.main-image {
	display: block;
}

/* Responsive: below 1100px */
@media (max-width: 1100px) {
	.carousel-container {
		height: calc(100vh - 40px);
		min-height: 400px;
	}
	
	.main-image-container {
		min-height: 300px;
	}
}
	
/* Navigation arrows on main image */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-arrow:hover {
    background: rgba(255,255,255,1);
}

.nav-arrow.prev {
    left: 10px;
}

.nav-arrow.next {
    right: 10px;
}

/* Image counter */
.image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* Thumbnail strip - fixed at bottom */
.thumbnail-strip {
	border-top: 2px solid #e0e0e0;
	padding-top: 15px;
	flex-shrink: 0; /* Prevents thumbnails from shrinking */
}

.thumbnail-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    /* padding: 5px 0; */
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.thumbnail-scroll::-webkit-scrollbar {
    height: 8px;
}

.thumbnail-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.thumbnail-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.thumbnail-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
    object-fit: cover;
}

.thumbnail:hover {
    border-color: #ccc;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0,123,255,0.5);
}

/* Landscape: fill HEIGHT (not width!) to eliminate top/bottom bars */
.main-image.landscape {
	height: 100%;
	width: auto;
	max-width: none; /* Allow it to be wider than container */
}

/* Portrait: same approach */
.main-image.portrait {
	height: 100%;
	width: auto;
	max-width: 100%;
}
		
/* Mobile optimization - no alert needed */
@media (max-width: 1050px) {
    .carousel-container {
        padding: 10px; /* Reduce padding on mobile */
        height: auto;
        min-height: 400px;
    }
    
    .main-image-container {
        height: 50vh; /* Use viewport height for mobile */
        min-height: 300px;
    }
    
    .main-image.landscape {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    .thumbnail {
        width: 80px; /* Smaller thumbnails on mobile */
        height: 60px;
    }
}

/* Screen width warning modal */
#narrowScreenWarning {
    display: none;
}

.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.warning-box h2 {
    margin: 0 0 15px 0;
    color: #333;
}

.warning-box p {
    margin: 0 0 20px 0;
    color: #666;
}

.warning-checkbox {
    margin: 20px 0;
    text-align: left;
}

.warning-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.warning-checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

.warning-checkbox span {
    color: #666;
    font-size: 14px;
}

.warning-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.warning-button:hover {
    background: #0056b3;
}

/*	Close Tab button  */
.controls {
    text-align: center;
    margin-top: 15px;
}

.btn {
    background-color: rgb(0, 209, 0);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: rgb(0, 180, 0);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: #666;
}

.btn-secondary:hover {
    background-color: #555;
}