/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    --accent-primary: #8b5cf6;
    --accent-secondary: #ec4899;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(139, 92, 246, 0.3);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== App Container ===== */
.app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--accent-gradient);
}

/* ===== Hero Section ===== */
.hero-section {
    text-align: center;
    padding: 40px 0 80px;
}

.hero-content {
    margin-bottom: 40px;
}

.date-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ===== Picture of the Day ===== */
.potd-container {
    max-width: 800px;
    margin: 0 auto;
}

.potd-frame {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glow);
    aspect-ratio: 1;
}

.potd-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.potd-image.loaded {
    opacity: 1;
}

.potd-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    transition: opacity var(--transition-normal);
}

.potd-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.potd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.potd-info {
    margin-top: 24px;
}

.potd-prompt {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    margin-bottom: 20px;
}

.potd-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon {
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-glow);
}

.btn-accent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Sections ===== */
section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    aspect-ratio: 1;
    cursor: pointer;
    transition: var(--transition-normal);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: var(--transition-fast);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===== Upload Section ===== */
.upload-container {
    max-width: 700px;
    margin: 0 auto;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    background: var(--bg-card);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

.dropzone-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.dropzone-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.dropzone-content p {
    color: var(--text-secondary);
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.training-status {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.training {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-info {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.status-info p {
    margin-bottom: 8px;
}

/* ===== Settings ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.setting-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.setting-card h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.setting-control {
    margin-bottom: 16px;
}

.setting-control:last-child {
    margin-bottom: 0;
}

.setting-control label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.setting-control input[type="text"],
.setting-control input[type="time"],
.setting-control textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-fast);
}

.setting-control input:focus,
.setting-control textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.setting-control input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
}

.setting-control input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--accent-primary);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .potd-actions {
        flex-direction: column;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Generation Filters ===== */
.generation-filters {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
}

.generation-filters h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group select {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-group select:hover {
    border-color: var(--border-glow);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ===== Training Buttons ===== */
.training-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* ===== Recent Thumbnails ===== */
.recent-thumbnails {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.recent-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    opacity: 0.7;
    cursor: pointer;
    transition: var(--transition-fast);
}

.recent-thumbnails img:hover {
    opacity: 1;
    border-color: var(--accent-primary);
    transform: scale(1.1);
}



/* ===== Admin Button ===== */
.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn.admin-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-glow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ===== Upload Guidelines ===== */
.upload-guidelines {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.upload-guidelines h4 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.upload-guidelines p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.upload-guidelines ul {
    list-style: none;
    margin-bottom: 12px;
}

.upload-guidelines li {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 4px 0;
}

.warning-text {
    color: #f59e0b !important;
}

.info-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== Upload Results ===== */
.upload-results {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.upload-results h4 {
    margin-bottom: 16px;
}

.upload-success {
    margin-bottom: 16px;
}

.upload-success h5 {
    color: #10b981;
    margin-bottom: 8px;
}

.upload-rejected h5 {
    color: #ef4444;
    margin-bottom: 8px;
}

.upload-results ul {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-results li {
    padding: 4px 0;
}

/* ===== Database Section ===== */
.database-section {
    padding: 60px 0;
}

.database-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.database-search {
    max-width: 700px;
    margin: 0 auto 32px;
}

.search-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    padding-left: 20px;
}

.search-icon {
    font-size: 20px;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    padding: 8px;
}

.search-input-wrapper input:focus {
    outline: none;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.tag-chip {
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tag-chip:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.admin-tagging-controls {
    text-align: center;
    margin-bottom: 32px;
}

.database-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.db-image-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
}

.db-image-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.db-image-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
}

.db-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.db-image-card:hover .db-image-wrapper img {
    transform: scale(1.05);
}

.db-image-info {
    padding: 12px;
}

.db-caption {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
    height: 34px;
    overflow: hidden;
}

.db-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-small {
    padding: 3px 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    font-size: 10px;
    color: var(--text-muted);
}

.load-more {
    text-align: center;
}

/* ===== Responsive Database ===== */
@media (max-width: 768px) {
    .database-stats {
        flex-direction: column;
        gap: 20px;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .database-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ===== Navbar Actions & User Dropdown ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-section {
    display: flex;
    gap: 8px;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 220px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-fast);
    z-index: 1000;
}

.user-dropdown:hover .dropdown-menu,
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header .status-badge {
    font-size: 10px;
    padding: 2px 8px;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.admin-btn {
    opacity: 0.6;
}

.admin-btn:hover {
    opacity: 1;
}

/* ===== Welcome Modal ===== */
.welcome-modal .modal-content {
    max-width: 800px;
}

.modal-large {
    max-width: 700px !important;
}

.welcome-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.welcome-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.welcome-subtitle {
    opacity: 0.9;
    font-size: 1.1rem;
}

.welcome-body {
    padding: 30px;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    text-align: center;
    padding: 20px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.welcome-tiers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tier-card {
    padding: 25px;
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    position: relative;
}

.tier-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tier-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.tier-card li {
    padding: 6px 0;
    font-size: 0.9rem;
}

.free-tier {
    opacity: 0.8;
}

.premium-tier {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

.tier-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent-gradient);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tier-price {
    margin-bottom: 15px;
}

.price-intro {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.price-intro small {
    font-size: 0.9rem;
    font-weight: 400;
}

.price-after {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.welcome-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== Auth Modals ===== */
.btn-full {
    width: 100%;
}

.modal-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-switch a {
    color: var(--accent-primary);
    text-decoration: none;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* ===== Subscribe Modal ===== */
.subscribe-pricing {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
}

.current-price {
    font-size: 3rem;
    font-weight: 700;
}

.price-period {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
}

.price-after-note {
    display: block;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 5px;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.payment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.payment-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-instructions {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.payment-instructions h4 {
    margin-bottom: 12px;
}

.payment-instructions code {
    display: block;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    word-break: break-all;
    font-family: monospace;
    margin: 10px 0;
}

/* ===== Responsive Welcome ===== */
@media (max-width: 768px) {
    .welcome-features {
        grid-template-columns: 1fr;
    }

    .welcome-tiers {
        grid-template-columns: 1fr;
    }

    .payment-options {
        grid-template-columns: 1fr;
    }
}

/* ===== Google Sign-In Button ===== */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    color: #333333;
    border: 1px solid #dadce0;
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-icon {
    flex-shrink: 0;
}

/* ===== Social Divider ===== */
.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.social-divider span {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* ===== Guest Note ===== */
.guest-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* ===== Blurred Gallery Images (for non-premium) ===== */
.gallery-item.blurred {
    position: relative;
    overflow: hidden;
}

.gallery-item.blurred img {
    filter: blur(15px);
    transform: scale(1.1);
}

.gallery-item.blurred::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.gallery-item.blurred .blur-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: white;
    pointer-events: none;
}

.blur-overlay .lock-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.blur-overlay .unlock-text {
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--accent-gradient);
    padding: 4px 10px;
    border-radius: 20px;
}

/* ===== Generation Locked (for guests) ===== */
.generation-locked {
    position: relative;
}

.generation-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-lg);
    z-index: 5;
}

.locked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    padding: 30px;
    max-width: 300px;
}

.locked-overlay .lock-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.locked-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.locked-overlay p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* ===== Subscribe Banner (in gallery) ===== */
.subscribe-banner {
    grid-column: 1 / -1;
    background: var(--accent-gradient);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 20px 0;
}

.subscribe-banner h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.subscribe-banner p {
    opacity: 0.9;
    margin-bottom: 15px;
}

.subscribe-banner .btn {
    background: white;
    color: var(--accent-primary);
}

/* ===== Premium Badge ===== */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent-gradient);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
}

/* ===== Modal System ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glow);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Welcome Modal */
.welcome-modal-content {
    text-align: center;
    max-width: 900px;
}

.welcome-modal-content h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.welcome-modal-content>p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.tier-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: left;
}

.tier-card h3 {
    margin-bottom: 1rem;
}

.tier-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.tier-card li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
}

.tier-card .price {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tier-card .price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.tier-card.premium-tier {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    border-color: var(--accent-primary);
}

.tier-card .btn {
    width: 100%;
}

/* Auth Modals */
.auth-modal {
    width: 400px;
    max-width: 90vw;
}

.auth-modal h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.auth-form .btn {
    margin-top: 0.5rem;
}

.modal-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.modal-switch a {
    color: var(--accent-primary);
    text-decoration: none;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* Google Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-google:hover {
    background: #f5f5f5;
}

.social-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.social-divider span {
    padding: 0 1rem;
    font-size: 0.85rem;
}

/* Subscribe Modal */
.subscribe-modal {
    width: 450px;
    max-width: 90vw;
    text-align: center;
}

.subscribe-modal h2 {
    margin-bottom: 1.5rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.pricing-header {
    margin-bottom: 0.5rem;
}

.price-main {
    font-size: 3rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    color: var(--text-secondary);
}

.price-after {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.premium-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.premium-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

.payment-options {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.payment-options p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.payment-icons span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}