/* assets/css/styles.css */

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

html, body {
    height: 100%;
}

body {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
	min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Apply font to all elements */
*, *::before, *::after {
    font-family: inherit;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

header {
    border-bottom: 1px solid var(--btn-nav-border);
    margin-bottom: 48px;
}

/* Basic navigation layout - temporary */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#lightToggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
}

#darkModeImg, #lightModeImg {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Color Variables - Ready for light/dark theme */
:root {
    /* Default (dark mode) colors */
    --bg-color: rgb(2, 8, 23);
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #2a2a2a;
    
    /* Navigation specific colors - dark mode */
    --nav-text-color: rgba(248, 250, 252, 0.6);
    --nav-hover-bg: rgb(30, 41, 59);
    --nav-hover-text: rgb(248, 250, 252);
    --nav-hover-border: rgb(30, 41, 59);
    
    /* Button colors - dark mode */
    --btn-nav-bg: rgb(2, 8, 23);
    --btn-nav-border: rgb(46, 60, 84);
    --btn-nav-color: rgb(255, 255, 255);
    --btn-primary-hover-bg: rgb(30, 41, 59);
    
    /* Search button colors - dark mode */
    --search-btn-bg: rgb(248, 250, 252);
    --search-btn-hover-bg: rgba(248, 250, 252, 0.9);
	
	/* Form focus colors - dark mode */
    --form-focus-border: rgb(255, 255, 255);
    
    /* Search button SVG color - dark mode */
    --search-btn-svg-color: rgb(15, 23, 42);
	
	/* Additional text color - dark mode */
    --text-muted: #94a3b8;

	/* Signup container background - dark mode */
    --signup-bg: #030d26;
}

html.light,
body.light {
    /* Light mode colors */
    --bg-color: rgb(255, 255, 255);
    --text-color: #000000;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    
    /* Navigation specific colors - light mode */
    --nav-text-color: rgba(12, 10, 9, 0.6);
    --nav-hover-bg: rgb(245, 245, 244);
    --nav-hover-text: rgb(28, 25, 23);
    --nav-hover-border: rgb(231, 229, 228);
    
    /* Button colors - light mode */
    --btn-nav-bg: rgb(255, 255, 255);
    --btn-nav-border: rgb(231, 229, 228);
    --btn-nav-color: rgb(13, 11, 10);
    --btn-primary-hover-bg: rgb(231, 229, 228);
    
    /* Search button colors - light mode */
    --search-btn-bg: rgb(250, 136, 56);
    --search-btn-hover-bg: rgba(250, 136, 56, 0.9);
	
	/* Form focus colors - light mode */
    --form-focus-border: rgb(250, 136, 56);
    
    /* Search button SVG color - light mode */
    --search-btn-svg-color: rgb(255, 255, 255);
	
	/* Additional text color - light mode */
    --text-muted: #78716c;

	/* Signup container background - light mode */
    --signup-bg: #fafafa;
}

/* Apply the colors */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation Menu Styles */
.nav-menu a {
    color: var(--nav-text-color);
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a:active,
.nav-menu a.active {
    background-color: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

/* Logo should also use navigation colors */
.logo {
    color: var(--nav-text-color);
    transition: color 0.3s ease;
}

/* Navigation Button Styles */
.btn-primary-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    color: rgb(255, 255, 255);
    background-color: rgb(33, 150, 243);
    padding: 8px 32px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px;
    border: 1px solid var(--btn-nav-border);
    padding: 8px 20px;
    background-color: var(--btn-nav-bg);
    color: var(--btn-nav-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-nav:hover, #lightToggle:hover {
    background-color: var(--btn-primary-hover-bg);
}

/* Button SVG Icons */
.btn-primary-nav svg,
.btn-nav svg {
    flex-shrink: 0;
}

#lightToggle {
	border-radius: 5px;
}

/* Search Section Styles */
.search-section {
    margin: 0 auto;
    padding: 0 5%;
}

.search-section textarea {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-color);
    height: 24px;
    max-height: 112px;
    line-height: 24px;
    padding: 8px 16px; /* Only horizontal padding */
    resize: none;
    overflow-y: auto;
    transition: height 0.1s ease;
    outline: none;
    box-sizing: content-box; /* This is important - exclude padding from height */
}

.search-section form {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--btn-nav-border);
    padding: 8px;
    border-radius: 10px;
	transition: border 0.2s ease, min-height 0.1s ease;
}

.search-section form:focus-within {
    border: 1px solid var(--form-focus-border);
}

.search-section textarea::placeholder {
    color: var(--text-secondary); /* Use your secondary text color */
}

.search-section button {
    padding: 12px;
    border-radius: 50px;
    margin-left: 8px; /* Adjusted margin */
    background-color: var(--search-btn-bg);
    border: none;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.search-section button:hover {
    background-color: var(--search-btn-hover-bg);
}

/* Search button SVG color */
.search-section button svg {
    color: var(--search-btn-svg-color);
}

/* Options Flexbox Container */
.options-flexbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 2rem auto;
}

/* Left Options Container */
.left-options {
    display: flex;
    align-items: start;
    gap: 1rem;
}

/* Aspect Ratio Section */
.aspect-ratio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
	padding: 16px;
    border-radius: 8px;
    background-color: var(--nav-hover-bg);
}

.quality-text {
	font-weight: 400 !important;
}

.aspect-ratio-section span, .quality-section span {
	font-weight: 600;
}

.aspect-ratio-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aspect-ratio-options svg {
	color: var(--text-muted);
}

.aspect-ratio-options svg:hover {
	cursor: pointer;
}

.aspect-ratio-options svg.selected-ratio {
	color: var(--search-btn-bg);
}


/* Quality Section */
.quality-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
	padding: 16px;
    border-radius: 8px;
    background-color: var(--nav-hover-bg);
	min-width: 150px;
	position: relative;
}



/* Right Options Container */
.right-options {
    display: flex;
    align-items: center;
}

/* Quality Selector */
.quality-selector {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quality-caret {
    transition: transform 0.3s ease;
}

.quality-selector.active .quality-caret {
    transform: rotate(180deg);
}

/* Quality Descriptions Dropdown */
.quality-descriptions {
    display: none;
    position: absolute;
    top: 100%;
	left: 0;
    margin-top: 8px;
    z-index: 10;
    width: 300px;
	padding: 8px;
	border-radius: 10px;
	background-color: var(--bg-color);
	border: 1px solid var(--nav-hover-bg);
	flex-direction: column;
    gap: 7px;
	line-height: 16px;
}

.quality-descriptions.show {
    display: flex;
}

.quality-descriptions li {
	display: flex;
    padding: 12px;
    gap: 10px;
}

.quality-descriptions li:hover {
	background-color: var(--nav-hover-bg);
	color: var(--text-color) !important;
	border-radius: 10px;
	cursor: pointer;
}

.quality-descriptions span {
	font-size: 14px;
    font-weight: 400;
	color: var(--text-muted);
}

.quality-descriptions svg {
	width: 21px;
}

.descriptions-flexbox {
	display: flex;
    flex-direction: column;
    gap: 8px;
}

.enhance-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--btn-nav-border);
    background-color: var(--btn-nav-bg);
    color: var(--btn-nav-color);
    transition: all 0.3s ease;
	display: flex;
    align-items: center;
    vertical-align: middle;
}

.enhance-btn span {
	margin-left: 5px;
}

.enhance-btn:hover {
    background-color: var(--btn-primary-hover-bg);
}

/* INFO FOR THE IMAGE */

.info-flexbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--nav-hover-bg);
    border-radius: 10px;
    max-width: 1000px;
    aspect-ratio: 2 / 1;
    margin: 0 auto;
    margin-bottom: 48px;
    padding: 60px 15px;
}

.info-flexbox svg, .info-flexbox p {
	color: var(--text-muted);
}

.info-flexbox h2 {
	margin: 16px auto;
    font-size: 24px;
    font-weight: 600;
}

.info-flexbox a {
	color: rgb(33, 150, 243);
}

.info-flexbox a:hover {
	text-decoration: underline;
}

footer {
    padding: 16px;
    border-top: 1px solid var(--btn-nav-border);
    margin-top: auto;
}

.flex-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.flex-item {
    width: 50%;
}

.flex-item:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-item img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.auth-container {
    background-color: var(--signup-bg);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--btn-nav-border);
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 16px;
}

.flex-item p {
    color: var(--text-muted);
    font-size: 14px;
}

.flex-item p:first-child {
    padding-bottom: 24px;
}

.flexbox-form-container{
    gap: 16px;
display: flex;
flex-direction: column;
}

.flexbox-form-group {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.auth-form {
    width: 100%;
}

.auth-form button[type="submit"] {
    width: 100%;
    height: 44px;
    background-color: var(--search-btn-bg);
    border-radius: 10px;
    font-size: 14px;
    margin-top: 24px;
    color: var(--search-btn-svg-color);
}

.auth-form button[type="submit"]:hover {
    background-color: var(--search-btn-hover-bg);
}

.flex-item label {
    font-size: 14px;
    font-weight: 500;
}

.flex-item input {
    font-size: 14px;
    border: 1px solid var(--btn-nav-border);
    margin-top: 8px;
    background-color: var(--bg-color);
    padding: 8px 12px;
    border-radius: 10px;
    width: 100%;
    color: var(--text-color);
}

.flex-item input:focus {
    border-color: var(--form-focus-border);
    outline: none; /* Remove default outline */
}

.google-auth {
    font-size: 14px;
border: 1px solid var(--btn-nav-border);
margin-top: 24px;
background-color: var(--bg-color);
border-radius: 10px;
width: 100%;
color: var(--text-color);
height: 44px;
}

.google-auth:hover {
    background-color: var(--nav-hover-bg);
}

.flex-item a:hover {
    text-decoration: underline;
}

.forgot-pass-flexbox {
    display: flex;
    justify-content: space-between;
    width: 100%;
align-items: center;
}

.forgot-pass-flexbox p {
    font-size: 12px;
}

.forgot-pass-flexbox a {
    text-decoration: underline;
}

.form-nav-p {
    margin-top: 24px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    position: relative;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 0;
    right: 30px;
    font-size: 30px;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
}

/* Pricing Page Styles */
.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pricing-title {
    text-align: center;
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-color);
}

/* Promo Banner */
.promo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--nav-hover-bg);
    border: 1px solid var(--btn-nav-border);
    border-radius: 50px;
    padding: 12px 24px;
    margin: 0 auto 60px;
    max-width: fit-content;
    font-size: 14px;
    color: var(--text-muted);
}

.promo-icon {
    font-size: 20px;
}

.promo-banner strong {
    color: var(--search-btn-bg);
    font-weight: 600;
}

/* Pricing Cards Container */
.pricing-cards {
    display: flex;
    gap: 30px;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

/* Individual Pricing Card */
.pricing-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background-color: var(--bg-color);
    border: 2px solid var(--btn-nav-border);
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Popular Card Styling */
.pricing-card-popular {
    border-color: var(--search-btn-bg);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--search-btn-bg);
    color: var(--search-btn-svg-color);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Plan Header */
.plan-header {
    text-align: center;
    margin-bottom: 30px;
}

.plan-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Pricing */
.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price-current {
    font-size: 48px;
    font-weight: 700;
    color: var(--search-btn-bg);
}

.price-original {
    font-size: 24px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-period {
    font-size: 18px;
    color: var(--text-muted);
}

/* Features List */
.plan-features {
    list-style: none;
    margin-bottom: 40px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    font-weight: 600;
}

.feature-icon.star {
    color: #f59e0b;
}

.feature-icon.plus {
    color: var(--search-btn-bg);
}

/* Plan Buttons */
.plan-button {
    width: 100%;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.plan-button-basic {
    background-color: transparent;
    color: var(--search-btn-bg);
    border-color: var(--search-btn-bg);
}

.plan-button-basic:hover {
    background-color: var(--search-btn-bg);
    color: var(--search-btn-svg-color);
}

.plan-button-pro {
    background-color: var(--search-btn-bg);
    color: var(--search-btn-svg-color);
}

.plan-button-pro:hover {
    background-color: var(--search-btn-hover-bg);
}

.plan-button-contact {
    background-color: transparent;
    color: var(--search-btn-bg);
    border-color: var(--search-btn-bg);
}

.plan-button-contact:hover {
    background-color: var(--search-btn-bg);
    color: var(--search-btn-svg-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pricing-cards {
        gap: 20px;
    }
    
    .pricing-card {
        min-width: 280px;
    }
    
    .flex-item {
        width: 100%;
    }
    .flex-item:nth-child(2) {
        display: none;
    }
    .options-flexbox {
        padding: 0 5%;
    }
    .info-flexbox {
        margin: 0 5%;
        margin-bottom: 48px;
    }
}

@media (max-width: 768px) {
    .pricing-title {
        font-size: 36px;
    }
    
    .pricing-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .pricing-card {
        max-width: 100%;
        width: 100%;
    }
    .quality-descriptions {
	left: -150px;
    }
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 68px auto 60px;
    padding: 0 20px;
}

.faq-label {
    text-align: center;
    color: rgb(33, 150, 243);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.faq-title {
    text-align: center;
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 60px;
    color: var(--text-color);
}

/* FAQ Container */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* FAQ Item */
.faq-item {
    border-bottom: 1px solid var(--btn-nav-border);
    padding-bottom: 20px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--search-btn-bg);
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    flex: 1;
}

/* Chevron Icon */
.faq-chevron {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-top: 16px;
}

.faq-answer p {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
}

.faq-answer ul {
    list-style: none;
    padding-left: 0;
}

.faq-answer li {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
}

.faq-answer li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer p,
    .faq-answer li {
        font-size: 14px;
    }
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

/*
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.user-avatar:hover {
    border-color: var(--btn-nav-border);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

*/

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--bg-color);
    border: 1px solid var(--btn-nav-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--btn-nav-border);
}

.user-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.user-email {
    font-size: 14px;
    color: var(--text-muted);
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background-color: var(--btn-nav-border);
    margin: 8px 0;
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: var(--nav-hover-bg);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* First and last item border radius */
.dropdown-item:first-of-type {
    border-radius: 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Updated User Avatar Wrapper */
.user-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    transition: background-color 0.3s ease;
}

/* User Avatar Image Container */
.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.user-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* User Avatar Name */
.user-avatar-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
}

/* User Caret */
.user-caret {
    transition: transform 0.3s ease;
    color: var(--text-color);
}

/* Rotate caret when active */
.user-avatar-wrapper.active .user-caret {
    transform: rotate(180deg);
}

.btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 18px;
    border-radius: 50px;
    background-color: rgb(33, 150, 243);
    color: rgb(255, 255, 255);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    margin: 6px 0;
}

/* Credits Display in Navigation */
.nav-credits {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    min-width: 120px;
    margin-right: 12px;
    justify-content: center;
}

/* Credits Info Row */
.credits-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.credits-label {
    font-size: 12px;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.credits-count {
    font-size: 12px;
    color: var(--text-color);
    font-weight: 600;
}

/* Progress Bar */
.credits-progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--nav-hover-bg);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.credits-progress-fill {
    height: 100%;
    border-radius: 2px;
    background-color: var(--text-color);
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-credits {
        min-width: auto;
        padding: 6px 12px;
    }
    
    .credits-info {
        justify-content: center;
    }

}

.gen-image-wrap { position: relative; display: inline-block; width: 100%; }

.gen-loader {
  /* make the loader visible even when img/SVG are hidden */
  display: none;                  
  width: 70%;
  aspect-ratio: 1;
  max-width: 512px;
  border-radius: 8px;
  background: #f6f6f6;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.06);
    margin: 20px 0;
}

/* simple rotating spinner */
.gen-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #999;
  border-radius: 50%;
  animation: genSpin 0.9s linear infinite;
}
@keyframes genSpin { to { transform: rotate(360deg); } }

.generation-result { display: block; margin-top: 30px; text-align: center; display: flex; justify-content: center; flex-direction: column;
    align-items: center;
    margin-bottom: 48px; }

.generation-result svg { border: 1px solid #F4F4F4;
    border-radius: 5px;
}

.gen-image-wrap {     display: flex;
    justify-content: center;
align-items: center;
}

.history-section {
    max-width: 1250px;
    margin: 0 auto;
    margin-bottom: 48px;
    padding: 0 5%;
}

.history-card { cursor: pointer; }
.history-card:hover { background: rgba(0,0,0,0.03); }

.char-counter {
    width: 85px;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Mobile navbar layout ===== */
.hamburger-btn{
  display:none; /* show on mobile */
  width:44px; height:44px;
  border:1px solid var(--btn-nav-border);
  border-radius:12px;
  align-items:center; justify-content:center;
  color: var(--nav-text-color);
}
.hamburger-btn:hover{ background-color: var(--btn-primary-hover-bg); }

/* Drawer + overlay */
.nav-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.6);
  opacity:0; visibility:hidden;
  transition: opacity .2s ease;
  z-index:1400;
}
.nav-overlay.show{ opacity:1; visibility:visible; }

.mobile-drawer{
  position:fixed; top:0; left:0;
  height:100vh; width:82vw; max-width:360px;
  background: var(--bg-color);
  border-right:1px solid var(--btn-nav-border);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index:1401;
  display:flex; flex-direction:column;
  padding:16px;
}
.mobile-drawer.show{ transform: translateX(0); }
.drawer-header{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 24px;
}
.drawer-logo{ display:flex; align-items:center; gap:10px; color: var(--nav-text-color); }
.drawer-close{
  width:36px; height:36px; border:1px solid var(--btn-nav-border);
  border-radius:10px; display:flex; align-items:center; justify-content:center;
  color: var(--nav-text-color);
}
.drawer-menu{ display:flex; flex-direction:column; gap:6px; }
.drawer-menu a{
  color: var(--nav-text-color); padding:12px 10px; border-radius:10px;
}
.drawer-menu a:hover{ background: var(--nav-hover-bg); color: var(--nav-hover-text); }

/* avoid background scroll when drawer open */
html.no-scroll, body.no-scroll{ overflow:hidden; }

/* ===== Mobile rules (≤1024px) ===== */
@media (max-width:1024px){
  /* Turn the top bar into 3 zones: [hamburger] [center buttons] [theme] */
  nav{
    padding: 10px 12px;
  }
  .nav-left{ grid-column:1; display:flex; align-items:center; gap:0; }
  .hamburger-btn{ display:flex; }

  /* Hide desktop logo/menu in the bar (logo stays inside drawer) */
  .logo, .nav-menu{ display:none; }

  /* Center Sign Up / Log In; theme toggle at far right */
  .nav-right{
          width: 100%;
  }
  .nav-buttons{ display:flex; width: 100%; justify-content: space-between; }

  #lightToggle{
    width:44px; height:44px;
    border:1px solid var(--btn-nav-border);
    border-radius:12px;
    display:flex; align-items:center; justify-content:center;
    padding:0;
  }

  /* Make auth buttons smaller & hide their SVGs on mobile */
  .btn-primary-nav, .btn-nav{
    padding:8px 16px;
    font-size:14px;
    border-radius:12px;
    height: 100%;
    margin: 0 3px;
  }
  .btn-primary-nav svg, .btn-nav svg{ display:none; }
}

/* (Optional) slightly round lightToggle on desktop too */
#lightToggle{ border-radius:8px; }

#auth-modal-content {
    width: 100%;
}

@media (max-width: 1024px) {
  /* override the earlier mobile rule that centers things */
  body.logged-in .nav-right .nav-buttons {
    justify-content: flex-end;
  }
}

@media (max-width: 550px) {
body.logged-in .user-avatar-name {
    display: none !important;
  }
.history-card img {
    height: 70px !important;
}
}

@media (max-width: 700px) {
  body.logged-in .nav-credits { 
    display: none !important;
  }
    .credits-label {
        display: none;
    }
}

/* Dialog shell (unchanged) */
.hm-dialog{
  position:relative; max-width:min(980px,96vw); max-height:92vh; width:100%;
  background:var(--bg,#fff); color:var(--fg,#111827);
  border-radius:14px; overflow:hidden; box-shadow:0 20px 50px rgba(0,0,0,.35);
  display:flex; flex-direction:column;
}

/* Header keeps only the X, aligned right */
.hm-header{
  display:flex; align-items:center; justify-content:flex-end; gap:6px;
  padding:10px 14px; border-bottom:1px solid var(--border,#e5e7eb);
}
.hm-icon-btn{
  display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px;
  border-radius:8px; background:transparent; cursor:pointer; color:var(--text-color);
}

/* Body: image left, info right */
.hm-body{display:flex; gap:0; flex-wrap:wrap;}
.hm-image-wrap{
  flex:1 1 560px; min-width:320px; background:var(--muted,#f3f4f6);
  display:flex; align-items:center; justify-content:center;
}
.hm-image{max-height:80vh; width:100%; height:auto; object-fit:contain; display:block;}

.hm-info{
  flex:1 1 320px; min-width:280px;
  padding:14px; display:flex; flex-direction:column; gap:12px;padding-top: 60px;background: var(--btn-primary-hover-bg);
}

/* NEW: top bar in right column (avatar+name left, actions right) */
.hm-author-bar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-bottom:12px; border-bottom:1px solid var(--border,#e5e7eb); /* only bottom */
}
.hm-author-right{display:flex; align-items:center; gap:10px;}
.hm-author-right img{width:36px; height:36px; border-radius:9999px; object-fit:cover;}
.hm-author-meta{min-width:0;}
.hm-name{font-weight:600; line-height:1;color:var(--text-color);}
.hm-time{font-size:12px; color:var(--text-muted);}
.hm-inline-actions{display:flex; align-items:center; gap:6px;}

/* Prompt row label + copy button */
.hm-prompt-header{display:flex; align-items:center; justify-content:space-between; gap:8px;color:var(--text-color);}
.hm-section-title{font-size:12px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; color:var(--text-muted);}
.hm-prompt{margin:0; line-height:1.55; white-space:pre-wrap; word-break:break-word;color:var(--text-color);}

/* Quality + Aspect ratio with labels */
.hm-quick{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:2px;}
.hm-quick-item{display:flex; flex-direction:column; gap:6px;}
.hm-quick-label{font-size:12px; color:var(--text-muted);}
.hm-pill{
  font-size:15px; color:var(--text-color);}
.hm-ratio{display:inline-flex; align-items:baseline; justify-content:start; width:34px; height:34px; border-radius:8px;color:var(--text-color);}
.hm-ratio svg{display:block;}

.hm-submeta{color:#6b7280; font-size:12px;}
.hm-msg{font-size:13px;}

.hm-icon-btn-close {position: absolute;
    top: 10px;
    right: 10px;
    background: var(--btn-primary-hover-bg);
    color: var(--text-color);}

/* Mobile: let the right column scroll if it overflows */
@media (max-width:916px){
  /* Keep the close/X visible while scrolling */
  .hm-header{
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg,#fff);
    border-bottom:1px solid var(--border,#e5e7eb);
  }

  /* The entire content area scrolls */
  .hm-body{
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Don’t lock the right column anymore; it will scroll with the body */
  .hm-info{
    max-height: none;
    overflow: visible;
    padding-top: 14px;
  }

  /* Keep the image from eating the whole screen */
  .hm-image{
    max-height: 55svh;   /* adjust if you want more room for text */
  }

  /* Safe-area padding for iOS notches (optional but nice) */
  .hm-dialog{ padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width:916px){
.hm-info{
    padding-top: 14px;
  }
}