:root {
    --sidebar-width: 280px;
    --sidebar-bg: #343a40;
    --primary-color: #4e73df;
    --secondary-color: #f8f9fc;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
    max-height: 60px;
    transition: all 0.3s;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    overflow-y: auto;
    padding-bottom: 20px;
}

.sidebar-footer {
    margin-top: auto;
    padding-bottom: 1rem;
}

/* Nav Links */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    margin: 0 10px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background: var(--primary-color);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
    background-color: #f8f9fa;
    padding-top: 0;
}

/* Top Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1020; /* Higher than sidebar's z-index */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Scrollbar Styles */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Ensure content starts below the navbar */
.container-fluid.py-4 {
    padding-top: 1.5rem;
}

/* Square thumbnail container */
.square-thumbnail-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

/* Square thumbnail image */
.square-thumbnail {
    width: 200px;
    height: 200px;
    object-fit: cover; /* This will crop the image to fill the square */
    transition: transform 0.3s ease;
}

/* For maintaining square ratio when using 'contain' */
.square-thumbnail.contain {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Hover effect */
.square-thumbnail-container:hover .square-thumbnail {
    transform: scale(1.05);
}

/* Mobile Styles */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-logo {
        max-height: 50px;
    }
}
.diwali-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .diwali-container h1 {
        text-align: center;
        color: #FFA500;
        margin-bottom: 10px;
    }
    
    .subtitle {
        text-align: center;
        color: #666;
        margin-bottom: 30px;
    }
    
    .no-images {
        text-align: center;
        color: #666;
        padding: 40px;
    }
    
    /* Gallery Grid Styles */
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        margin-top: 30px;
    }
    
    .gallery-item {
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }
    
    .thumbnail {
        width: 100%;
        height: 300px;
        object-fit: cover;
        display: block;
    }
    
    /* Customization Form Styles */
    .customize-form {
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .customize-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;
        margin-top: 20px;
    }
    
    .preview-container {
        flex: 1;
        min-width: 300px;
    }
    
    .canvas-wrapper {
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    #preview-canvas {
        width: 100%;
        max-height: 500px;
        object-fit: contain;
        display: block;
    }
    
    .form-container {
        flex: 1;
        min-width: 300px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
        color: #555;
    }
    
    .form-group textarea, 
    .form-group input[type="text"],
    .form-group select {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
    }
    
    .form-group textarea {
        min-height: 100px;
        resize: vertical;
    }
    
    .font-size-select {
        background-color: white;
        cursor: pointer;
    }
    
    .position-notice {
        background: #f8f8f8;
        padding: 12px;
        border-radius: 4px;
        margin-bottom: 20px;
        color: #666;
        font-size: 14px;
        border-left: 4px solid #FFA500;
    }
    
    .position-notice i {
        color: #FFA500;
        margin-right: 8px;
    }
    
    .form-actions {
        display: flex;
        gap: 15px;
        margin-top: 25px;
    }
    
    /* Generated Result Styles */
    .generated-result {
        text-align: center;
        max-width: 800px;
        margin: 30px auto;
    }
    
    .generated-image {
        max-width: 100%;
        max-height: 500px;
        border: 2px solid #FFA500;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .download-options {
        margin-top: 25px;
        display: flex;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    /* Button Styles */
    .btn {
        display: inline-block;
        background-color: #FFA500;
        color: white;
        padding: 12px 25px;
        text-decoration: none;
        border-radius: 4px;
        transition: background-color 0.3s;
        border: none;
        font-size: 16px;
        cursor: pointer;
    }
    
    .btn:hover {
        background-color: #e69500;
    }
    
    .back-btn {
        background-color: #666;
    }
    
    .back-btn:hover {
        background-color: #555;
    }
    
    .generate-btn {
        background-color: #4CAF50;
    }
    
    .generate-btn:hover {
        background-color: #45a049;
    }
    
    /* Error Message */
    .error-message {
        color: #d32f2f;
        padding: 20px;
        border: 1px solid #d32f2f;
        margin: 20px;
        border-radius: 4px;
        background: #fde0e0;
    }
    .festival-buttons-section {
    margin: 40px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.festival-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    justify-content: center;
}

.festival-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    background-color: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.festival-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #f0f8ff;
    color: #0066cc;
}

.festival-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ff6b6b;
}

.festival-name {
    text-align: center;
    font-weight: 500;
}