/* AI Image Foundry - Main CSS Framework */
/* Theme System with CSS Variables */

:root {
    /* Default Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-primary: #00ff88;
    --accent-secondary: #00cc6a;
    --accent-hover: #00ff99;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #00ff88, #00cc6a);
    --gradient-secondary: linear-gradient(135deg, #ff0080, #8000ff);
    --error-color: #ff4444;
    --warning-color: #ffaa00;
    --success-color: #00ff88;
    --info-color: #00aaff;
}

/* Dark Green Theme */
[data-theme="dark-green"] {
    --bg-primary: #0a1a0a;
    --bg-secondary: #1a2a1a;
    --bg-tertiary: #2a3a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0ffb0;
    --text-muted: #80cc80;
    --accent-primary: #00ff00;
    --accent-secondary: #00cc00;
    --accent-hover: #00ff33;
    --border-color: #2a4a2a;
    --shadow-color: rgba(0, 50, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #00ff00, #00cc00);
}

/* Dark Purple Theme */
[data-theme="dark-purple"] {
    --bg-primary: #1a0a2a;
    --bg-secondary: #2a1a3a;
    --bg-tertiary: #3a2a4a;
    --text-primary: #ffffff;
    --text-secondary: #e0b0ff;
    --text-muted: #c080ff;
    --accent-primary: #9933ff;
    --accent-secondary: #7700cc;
    --accent-hover: #aa44ff;
    --border-color: #4a2a6a;
    --shadow-color: rgba(50, 0, 80, 0.5);
    --gradient-primary: linear-gradient(135deg, #9933ff, #7700cc);
}

/* Dark Orange Theme */
[data-theme="dark-orange"] {
    --bg-primary: #2a1a0a;
    --bg-secondary: #3a2a1a;
    --bg-tertiary: #4a3a2a;
    --text-primary: #ffffff;
    --text-secondary: #ffd4a3;
    --text-muted: #ffb366;
    --accent-primary: #ff8800;
    --accent-secondary: #cc6600;
    --accent-hover: #ff9933;
    --border-color: #6a4a2a;
    --shadow-color: rgba(80, 40, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #ff8800, #cc6600);
}

/* Dark Blue Theme */
[data-theme="dark-blue"] {
    --bg-primary: #0a0a2a;
    --bg-secondary: #1a1a3a;
    --bg-tertiary: #2a2a4a;
    --text-primary: #ffffff;
    --text-secondary: #b0d0ff;
    --text-muted: #80a0ff;
    --accent-primary: #0066ff;
    --accent-secondary: #0044cc;
    --accent-hover: #3377ff;
    --border-color: #2a2a6a;
    --shadow-color: rgba(0, 0, 80, 0.5);
    --gradient-primary: linear-gradient(135deg, #0066ff, #0044cc);
}

/* Light Blue Theme */
[data-theme="light-blue"] {
    --bg-primary: #f0f8ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e6f3ff;
    --text-primary: #1a1a2a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-primary: #0066ff;
    --accent-secondary: #0044cc;
    --accent-hover: #3377ff;
    --border-color: #d1e5ff;
    --shadow-color: rgba(0, 100, 200, 0.1);
    --gradient-primary: linear-gradient(135deg, #0066ff, #0044cc);
}

/* Light Red Theme */
[data-theme="light-red"] {
    --bg-primary: #fff0f0;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ffe6e6;
    --text-primary: #2a0a0a;
    --text-secondary: #4a1a1a;
    --text-muted: #6a2a2a;
    --accent-primary: #ff0066;
    --accent-secondary: #cc0044;
    --accent-hover: #ff3388;
    --border-color: #ffd1d1;
    --shadow-color: rgba(200, 0, 50, 0.1);
    --gradient-primary: linear-gradient(135deg, #ff0066, #cc0044);
}

/* Light Teal Theme */
[data-theme="light-teal"] {
    --bg-primary: #f0ffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e6ffff;
    --text-primary: #0a2a2a;
    --text-secondary: #1a4a4a;
    --text-muted: #2a6a6a;
    --accent-primary: #00cccc;
    --accent-secondary: #009999;
    --accent-hover: #33dddd;
    --border-color: #d1ffff;
    --shadow-color: rgba(0, 150, 150, 0.1);
    --gradient-primary: linear-gradient(135deg, #00cccc, #009999);
}

/* Light Purple Theme */
[data-theme="light-purple"] {
    --bg-primary: #faf0ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0e6ff;
    --text-primary: #2a0a3a;
    --text-secondary: #4a1a5a;
    --text-muted: #6a2a7a;
    --accent-primary: #9933ff;
    --accent-secondary: #7700cc;
    --accent-hover: #aa44ff;
    --border-color: #e6d1ff;
    --shadow-color: rgba(100, 0, 150, 0.1);
    --gradient-primary: linear-gradient(135deg, #9933ff, #7700cc);
}

/* Light Orange Theme */
[data-theme="light-orange"] {
    --bg-primary: #fffaf0;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fff5e6;
    --text-primary: #3a1a0a;
    --text-secondary: #5a2a1a;
    --text-muted: #7a3a2a;
    --accent-primary: #ff8800;
    --accent-secondary: #cc6600;
    --accent-hover: #ff9933;
    --border-color: #ffe6d1;
    --shadow-color: rgba(200, 100, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #ff8800, #cc6600);
}

/* Light Pink Theme */
[data-theme="light-pink"] {
    --bg-primary: #fff0f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ffe6f2;
    --text-primary: #3a0a1a;
    --text-secondary: #5a1a2a;
    --text-muted: #7a2a3a;
    --accent-primary: #ff66b3;
    --accent-secondary: #cc3380;
    --accent-hover: #ff77c4;
    --border-color: #ffd1e6;
    --shadow-color: rgba(200, 50, 100, 0.1);
    --gradient-primary: linear-gradient(135deg, #ff66b3, #cc3380);
}

/* Light Green Theme */
[data-theme="light-green"] {
    --bg-primary: #f0fff0;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e6ffe6;
    --text-primary: #0a2a0a;
    --text-secondary: #1a4a1a;
    --text-muted: #2a6a2a;
    --accent-primary: #00cc66;
    --accent-secondary: #009944;
    --accent-hover: #00dd77;
    --border-color: #d1ffd1;
    --shadow-color: rgba(0, 150, 50, 0.1);
    --gradient-primary: linear-gradient(135deg, #00cc66, #009944);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-5 { flex: 0 0 41.666667%; }
.col-6 { flex: 0 0 50%; }
.col-7 { flex: 0 0 58.333333%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-10 { flex: 0 0 83.333333%; }
.col-11 { flex: 0 0 91.666667%; }
.col-12 { flex: 0 0 100%; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-color);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Navigation */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link.active {
    color: var(--accent-primary);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background: rgba(255, 170, 0, 0.1);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border-left-color: var(--error-color);
    color: var(--error-color);
}

.alert-info {
    background: rgba(0, 170, 255, 0.1);
    border-left-color: var(--info-color);
    color: var(--info-color);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--accent-primary);
    color: white;
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-error {
    background: var(--error-color);
    color: white;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .row {
        margin: 0 -5px;
    }
    
    .col {
        padding: 0 5px;
    }
    
    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-8,
    .col-9,
    .col-10,
    .col-11,
    .col-12 {
        flex: 0 0 100%;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card {
        padding: 16px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* My Images Page Specific Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.page-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.filters-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    min-width: 150px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.image-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-container img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-info {
    padding: 1rem;
}

.image-prompt {
    color: var(--text-primary);
    font-weight: 500;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.image-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.image-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.image-stats .stat i {
    font-size: 0.75rem;
}

.loading-state, .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    height: 600px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-body {
    display: flex;
    height: 100%;
}

.image-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-details {
    width: 350px;
    padding: 2rem;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
}

.image-details h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.image-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.image-details .image-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-details .image-actions .btn {
    justify-content: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.pagination button.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design for My Images */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .modal-content {
        width: 95vw;
        height: 80vh;
        flex-direction: column;
    }
    
    .modal-body {
        flex-direction: column;
        height: 100%;
    }
    
    .image-preview {
        height: 50%;
    }
    
    .image-details {
        width: 100%;
        height: 50%;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Settings Page Specific Styles */
.settings-nav {
    margin-bottom: 2rem;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    overflow-x: auto;
}

.nav-tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.settings-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.settings-panel {
    display: none;
    padding: 2rem;
}

.settings-panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.panel-header p {
    color: var(--text-secondary);
    margin: 0;
}

.settings-form {
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-control[readonly] {
    background: var(--bg-primary);
    opacity: 0.7;
}

.form-help {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Avatar Upload */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-change-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-change-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.avatar-info p {
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.avatar-info small {
    color: var(--text-muted);
}

/* Email Verification */
.email-verification {
    margin-top: 0.5rem;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.verification-badge.verified {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
}

.verification-badge.unverified {
    background: rgba(255, 170, 0, 0.1);
    color: var(--warning-color);
}

/* Tier Display */
.tier-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.tier-badge.guest {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tier-badge.registered {
    background: rgba(0, 170, 255, 0.1);
    color: #00aaff;
}

.tier-badge.premium {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.tier-badge.ultra_premium {
    background: rgba(128, 0, 255, 0.1);
    color: #8000ff;
}

/* Status Display */
.status-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
}

.status-badge.inactive {
    background: rgba(255, 68, 68, 0.1);
    color: var(--error-color);
}

/* Info Display */
.info-display {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
}

/* Invite Code Display */
.invite-code-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.invite-code-display .form-control {
    flex: 1;
}

/* Account Actions */
.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design for Settings */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .settings-panel {
        padding: 1.5rem;
    }
    
    .avatar-upload {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tier-display,
    .status-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .invite-code-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .account-actions {
        flex-direction: column;
    }
    
    .account-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .settings-panel {
        padding: 1rem;
    }
    
    .panel-header h2 {
        font-size: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.share-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 600px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.share-modal-overlay.show .share-modal {
    transform: scale(1);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.share-modal-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-modal-header h3 i {
    color: var(--accent-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.share-modal-body {
    padding: 1.5rem;
}

.share-preview {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.share-preview-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.share-preview-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.share-preview-text p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.share-preview-text strong {
    color: var(--text-primary);
}

.referral-code {
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
}

.share-options h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.share-btn-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.share-btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.share-btn-social i {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.share-btn-social.whatsapp i {
    background: #25D366;
}

.share-btn-social.telegram i {
    background: #0088cc;
}

.share-btn-social.facebook i {
    background: #1877F2;
}

.share-btn-social.twitter i {
    background: #000000;
}

.share-btn-social.viber i {
    background: #7360F2;
}

.share-btn-social.instagram i {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

.share-btn-social.copy i {
    background: var(--accent-primary);
}

.share-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.benefit-item i {
    color: var(--accent-primary);
    font-size: 1.1rem;
}

/* Responsive Design for Share Modal */
@media (max-width: 768px) {
    .share-modal {
        width: 95vw;
        max-height: 95vh;
    }
    
    .share-modal-header {
        padding: 1rem;
    }
    
    .share-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .share-modal-body {
        padding: 1rem;
    }
    
    .share-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .share-preview-image {
        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 1;
    }
    
    .share-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .share-btn-social {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .share-btn-social i {
        font-size: 1.25rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .share-buttons-grid {
        grid-template-columns: 1fr;
    }
}
