* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: url("bg.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Bar */
.site-header {
    background-color: rgba(26, 26, 46, 0.361);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, #96f04c, #e343ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hide hamburger by default */
.menu-toggle {
  display: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

/* Mobile menu (hidden initially) */
.menu-links {
  display: flex;
  gap: 30px;
}

.mobile-auth {
  display: none;
}

/* Responsive navbar */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .menu-links {
    display: none;
    flex-direction: column;
    background: rgb(1, 1, 20);
    position: absolute;
    top: 70px;
    right: 5%;
    width: 250px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  }

  .menu-links a {
    padding: 12px 0;
    font-size: 16px;
  }

  .auth-buttons.desktop-auth {
    display: none;
  }

  .auth-buttons.mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
  }

  /* When active */
  .menu-links.active {
    display: flex;
  }
}


.menu-links a {
    color: #e5e5e5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.menu-links a:hover {
    color: #9e4cf0;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login {
    background-color: transparent;
    color: #fff;
    border: 2px solid #43ddee;
}

.btn-login:hover {
    background-color: #4361ee;
}

.btn-register {
    background: linear-gradient(45deg, #43eeaa, #544cf0);
    color: white;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.4);
}

/* Main Layout */
.layout-wrapper {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
}

/* Sidebar */
.chat-sidebar {
    width: 300px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-heading {
    font-size: 18px;
    font-weight: 600;
}

.btn-new-chat {
    background-color: #a234b89a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-card {
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-card:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.chat-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.chat-snippet {
    font-size: 12px;
    color: #a0a0a0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Main Section, Zeesu bhai hai kya */

.container {
    flex: 1;
    max-width: 1350px;
    margin: 0 auto;
    padding: 32px;
    position: relative;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease-in-out;
}
.container:hover {
    transform: translateY(-4px);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 28px;
    color: #4cc9f0;
    padding: 12px;
    background: rgba(76, 201, 240, 0.15);
    border-radius: 50%;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(45deg, #43eeaa, #544cf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theme-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.theme-toggle:hover {
    background: rgba(76, 201, 240, 0.3);
}

/* Prompt Form */
.prompt-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prompt-container {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
}

.prompt-input {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    resize: none;
}
.prompt-input::placeholder {
    color: #bbb;
}

.prompt-btn {
    background: linear-gradient(135deg, #43eeaa, #544cf0);
    border: none;
    color: #fff;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}
.prompt-btn:hover {
    opacity: 0.85;
}

/* Prompt Actions */
.prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.select-wrapper {
    flex: 1;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
}

.custom-select {
    width: 100%;
    padding: 12px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
    cursor: pointer;
}

.generate-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    background: linear-gradient(45deg, #4361ee, #4cc9f0);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}
.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.5);
}
.main-content .gallery-grid:has(.img-card) {
    margin-top: 30px;
}

.main-content .gallery-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-grid .img-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.5s ease;
}

/* Normal hover effect (sirf jab loading/error na ho) */
.gallery-grid .img-card:not(.loading, .error):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* Image */
.gallery-grid .img-card .result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Jab loading/error ho, image aur overlay hide ho jaye */
.gallery-grid .img-card:is(.loading, .error) .result-img,
.gallery-grid .img-card:is(.loading, .error) .img-overlay {
    display: none;
}

/* Overlay (download button) */
.gallery-grid .img-card .img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    opacity: 0;
    pointer-events: none;
    justify-content: flex-end;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    transition: all 0.3s ease;
}
.gallery-grid .img-card:hover .img-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Download button */
.gallery-grid .img-card .img-download-btn {
    height: 45px;
    width: 45px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.25);
    transition: all 0.3s ease;
}
.gallery-grid .img-card .img-download-btn:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.4);
}

/* STATUS (Loading / Error) */
.gallery-grid .img-card .status-container {
    padding: 15px;
    display: none;
    gap: 13px;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Jab loading/error ho to status dikh jaye */
.gallery-grid .img-card.loading .status-container,
.gallery-grid .img-card.error .status-container {
    display: flex;
}

/* Spinner (loading animation) */
.gallery-grid .img-card.loading .spinner {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #4cc9f0;
    animation: spin 1s linear infinite;
}

/* Error icon */
.gallery-grid .img-card.error .status-container i {
    font-size: 1.7rem;
    color: #ef4444;
}

.gallery-grid .img-card .status-text {
    font-size: 0.85rem;
    color: #bbb;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header h1 {
        font-size: 20px;
    }

    .prompt-actions {
        flex-direction: column;
        gap: 12px;
    }

    .generate-btn {
        width: 100%;
    }
}












/* Footer */
.site-footer {
    background-color: rgba(46, 46, 26, 0.667);
    padding: 40px 5% 20px;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.footer-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-box {
    flex: 1;
    min-width: 200px;
}

.footer-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1dabb3;
}

.footer-nav {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav a {
    color: #e5e5e5;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #4cc9f0;
}

.footer-credits {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0a0;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: #e5e5e5;
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #4cc9f0;
}

/* Responsive Design */
@media (max-width: 900px) {
    .layout-wrapper {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
    }
    
    .menu-links {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
}
