/* General body styling */
body {
    font-family: 'Inter', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Header styling */
h1 {
    font-size: 36px;
    margin: 20px;
    color: #fff;
}

/* Slideshow Container */
.slideshow-container {
    max-width: 1000px;
    width: 90%;
    margin: 2rem auto;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

/* Hide all slides by default */
.mySlides {
    display: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.mySlides.showing {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* Caption text */
.caption {
    font-size: 20px;
    color: #f5f5f5;
    margin-top: 15px;
    width: 100%;
    text-align: center;
    padding: 10px;
}

/* Previous and Next Buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 60px;
    height: 60px;
    padding: 0;
    margin-top: -30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    z-index: 2;
    margin: 0 20px;
}

.prev:hover, .next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Thumbnail Styles */
.thumbnail-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-top: 20px;
}

.thumbnail, .thumbnail-video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.thumbnail:hover, .thumbnail-video:hover {
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6200ea, #b388ff);
    width: 0;
    border-radius: 4px;
    transition: width 5s linear;
}

/* Admin Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

.delete-button {
    background-color: #e53935;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-button:hover {
    background-color: #b71c1c;
}

/* Success and Error Messages */
.success-message, .error-message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 16px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Styling */
form {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

input[type="text"], input[type="file"], input[type="number"], input[type="submit"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #45a049;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }

    .thumbnail, .thumbnail-video {
        width: 40px;
        height: 30px;
    }

    input[type="text"], input[type="file"], input[type="number"], input[type="submit"] {
        font-size: 16px;
    }

    table, th, td {
        font-size: 14px;
    }

    .slide-image {
        max-width: 100%;
        max-height: 400px;
    }
}

/* Image sizing */
.slide-image {
    max-width: 600px;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* Video sizing */
video {
    max-width: 100%;
    max-height: 70vh;
    margin: auto;
}

/* Add these at the end of your CSS file */
.image-error-message {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6b6b;
    padding: 20px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 400px;
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6b6b;
    padding: 20px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
}

/* Style for images in error state */
.slide-image.error {
    border: 2px solid #ff6b6b;
    opacity: 0.5;
}
