:root {
    --bg-1: #0A0C1A; /* Deeper background */
    --bg-2: #0E1028; /* Slightly different tone */
    --card-bg: rgba(255, 255, 255, 0.05); /* Slightly less opaque */
    --card-border: rgba(255, 255, 255, 0.1);
    --card-border-active: rgba(122, 140, 255, 0.6);
    --stroke: rgba(255, 255, 255, 0.08); /* Lighter stroke */
    --text: #eef1ff;
    --muted: #a8b0d3;
    --accent-1: #6a8cff; /* Slightly softer blue accent */
    --accent-2: #9b5cff; /* Retaining the purple accent */
    --glow: 0 10px 40px rgba(106, 140, 255, 0.2), 0 10px 50px rgba(155, 92, 255, 0.1); /* Refined glow */
    --input-bg: rgba(255,255,255,0.02);
    --input-border: rgba(255,255,255,0.07);
    --input-focus-border: rgba(106,140,255,0.6);
    --button-bg-hover: rgba(255,255,255,0.06);
    --button-active-gradient: linear-gradient(135deg, rgba(106,140,255,.3), rgba(155,92,255,.3));
    --button-active-border: rgba(106,140,255,.55);
}

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

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: 
        radial-gradient(1200px 800px at 10% -10%, #1a294d 0%, transparent 60%), /* Deeper blue tint */
        radial-gradient(900px 600px at 110% 10%, #3a1f6a 0%, transparent 50%), /* Deeper purple tint */
        linear-gradient(180deg, var(--bg-1), var(--bg-2));
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.2px;
    line-height: 1.6; /* Slightly more relaxed line height */
}

/* Animated aurora background */
.aurora-bg::before, .aurora-bg::after {
    content: "";
    position: fixed;
    inset: -10%;
    pointer-events: none;
    /* Use new accent colors for aurora */
    background: conic-gradient(from 180deg at 50% 50%, rgba(106,140,255,.15), rgba(155,92,255,.12), rgba(106,140,255,.15));
    filter: blur(90px); /* Slightly more blur */
    animation: aurora 20s linear infinite; /* Slower animation */
    mix-blend-mode: screen;
    opacity: 0.8; /* Slightly less opaque */
}
.aurora-bg::after {
    animation-duration: 28s; /* Slower animation */
    opacity: .5; /* Less opaque */
}
@keyframes aurora {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3%) rotate(180deg); } /* More movement */
    100% { transform: translateY(0) rotate(360deg); }
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: saturate(180%) blur(18px); /* More blur, more saturation */
    background: linear-gradient(180deg, rgba(10,12,26,.85), rgba(10,12,26,.4) 60%, transparent); /* More opaque start */
    border-bottom: 1px solid var(--stroke); /* Use stroke variable */
    box-shadow: 0 2px 15px rgba(0,0,0,0.2); /* Subtle shadow for depth */
}
.topbar .brand {
    display: flex;
    align-items: center;
    gap: .7rem; /* Slightly more space */
    padding: .9rem 1.5rem; /* More padding */
}
.logo-spark {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.2rem; /* Slightly larger */
    filter: drop-shadow(0 0 10px rgba(106,140,255,.55)); /* Stronger glow */
}
.brand-name { 
    font-weight: 800; /* Bolder */
    color: var(--text); 
    opacity: 1; /* Fully opaque */
    font-size: 1.15rem; /* Slightly larger */
}
.topbar .toolbar {
    position: absolute;
    right: 1.5rem; /* More spacing */
    top: .8rem; /* Adjusted positioning */
}

/* Container */
.container {
    position: relative;
    max-width: 1300px; /* Wider container */
    margin: 0 auto;
    padding: 2.5rem 1.5rem 8rem; /* More padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 80vh;
}

/* Input Area */
.input-area {
    width: 100%;
    max-width: 950px; /* Wider input area */
    margin: 1.5rem auto 1.8rem; /* More margin */
}
.input-container {
    position: relative;
    width: 100%;
    background: var(--input-bg);
    backdrop-filter: blur(10px); /* More blur */
    border-radius: 20px; /* More rounded */
    border: 1px solid var(--input-border);
    padding: .4rem; /* Adjusted padding */
    box-shadow: var(--glow);
    transition: all .3s ease; /* Add transition for container itself */
}

#promptInput {
    width: 100%;
    padding: 1.2rem 1.4rem; /* More padding */
    font-size: 1.1rem; /* Slightly larger font */
    background: rgba(255,255,255,0.01); /* Even more transparent */
    border: 1px solid rgba(255,255,255,0.05); /* Lighter border */
    border-radius: 16px; /* More rounded */
    color: #fff;
    transition: all .3s ease; /* Smoother transition */
    resize: none; /* Prevent manual resizing */
    min-height: 3rem; /* Ensure minimum height */
}

#promptInput::placeholder { 
    color: #c8cde6; 
    opacity: .65; /* Slightly less transparent */
    font-weight: 300; /* Lighter font weight */
}

#promptInput:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: rgba(255,255,255,0.04); /* Slightly more background on focus */
    box-shadow: 0 12px 35px rgba(106,140,255,0.22); /* Stronger shadow */
}
.input-container:focus-within { /* Add focus state to the container */
    border-color: var(--input-focus-border);
    box-shadow: 0 12px 35px rgba(106,140,255,0.22);
}

.character-count {
    position: absolute;
    right: 1rem;
    bottom: -.5rem; /* Adjusted position */
    font-size: .8rem; /* Slightly smaller font */
    color: var(--muted);
    opacity: .8;
}

/* Options Row */
.options-row {
    margin-top: 1rem; /* More margin */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem; /* More gap */
    flex-wrap: wrap;
}
.ratio-group {
    display: inline-flex;
    background: rgba(255,255,255,0.04); /* Lighter background */
    border: 1px solid rgba(255,255,255,0.07); /* Lighter border */
    border-radius: 999px;
    padding: .3rem; /* More padding */
    gap: .3rem; /* More gap */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow */
}
.ratio-btn {
    background: transparent;
    color: #e8ecff; /* Slightly brighter text */
    border: none;
    padding: .5rem .9rem; /* More padding */
    border-radius: 999px;
    font-size: .9rem; /* Slightly larger font */
    cursor: pointer;
    transition: all .25s ease; /* Smoother transition */
    font-weight: 500;
}
.ratio-btn:hover { 
    background: var(--button-bg-hover); 
    color: #fff; /* White text on hover */
}
.ratio-btn.active {
    background: var(--button-active-gradient);
    border: 1px solid var(--button-active-border);
    box-shadow: 0 8px 25px rgba(106,140,255,.3); /* Stronger shadow */
    color: #fff; /* White text on active */
    font-weight: 600;
}
.tips {
    color: var(--muted);
    font-size: .8rem; /* Slightly smaller font */
    opacity: .85;
    max-width: 50%; /* Limit width on larger screens */
    text-align: right;
}
@media (max-width: 768px) {
    .tips {
        text-align: center;
        max-width: 100%;
        margin-top: 0.5rem;
    }
    .options-row {
        justify-content: center;
    }
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.2rem; /* More gap */
    margin-top: 1.5rem; /* More margin */
    width: 100%;
    max-width: 1200px; /* Wider grid */
    justify-content: center;
}

.placeholder-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #b1b7db;
    font-size: 1.1rem; /* Slightly larger font */
    padding: 3.5rem 1.5rem; /* More padding */
    background: rgba(255,255,255,0.04); /* Slightly stronger background */
    border: 1px dashed rgba(255,255,255,0.12); /* Slightly darker border */
    border-radius: 18px; /* More rounded */
    font-weight: 300;
}

/* Image Card */
.image-container {
    --ar: 1 / 1;
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px; /* More rounded */
    overflow: hidden;
    aspect-ratio: var(--ar);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 60px rgba(0,0,0,0.4), var(--glow); /* Stronger shadow */
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; /* Smoother transitions */
    width: 100%;
    margin: 0 auto;
}

.image-container:hover {
    transform: translateY(-6px); /* More lift */
    border-color: var(--card-border-active);
    box-shadow: 0 25px 80px rgba(106,140,255,0.25); /* Stronger glow on hover */
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 24px; /* Apply border-radius to image for consistent look */
}

/* Image overlay actions */
.img-overlay {
    position: absolute;
    right: .8rem; /* More spacing */
    bottom: .8rem; /* More spacing */
    display: flex;
    gap: .5rem; /* More gap */
    opacity: 0;
    transform: translateY(8px); /* More initial translateY */
    transition: all .25s ease; /* Smoother transition */
}
.image-container:hover .img-overlay {
    opacity: 1;
    transform: translateY(0);
}
.img-action {
    background: rgba(10,12,26,.75); /* More opaque */
    border: 1px solid rgba(255,255,255,0.18); /* Stronger border */
    color: #fff;
    padding: .5rem .6rem; /* More padding */
    border-radius: 12px; /* More rounded */
    cursor: pointer;
    backdrop-filter: blur(8px); /* More blur */
    transition: all .25s ease; /* Smoother transition */
    font-size: 1.1rem; /* Larger icons */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Subtle shadow */
}
.img-action:hover {
    background: linear-gradient(135deg, rgba(106,140,255,.35), rgba(155,92,255,.35)); /* Use new accents */
    border-color: rgba(106,140,255,.6); /* Stronger border on hover */
    transform: translateY(-2px); /* Subtle lift on hover */
}

/* Skeleton shimmer */
.skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04)); /* Deeper skeleton background */
}
.skeleton .skeleton-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(255,255,255,0.05) 20%, rgba(255,255,255,0.1) 40%, rgba(255,255,255,0.05) 60%); /* Stronger shimmer */
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite; /* Slower shimmer */
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    bottom: 1.5rem; /* More spacing */
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: .85rem; /* More gap */
    background: rgba(10,12,26,.9); /* More opaque */
    padding: .75rem 1.2rem; /* More padding */
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15); /* Stronger border */
    backdrop-filter: blur(12px); /* More blur */
    z-index: 1000;
    font-size: 1rem; /* Slightly larger font */
    box-shadow: var(--glow);
    animation: fadeInScale .4s ease-out forwards; /* Add fade in animation */
}

.spinner {
    width: 20px; /* Larger spinner */
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3); /* Thicker border */
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite; /* More natural spin */
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(-50%);
    }
}

.loading-indicator span {
    font-size: 1.05rem; /* Slightly larger font */
    color: #ffffff;
    font-weight: 500;
}

.placeholder-text.error {
    color: #ff8b8b; /* Lighter error color */
    animation: shake 0.5s ease-in-out;
    cursor: pointer;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); } /* More shake */
    75% { transform: translateX(6px); }
}

.loading-indicator.error {
    background: rgba(255, 107, 107, 0.1); /* Lighter error background */
    border: 1px solid #ff6b6b;
}

.error-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* More gap */
    padding: 2.5rem 1.5rem; /* More padding */
    background: rgba(255, 107, 107, 0.08); /* Slightly stronger error background */
    border: 1px solid rgba(255, 107, 107, 0.3); /* Stronger border */
    border-radius: 18px; /* More rounded */
}

.error-text {
    color: #ffb0b0; /* Lighter error text */
    font-size: 1.15rem; /* Larger font */
    text-align: center;
    line-height: 1.5;
}

.retry-button {
    background: linear-gradient(135deg, #7A8CFF, #9b5cff); /* Use accent colors */
    color: white;
    border: none;
    padding: .85rem 1.5rem; /* More padding */
    border-radius: 999px;
    font-size: 1rem; /* Slightly larger font */
    cursor: pointer;
    transition: all .25s ease; /* Smoother transition */
    box-shadow: 0 8px 25px rgba(155, 92, 255, 0.3); /* Stronger shadow */
    font-weight: 600;
}

.retry-button:hover {
    transform: translateY(-2px); /* More lift */
    box-shadow: 0 10px 30px rgba(155, 92, 255, 0.4);
}

.retry-button:active {
    transform: translateY(0);
}

.retry-button.loading {
    opacity: 0.7; /* More visible loading state */
    cursor: not-allowed;
}

.retry-button span {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem; /* More gap */
}

/* Enhanced style selector button */
.style-selector-button {
    display: inline-flex;
    align-items: center;
    gap: .7rem; /* More gap */
    background: linear-gradient(135deg, rgba(106, 140, 255, 0.18), rgba(155, 92, 255, 0.18)); /* Stronger gradient */
    backdrop-filter: blur(14px); /* More blur */
    border: 1px solid rgba(106, 140, 255, 0.4); /* Stronger border */
    border-radius: 999px;
    padding: .8rem 1.2rem; /* More padding */
    color: #ffffff;
    font-size: .95rem; /* Slightly larger font */
    font-weight: 600; /* Bolder font */
    cursor: pointer;
    transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(106, 140, 255, 0.2); /* Stronger shadow */
    position: relative;
    overflow: hidden;
}
.style-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(106, 140, 255, 0.25);
    border-color: rgba(106, 140, 255, 0.6);
}
.style-selector-button.active {
    background: linear-gradient(135deg, rgba(106, 140, 255, 0.25), rgba(155, 92, 255, 0.25)); /* Use new accents, stronger */
    border-color: rgba(106, 140, 255, 0.7); /* Stronger border */
    box-shadow: 0 8px 35px rgba(106, 140, 255, 0.35); /* Stronger shadow */
    transform: translateY(-1px);
}
.style-selector-button .arrow {
    transition: transform 0.3s ease;
}
.style-selector-button.active .arrow {
    transform: rotate(180deg);
}

/* Enhanced dropdown overlay */
.style-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85); /* Darker overlay */
    backdrop-filter: blur(25px); /* More blur */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Slower, smoother transition */
    cursor: pointer; /* Make it clear the background is clickable */
}

.style-dropdown.open {
    opacity: 1;
    visibility: visible;
}

/* Modal container */
.style-modal {
    background: linear-gradient(135deg, rgba(18, 18, 30, 0.98), rgba(28, 28, 45, 0.98)); /* Deeper, more opaque background */
    backdrop-filter: blur(30px); /* More blur */
    border: 1px solid rgba(106, 140, 255, 0.45); /* Stronger border */
    border-radius: 28px; /* More rounded */
    padding: 2.5rem; /* More padding */
    max-width: 650px; /* Wider modal */
    width: 90%;
    max-height: 85vh; /* Slightly taller */
    overflow-y: auto;
    transform: scale(0.85) translateY(30px); /* More pronounced initial transform */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Slower, smoother transition */
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6), /* Stronger shadow */
        0 0 120px rgba(106, 140, 255, 0.25); /* Stronger glow */
    margin: auto;
    cursor: default;
}

.style-dropdown.open .style-modal {
    transform: scale(1) translateY(0);
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem; /* More margin */
    padding-bottom: 1.2rem; /* More padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Stronger border */
}

.modal-title {
    font-size: 1.6rem; /* Larger title */
    font-weight: 700; /* Bolder title */
    color: #ffffff;
}

.close-button {
    background: none;
    border: none;
    color: #b0b8e0; /* Slightly brighter close button */
    font-size: 1.8rem; /* Larger icon */
    cursor: pointer;
    padding: 0.6rem; /* More padding */
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15); /* Stronger background on hover */
    transform: rotate(90deg); /* Subtle rotation */
}

/* Grid layout for styles */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Slightly larger min column size */
    gap: 1.2rem; /* More gap */
}

/* Enhanced style option cards */
.style-option {
    display: flex;
    align-items: center;
    gap: 1.2rem; /* More gap */
    padding: 1.4rem; /* More padding */
    background: rgba(255, 255, 255, 0.06); /* Slightly stronger background */
    border: 1px solid rgba(255, 255, 255, 0.12); /* Stronger border */
    border-radius: 18px; /* More rounded */
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Subtle shadow */
}

.style-option:last-child {
    margin-bottom: 0;
}

.style-option:hover {
    background: rgba(106, 140, 255, 0.18); /* Stronger hover background */
    border-color: rgba(106, 140, 255, 0.5); /* Stronger border on hover */
    transform: translateY(-3px); /* More lift */
    box-shadow: 0 10px 30px rgba(106, 140, 255, 0.28); /* Stronger shadow */
}

.style-option.active {
    background: linear-gradient(135deg, rgba(106, 140, 255, 0.25), rgba(155, 92, 255, 0.25)); /* Use new accents, stronger */
    border-color: rgba(106, 140, 255, 0.7); /* Stronger border */
    box-shadow: 0 10px 35px rgba(106, 140, 255, 0.35); /* Stronger shadow */
}

.style-option.active::before {
    content: "✓";
    position: absolute;
    top: 0.6rem; /* Adjusted position */
    right: 0.6rem; /* Adjusted position */
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    width: 24px; /* Larger checkmark */
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem; /* Larger font */
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* Subtle shadow on checkmark */
}

/* Style icons */
.style-icon {
    font-size: 2.2rem; /* Larger icons */
    filter: drop-shadow(0 0 10px rgba(106, 140, 255, 0.4)); /* Stronger glow */
    transition: transform 0.3s ease;
}

.style-option:hover .style-icon {
    transform: scale(1.15); /* More prominent scale */
}

/* Style info */
.style-info {
    flex: 1;
}

.style-name {
    font-weight: 700; /* Bolder name */
    font-size: 1.15rem; /* Slightly larger font */
    margin-bottom: 0.3rem; /* More margin */
    color: #ffffff;
}

.style-desc {
    font-size: 0.95rem; /* Slightly larger font */
    color: #b0b8e0; /* Slightly brighter description */
    line-height: 1.5;
}

/* Scrollbar styling */
.style-modal::-webkit-scrollbar {
    width: 10px; /* Wider scrollbar */
}

.style-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08); /* Stronger track background */
    border-radius: 5px; /* More rounded */
}

.style-modal::-webkit-scrollbar-thumb {
    background: rgba(106, 140, 255, 0.6); /* Use new accent, stronger */
    border-radius: 5px; /* More rounded */
}

.style-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 140, 255, 0.8); /* Stronger hover background */
}

/* Footer */
.footer {
    position: sticky;
    bottom: 0;
    margin-top: 2.5rem; /* More margin */
    background: linear-gradient(0deg, rgba(10,12,26,.85), rgba(10,12,26,0)); /* More opaque start */
    backdrop-filter: blur(8px); /* More blur */
    border-top: 1px solid var(--stroke); /* Use stroke variable */
    box-shadow: 0 -2px 15px rgba(0,0,0,0.2); /* Subtle shadow for depth */
}

.footer-inner {
    max-width: 1300px; /* Wider footer */
    margin: 0 auto;
    padding: .9rem 1.5rem; /* More padding */
    display: flex;
    align-items: center;
    gap: .7rem; /* More gap */
    color: var(--muted);
    font-size: .95rem; /* Slightly larger font */
    justify-content: center;
}

.footer a {
    color: #e8ecff; /* Brighter link color */
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    text-decoration: underline;
    color: var(--accent-1); /* Accent color on hover */
}

.sep {
    opacity: .6; /* Slightly more visible separator */
}

/* Tipping Overlay */
.tipping-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9); /* Darker, more opaque */
    backdrop-filter: blur(20px); /* Significant blur */
    z-index: 1500; /* Above style dropdown */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tipping-overlay.open {
    opacity: 1;
    visibility: visible;
}

.tipping-modal {
    background: linear-gradient(135deg, rgba(18, 18, 30, 0.98), rgba(28, 28, 45, 0.98));
    backdrop-filter: blur(25px);
    border: 1px solid rgba(106, 140, 255, 0.55); /* Stronger border */
    border-radius: 28px;
    padding: 3rem 2.5rem; /* More padding */
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.85) translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.7), 
        0 0 120px rgba(106, 140, 255, 0.35); /* Stronger shadows */
    color: var(--text);
}

.tipping-overlay.open .tipping-modal {
    transform: scale(1) translateY(0);
}

.tipping-title {
    font-size: 1.8rem; /* Larger title */
    font-weight: 700;
    margin-bottom: 1.5rem; /* More space */
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(106,140,255,.55));
}

.tipping-message {
    font-size: 1.1rem; /* Larger message */
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 2rem; /* More space */
}

.tipping-message strong {
    color: var(--accent-1);
}

.tip-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    border: none;
    padding: 1rem 2rem; /* More padding */
    border-radius: 999px;
    font-size: 1.1rem; /* Larger font */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(155, 92, 255, 0.4);
    margin-bottom: 1rem; /* Space before close button */
}

.tip-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(155, 92, 255, 0.5);
}

.tip-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}

.tip-button .icon {
    font-size: 1.4em; /* Larger icon */
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.close-tipping-button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--muted);
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-tipping-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Add an indicator for free generations */
.options-row .free-gens-indicator {
    color: var(--muted);
    font-size: .85rem;
    opacity: .9;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 999px;
    padding: .5rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
}

.free-gens-indicator strong {
    color: var(--accent-1);
    font-weight: 700;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 1.8rem; /* Adjusted gap */
    }
    
    .input-area {
        margin-top: 1rem;
    }
    
    .topbar .toolbar {
        position: static;
        padding: 0 1rem .8rem; /* Adjusted padding */
    }
    
    .style-dropdown {
        padding: 0 1rem; /* Add horizontal padding to prevent modal touching edges */
    }
    
    .style-selector-button {
        padding: .7rem 1rem; /* Adjusted padding */
        font-size: .9rem; /* Adjusted font size */
    }
    
    .style-option {
        padding: 1.2rem; /* Adjusted padding */
    }
    
    .style-modal {
        width: 95%;
        padding: 2rem; /* Adjusted padding */
        border-radius: 22px; /* Adjusted border radius */
    }
    
    .styles-grid {
        grid-template-columns: 1fr;
    }
    .modal-title {
        font-size: 1.4rem;
    }
    .close-button {
        font-size: 1.6rem;
    }

    .tipping-modal {
        padding: 2.5rem 1.5rem;
    }
    .tipping-title {
        font-size: 1.5rem;
    }
    .tipping-message {
        font-size: 1rem;
    }
    .tip-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    .close-tipping-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); /* Adjusted min width */
        gap: 1.8rem;
    }
    .container {
        padding: 2rem 1.2rem 6rem;
    }
}

@media (min-width: 1025px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); /* Larger min width */
        gap: 3rem; /* More gap */
    }
}