/* Tab Navigation */
.tab-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: flex-end;
    gap: 40px;
}

.nav-right {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.tab-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 4px;
    cursor: pointer;
    transition: color 0.4s ease-out, border-color 0.4s ease-out, opacity 0.3s ease-out;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.tab-button.active {
    color: white;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.current-inspiration-indicator {
    flex: 1;
    padding: 4px 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-style: italic;
    text-align: center;
    min-width: 200px;
}

/* Progress Bar for Quote Generation */
.progress-bar-container {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
    100% { transform: translateX(-20px); }
}

.progress-text {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    white-space: nowrap;
}

/* Tab Content */
.tab-content {
    display: none !important;
    padding-top: 80px; /* Account for fixed tab navigation */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.tab-content.active {
    display: block !important;
    animation: fadeIn 0.4s ease-in-out forwards;
}

/* Special case for viewer tab which needs flex layout */
#viewer-content.active {
    display: flex !important;
    animation: fadeIn 0.4s ease-in-out forwards;
}

/* Fade-in animation for content */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure content is visible after animation */
.tab-content.active {
    opacity: 1;
}

/* Authentication Section */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    margin-bottom: 8px;
}

.sahlware-identity-section {
    display: flex;
    align-items: center;
    padding: 4px 0;
    margin-bottom: 8px;
}

/* New Guest/User Authentication UI */
.guest-user-section {
    position: relative;
    display: flex;
    align-items: center;
    padding: 4px 0;
    margin-bottom: 8px;
}

.guest-mode, .user-mode {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guest-btn, .sign-in-btn-new {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    min-width: 60px;
    text-align: center;
}

.guest-btn:hover, .sign-in-btn-new:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.user-name-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    text-align: left;
}

.user-name-btn:hover {
    color: white;
    border-bottom-color: #667eea;
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.user-name-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Menu and Guest Menu */
.user-menu, .guest-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    pointer-events: none;
}

.user-menu:not(.hidden), .guest-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-items {
    padding: 8px 0;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease-out, color 0.3s ease-out;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sign-out-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
    color: rgba(255, 100, 100, 0.8);
}

.sign-out-item:hover {
    background: rgba(255, 100, 100, 0.1);
    color: rgba(255, 100, 100, 1);
}

.login-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sign-in-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 4px;
    cursor: pointer;
    transition: color 0.4s ease-out, border-color 0.4s ease-out;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    border-bottom: 2px solid transparent;
    font-family: inherit;
}

.sign-in-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Auth Modal */
.auth-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}

.auth-modal.hidden {
    display: none !important;
}

.auth-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 0 auto !important;
    overflow-y: auto;
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    min-height: 30px;
}

.auth-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
}

.close-modal-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.close-modal-btn:hover {
    color: white;
}

.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Fix Google iframe positioning issues */
#google-signin iframe {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

.auth-provider-google {
    /* Google button will be rendered here */
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #2a2a2a;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease-out, border-color 0.3s ease-out;
    font-size: 0.95rem;
    position: relative;
}

.auth-provider-btn:hover:not(:disabled) {
    background: #3a3a3a;
    border-color: #555;
}

.auth-provider-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.provider-icon {
    font-size: 1.2rem;
}

.coming-soon {
    margin-left: auto;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.hidden {
    display: none !important;
}

/* General Body and Typography */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    color: #ffffff;
    overflow-x: hidden; /* Prevents horizontal scrollbar from side ads */
}

#background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../Images/Background1.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: brightness(0.6);
    z-index: -1;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

#background-image-next {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    filter: brightness(0.6);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Remove the second background layer - not needed for simple fade */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}

/* Edit Prompt Modal Styles */
.edit-prompt-modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow: visible;
}

.edit-prompt-textarea {
    width: 100%;
    min-height: 100px;
    max-height: 150px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.edit-prompt-textarea:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.edit-prompt-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Prompt display styling */
.prompt-display {
    width: 100%;
    min-height: 60px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

/* Quotes count input styling */
.quotes-count-input {
    width: 100px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-family: inherit;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.quotes-count-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.quotes-count-input::-webkit-outer-spin-button,
.quotes-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quotes-count-input[type=number] {
    -moz-appearance: textfield;
}

/* Info box styling (less scary than warning) */
.info-box {
    background: rgba(70, 130, 180, 0.15);
    border: 1px solid rgba(70, 130, 180, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.info-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.info-icon {
    font-size: 16px;
    margin-right: 10px;
    filter: hue-rotate(180deg);
}

.info-box strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.info-box p {
    margin: 0;
    line-height: 1.5;
}

/* Modal buttons - elegant tab-style design */
.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.primary-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    color: white;
    border: none;
    border-bottom: 2px solid #667eea;
    border-radius: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.4s ease-out, border-color 0.4s ease-out, opacity 0.3s ease-out;
    position: relative;
}

.primary-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(102, 126, 234, 0.8);
}

.secondary-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.4s ease-out, border-color 0.4s ease-out, opacity 0.3s ease-out;
    position: relative;
}

.secondary-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

#edit-prompt-modal textarea {
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

#edit-prompt-modal textarea:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

#edit-prompt-modal .modal-body {
    padding: 0;
}

#edit-prompt-modal .modal-body label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

/* Warning box styling */
#edit-prompt-modal .warning-box {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

#edit-prompt-modal .warning-box .warning-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

#edit-prompt-modal .warning-box .warning-icon {
    font-size: 16px;
    margin-right: 8px;
}

#edit-prompt-modal .warning-box strong {
    color: rgba(255, 255, 255, 0.9);
}

#edit-prompt-modal .warning-box p {
    margin: 0;
    line-height: 1.4;
}

/* Open Inspirations Modal Styles */
.open-inspirations-modal-content {
    max-width: 900px;
    width: 90vw;
    max-height: 80vh;
}

.inspirations-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.inspirations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.inspirations-table thead {
    background: rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1;
}

.inspirations-table th,
.inspirations-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.inspirations-table th {
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.inspirations-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.08);
}

.inspirations-table .sort-icon {
    margin-left: 6px;
    font-size: 12px;
    opacity: 0.6;
}

.inspirations-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.inspirations-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.inspirations-table tbody tr.selected {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
}

.inspirations-table .title-cell {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inspirations-table .prompt-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.8;
}

.inspirations-table .date-cell {
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.inspirations-table .quotes-cell {
    text-align: center;
    font-weight: 500;
}

.inspirations-table .actions-column {
    width: 80px;
    text-align: center;
}

.inspirations-table .actions-cell {
    text-align: center;
    padding: 8px;
}

.inspirations-table .action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s ease;
}

.inspirations-table .action-btn:hover {
    color: rgba(255, 69, 69, 0.9);
}

.no-inspirations-message,
.loading-inspirations {
    padding: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.no-inspirations-message p,
.loading-inspirations p {
    margin: 0;
    font-size: 16px;
}

/* Delete Confirmation Modal Styles */
.delete-confirmation-modal-content {
    max-width: 500px;
}

.delete-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.warning-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warning-box .warning-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.6);
}

.warning-box div {
    flex: 1;
}

.warning-box strong {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.warning-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.4;
}

.danger-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.4s ease-out, border-color 0.4s ease-out, opacity 0.3s ease-out;
    position: relative;
}

.danger-btn:hover:not(:disabled) {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.danger-btn:disabled,
.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Prompt and Interaction Section */
.prompt-section {
    margin-bottom: 3rem;
}

#prompt-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

#prompt-input {
    width: 100%;
    padding: 15px 18px;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    transition: border-color 0.4s ease-out, background-color 0.4s ease-out, height 0.2s ease-out;
    outline: none;
    resize: none;
    overflow: hidden;
    height: 50px; /* Start with exact single-line height */
    max-height: 120px; /* Limit expansion to prevent too much growth */
    line-height: 1.4;
    font-family: inherit;
    box-sizing: border-box;
}

#prompt-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

#prompt-input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.prompt-input-container {
    width: 60%;
    position: relative;
}

.prompt-counter {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    transition: color 0.3s ease;
    padding: 5px 0 0 2px;
    min-height: 20px; /* Prevent layout shift */
}

.prompt-counter.over-limit {
    color: #ff6b6b;
    font-weight: 600;
}

#generate-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generate-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

#generate-btn:disabled:hover {
    background-color: #6c757d;
}

/* Search Box Styling */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    max-width: 500px;
}

#search-input {
    flex: 1;
    padding: 15px 18px;
    font-size: 1rem;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    transition: border-color 0.4s ease-out, background-color 0.4s ease-out;
    outline: none;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

#search-input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

#search-btn {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease-out, transform 0.2s ease-out, box-shadow 0.3s ease-out;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    min-width: 100px;
}

#search-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#search-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#generate-btn:hover {
    background-color: #0056b3;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Main Content Progress Bar */
.progress-container {
    width: 100%;
    max-width: 400px;
    margin: 1.5rem auto 0;
    text-align: center;
}

/* Unified Progress Bar Component */
.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-bar.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 40%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.2) 60%, 
        transparent 100%);
    animation: progress-shimmer 2s infinite ease-in-out;
    border-radius: 3px;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
    position: relative;
    width: 0%;
}

.progress-fill.has-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: progress-shine 3s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-30px); }
    50% { transform: translateX(30px); }
    100% { transform: translateX(-30px); }
}

/* Progress statistics styling */
.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.progress-percentage {
    font-weight: 600;
    color: #667eea;
}

.progress-details {
    color: rgba(255, 255, 255, 0.8);
}

/* Modal-specific progress stats */
.progress-modal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.progress-modal-stats .progress-percentage {
    font-weight: 600;
    color: #667eea;
}

.progress-modal-stats .progress-details {
    color: rgba(255, 255, 255, 0.8);
}

.progress-percentage {
    font-weight: 600;
    color: #667eea;
}

.progress-details {
    color: rgba(255, 255, 255, 0.8);
}

/* Progress Modal for Viewer Tab */
.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;  /* Higher than FABs (10000) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.progress-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.progress-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.progress-modal-header {
    margin-bottom: 2rem;
}

.progress-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: progress-modal-sparkle 3s ease-in-out infinite;
}

@keyframes progress-modal-sparkle {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

.progress-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-modal-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.progress-modal-body {
    margin-bottom: 1.5rem;
}

.progress-bar-modal {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-fill-modal {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
    position: relative;
    width: 0%;
}

.progress-fill-modal::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: progress-shine 3s infinite;
}

.progress-modal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.progress-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.progress-modal-note {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

.hidden {
    display: none;
}

/* Full-page Generation View */
.generation-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2rem;
}

.generation-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.generation-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: generation-pulse 2s ease-in-out infinite;
}

@keyframes generation-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 1; }
}

.generation-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.generation-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.generation-progress {
    margin-bottom: 2rem;
}

.progress-bar-large {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
    width: 0%;
}

.progress-fill-large::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: progress-shine-large 3s infinite;
}

@keyframes progress-shine-large {
    0% { transform: translateX(-40px); }
    50% { transform: translateX(40px); }
    100% { transform: translateX(-40px); }
}

.generation-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.generation-percentage {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

.generation-details {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.generation-note {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Community Section */
.community-section {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 12px;
}

.community-galleries {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin-top: 1.5rem;
}

.community-galleries h3 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Viewer Page Specific Styles */
.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

#quote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.quote-card {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.quote-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.quote-card-content {
    padding: 1rem;
}

.quote-card-content p {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.quote-card-content .author {
    font-style: italic;
    text-align: right;
    opacity: 0.8;
}

#inspiration-actions {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
}

#inspiration-actions button {
    margin: 0 10px;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

#publish-btn {
    background-color: #28a745;
    color: white;
}

#regenerate-btn {
    background-color: #dc3545;
    color: white;
}

/* Simple Floating Action Menu - positioned within container */
#inspiration-fab {
    position: relative; /* Changed from fixed to relative for container alignment */
    /* Removed top/right positioning - handled by container */
    z-index: 10000; /* High z-index to appear above everything */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#inspiration-fab:not(.hidden) {
    display: block;
}

#inspiration-fab-button {
    width: 50px; /* Match view chooser button size */
    height: 50px; /* Match view chooser button size */
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8); /* Match view chooser background */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Match border style */
    color: white;
    font-size: 20px; /* Match view chooser font size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px); /* Add backdrop filter to match */
    transition: background-color 0.2s ease, transform 0.1s ease; /* Match transition timing */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#inspiration-fab-button:hover {
    background: rgba(255, 255, 255, 0.1); /* Match view chooser hover */
    transform: scale(1.05);
}

#inspiration-actions-menu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 250px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    opacity: 0;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

#inspiration-actions-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.inspiration-menu-content {
    padding: 8px;
}

.inspiration-menu-content button {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    padding: 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease-out, border-color 0.3s ease-out;
    text-align: left;
}

.draft-menu-content button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.draft-menu-content button:last-child {
    margin-bottom: 0;
}

.btn-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* Quote Viewer Styles - matching DailyQuotes pattern */
#viewer-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    z-index: 2;
}

#quote-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

#quote-text {
    font-size: 2.5rem;
    font-weight: 300;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    transition: opacity 0.4s ease-in-out;
}

/* Fade-in utility class for dynamic content */
.fade-in-content {
    animation: gentleFadeIn 0.5s ease-out forwards;
}

@keyframes gentleFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#quote-author {
    font-size: 1.5rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

#navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#navigation-buttons button {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease-out, border-color 0.3s ease-out, transform 0.2s ease-out;
    backdrop-filter: blur(10px);
}

#navigation-buttons button:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.05);
}

#quote-counter {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}


/* Ad Container Styles */
.side-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px; /* Standard width for side banners */
    height: 600px; /* Standard height for side banners */
    z-index: 10;
    background-color: rgba(0,0,0,0.1); /* Placeholder background */
}

#left-side-ad {
    left: 10px;
}

#right-side-ad {
    right: 10px;
}

#bottom-ad {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.desktop-ad {
    display: block;
}

.mobile-ad {
    display: none;
}

/* Responsive Design */
@media (max-width: 1250px) {
    .side-ad {
        display: none; /* Hide side ads when there's not enough horizontal space */
    }
}

@media (max-width: 768px) {
    /* Fix background image jumping on mobile with hardware acceleration */
    #background-image {
        transform: translate3d(0, 0, 0);
        will-change: transform;
        -webkit-transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    #prompt-form {
        flex-direction: column;
    }
    
    .desktop-ad {
        display: none; /* Hide desktop bottom ads on mobile */
    }
    
    .mobile-ad {
        display: block; /* Show mobile-specific ads */
    }
    
    #prompt-input {
        width: 100%;
    }
    
    .prompt-input-container {
        width: 100%;
    }
    
    .community-galleries {
        flex-direction: column;
    }
}

/* Viewer Tab Styles */
#viewer-content {
    min-height: 100vh;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center to flex-start */
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 160px; /* Increased padding to account for fixed title */
}

#viewer-content.active {
    display: flex;
}

#viewer-title {
    position: fixed; /* Make title sticky */
    top: 80px; /* Position below tab navigation */
    left: 50%; /* Position at center */
    transform: translateX(-50%); /* Center the element */
    z-index: 900; /* Below tab navigation but above content */
    font-size: 2.5rem;
    font-weight: 700;
    padding: 1.5rem 2rem; /* Add padding for better spacing */
    margin: 0; /* Remove margin */
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3); /* Subtle background for readability */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center; /* Center the title text */
    white-space: nowrap; /* Prevent text wrapping */
    border-radius: 0 0 10px 10px; /* Rounded bottom corners */
    min-width: 200px; /* Minimum width */
}

#quote-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
}

#quote-text {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#quote-author {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

#prev-quote, #next-quote {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#prev-quote:hover, #next-quote:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#quote-counter {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    min-width: 80px;
}

/* Viewer Loading Styles */
#viewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

#viewer-loading-text {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Viewer Empty State */
.viewer-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 240px); /* Account for fixed title and tab nav */
    text-align: center;
    margin-top: 0; /* Reset margin since we have fixed title */
}

.empty-state-content {
    max-width: 500px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.empty-state-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.empty-state-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.empty-state-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.empty-state-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.empty-state-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.empty-state-button.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Mobile Responsiveness for Viewer */
@media (max-width: 768px) {
    #viewer-title {
        font-size: 2rem;
        padding: 1rem 1rem; /* Reduced padding for mobile */
    }
    
    #viewer-content {
        padding-top: 140px; /* Reduced padding for mobile */
    }
    
    #quote-container {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    #quote-text {
        font-size: 1.4rem;
    }
    
    #quote-author {
        font-size: 1rem;
    }
    
    #navigation-buttons {
        gap: 1rem;
    }
    
    #prev-quote, #next-quote {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .viewer-empty-state {
        min-height: calc(100vh - 220px); /* Adjusted for mobile */
    }
    
    .tab-navigation {
        padding: 12px 16px 0;
        gap: 16px;
    }
    
    .nav-left {
        gap: 24px;
    }
    
    .nav-right {
        gap: 12px;
    }
    
    .guest-user-section {
        font-size: 12px;
    }
    
    .guest-btn, .sign-in-btn-new, .user-name-btn {
        padding: 8px 2px;
        font-size: 12px;
    }
    
    .user-menu {
        min-width: 180px;
        right: -10px;
    }
    
    .menu-item {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .tab-button {
        padding: 10px 2px;
        font-size: 14px;
    }
    
    .current-inspiration-indicator {
        display: none; /* Hide on mobile to save space */
    }
    
    .empty-state-content {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .empty-state-content h2 {
        font-size: 1.5rem;
    }
    
    .empty-state-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Gallery Item Styles */
.gallery-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.gallery-thumbnail {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.gallery-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Update community galleries to use grid layout */
.community-galleries {
    display: flex;
    gap: 2rem;
}

#popular-creations, #recent-creations {
    flex: 1;
}

#popular-creations > div:not(h3), #recent-creations > div:not(h3) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .community-galleries {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    #popular-creations > div:not(h3), #recent-creations > div:not(h3) {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .gallery-thumbnail {
        height: 100px;
    }
    
    .gallery-title {
        font-size: 12px;
    }
}

/* Override Sahlware identity styles to match DailyQuotes theme */
#sahlware-user-display .sahlware-user-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 12px 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

#sahlware-user-display .sahlware-user-name:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

#sahlware-user-display .sahlware-sign-in-btn {
    display: none !important; /* Hide duplicate sign-in button - keep only the nav one */
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 4px;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#sahlware-user-display .sahlware-sign-in-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

#sahlware-user-display .sahlware-user-menu-toggle {
    color: rgba(255, 255, 255, 0.5);
    background: none;
    padding: 8px 4px;
    margin-bottom: 8px;
}

#sahlware-user-display .sahlware-user-menu-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

#sahlware-user-display .sahlware-user-avatar {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
}

/* Ensure consent banner appears above everything */
#sahlware-consent-banner {
    z-index: 10001 !important;
}

#sahlware-consent-modal {
    z-index: 10002 !important;
}

/* Hide the duplicate user info element */
#user-info,
#user-info #user-name {
    display: none !important;
}

/* Mobile adjustments for identity section */
@media (max-width: 768px) {
    .sahlware-identity-section {
        margin-left: auto;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .current-inspiration-indicator {
        order: 3;
        flex-basis: 100%;
        text-align: left;
        margin-top: 8px;
    }
    
    #sahlware-user-display .sahlware-user-name {
        font-size: 13px;
        padding: 10px 4px;
    }
    
    #sahlware-user-display .sahlware-sign-in-btn {
        font-size: 13px;
        padding: 10px 4px;
    }
    
    /* Mobile search box styling */
    .search-box {
        flex-direction: column;
        gap: 15px;
        max-width: 100%;
        margin: 15px 0;
    }
    
    #search-input {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #search-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Mobile viewer mode controls */
    #viewer-mode-controls {
        margin-top: 15px;
        gap: 10px;
    }
    
    #viewer-mode-controls button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Mobile slideshow controls */
    .slideshow-controls {
        top: 70px; /* Align with mobile FABs */
        right: 120px; /* Position to the left of FABs on mobile */
        padding: 8px;
        gap: 8px;
    }
    
    .slideshow-controls button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .slideshow-settings-content {
        padding: 20px;
        min-width: 300px;
        margin: 20px;
    }
    
    /* Mobile top right controls */
    #viewer-top-right-controls {
        top: 70px;
        right: 10px;
        gap: 10px;
    }
    
    #view-chooser-button,
    #inspiration-fab-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    #view-chooser-menu {
        min-width: 180px;
        padding: 12px;
        right: -10px; /* Adjust for smaller screens */
    }
    
    .view-mode-option {
        padding: 10px;
        gap: 10px;
    }
    
    .view-mode-option .view-icon {
        font-size: 18px;
        width: 20px;
    }
    
    .view-mode-option .view-description {
        font-size: 11px;
    }
}

/* Slideshow Mode Styles */
.slideshow-fullscreen {
    overflow: hidden;
    background: black;
}

/* Slideshow fullscreen cursor management */
.slideshow-fullscreen {
    cursor: none; /* Hide cursor initially */
}

/* Show cursor when active */
.slideshow-fullscreen.show-cursor,
.slideshow-fullscreen.show-cursor * {
    cursor: default !important;
}

.slideshow-fullscreen .slideshow-controls {
    cursor: pointer !important; /* Always show cursor on controls */
}

.slideshow-fullscreen .slideshow-controls * {
    cursor: pointer !important;
}

/* Also show cursor on modal areas */
.slideshow-fullscreen .slideshow-settings-modal,
.slideshow-fullscreen .slideshow-settings-modal * {
    cursor: default !important;
}

/* Slideshow Controls */
.slideshow-controls {
    position: fixed;
    top: 80px; /* Align with FABs */
    right: 160px; /* Position to the left of FABs */
    z-index: 9999; /* Below FABs but above content */
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; /* Faster, smoother transitions */
    transform: translateY(0); /* Add transform for smoother fade */
}

.slideshow-controls.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px); /* Subtle upward movement on hide */
}

.slideshow-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.slideshow-controls button:active {
    transform: scale(0.95);
}

/* Slideshow Settings Modal */
.slideshow-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000; /* Higher than everything else including consent banners */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.slideshow-settings-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.slideshow-settings-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.slideshow-settings-modal .modal-content {
    position: relative;
    background: #ffffff;
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 30px;
    min-width: 400px;
    max-width: 90vw;
    color: #333;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slideshow-settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.slideshow-settings-modal .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 600;
}

.slideshow-settings-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-settings-modal .modal-close:hover {
    color: #667eea;
}

.slideshow-settings-modal .modal-body {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slideshow-settings-modal .modal-body label {
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.slideshow-settings-modal .modal-body input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    width: 80px;
}

.slideshow-settings-modal .modal-body button {
    padding: 8px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.slideshow-settings-modal .modal-body button:hover {
    background: #5a6fd8;
}

.slideshow-settings-content {
    position: relative;
    background: #ffffff;
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 30px;
    min-width: 400px;
    max-width: 90vw;
    color: #333;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slideshow-settings-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
    color: #667eea;
    font-weight: 600;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #222;
    font-size: 14px;
}

.setting-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    margin: 10px 0;
    border: 1px solid #ccc;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.setting-group span {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
}

.setting-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.setting-actions button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.setting-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.setting-actions button:last-child {
    background: #f5f5f5;
    border: 2px solid #ccc;
    color: #333;
}

.setting-actions button:last-child:hover {
    background: rgba(180, 180, 180, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Viewer Mode Controls */
#viewer-mode-controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

#viewer-mode-controls button {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

#viewer-mode-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
}

#viewer-mode-controls button:active {
    transform: translateY(0);
}

/* Top Right Controls Container */
#viewer-top-right-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    gap: 10px; /* Closer alignment between FABs */
    align-items: center; /* Proper vertical alignment */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure all FAB containers have consistent alignment */
#viewer-top-right-controls > * {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#viewer-top-right-controls.hidden {
    display: none !important;
}

/* Fade away in fullscreen mode */
.slideshow-fullscreen #viewer-top-right-controls {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

/* Hide navigation buttons in slideshow mode for clean canvas */
.slideshow-fullscreen #navigation-buttons {
    display: none !important;
}

/* Hide title bar in slideshow mode for clean canvas */
.slideshow-fullscreen #viewer-title {
    display: none !important;
}

/* Show cursor throughout fullscreen for better UX */
.slideshow-fullscreen {
    cursor: none !important;
}

/* Show cursor when moving or when show-cursor class is active */
.slideshow-fullscreen.show-cursor,
.slideshow-fullscreen.show-cursor * {
    cursor: default !important;
}

/* Show cursor when hovering over interactive elements */
.slideshow-fullscreen .slideshow-controls,
.slideshow-fullscreen .slideshow-controls *,
.slideshow-fullscreen .slideshow-settings-modal,
.slideshow-fullscreen .slideshow-settings-modal *,
.slideshow-fullscreen button,
.slideshow-fullscreen input {
    cursor: default !important;
}

/* Show cursor in a larger area around controls for easier targeting */
.slideshow-fullscreen .slideshow-controls {
    padding: 20px; /* Larger hit area */
}

/* View Chooser Styles */
#view-chooser {
    position: relative;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#view-chooser-button {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#view-chooser-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

#view-chooser-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    min-width: 200px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#view-chooser-menu.hidden {
    display: none;
}

#view-chooser-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.view-chooser-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.view-mode-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: rgba(255, 255, 255, 0.9);
}

.view-mode-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.view-mode-option.active {
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
}

.view-mode-option .view-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.view-mode-option .view-name {
    font-weight: 600;
    flex: 1;
}

.view-mode-option .view-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.view-mode-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* Updated Inspiration FAB Styles */
#inspiration-fab {
    position: relative; /* Changed from fixed since it's now inside the container */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#inspiration-fab-button {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#inspiration-fab-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}
