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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

h1 {
    text-align: center;
    color: #333;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
}

h1 p {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Auth Section */
.auth-section {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

/* Membership Selection */
.membership-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.membership-card {
    border: 3px solid #e1e5e9;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.membership-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.membership-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
}

.membership-card i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 20px;
}

.membership-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.membership-card p {
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.membership-card ul {
    text-align: left;
    color: #555;
    list-style: none;
}

.membership-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.membership-card li:before {
    content: "✓";
    color: #11998e;
    font-weight: bold;
    margin-right: 10px;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 5px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* App Section */
.app-section {
    padding: 20px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    font-weight: 600;
    color: #333;
}

.membership-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

/* Content Sections */
.content-section {
    transition: all 0.3s ease;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 16px;
}

/* AI Generator Styles */
.generator-container {
    display: grid;
    gap: 30px;
}

.source-selection, .prompt-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.artists-filter {
    margin-bottom: 20px;
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.artwork-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.artwork-item:hover {
    transform: translateY(-5px);
}

.artwork-item.selected {
    border: 3px solid #667eea;
}

.artwork-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.artwork-info {
    padding: 15px;
}

.artwork-name {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artwork-artist {
    font-size: 12px;
    color: #666;
}

.comparison-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.comparison-item {
    text-align: center;
}

.comparison-image, .generated-art {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 15px 0;
}

.art-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Catalogue Manager Styles */
.catalogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.artist-stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.catalogue-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.catalogue-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.categories-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    height: fit-content;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.category-item:hover {
    transform: translateX(5px);
}

.category-item.active {
    background: #667eea;
    color: white;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.category-name {
    font-weight: bold;
}

.category-stats {
    font-size: 12px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.category-item.active .category-stats {
    background: rgba(255,255,255,0.2);
    color: white;
}

.category-description {
    font-size: 12px;
    color: #666;
}

.category-item.active .category-description {
    color: rgba(255,255,255,0.8);
}

.pictures-main {
    min-height: 500px;
}

.pictures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    min-height: 400px;
}

.picture-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.picture-card:hover {
    transform: translateY(-5px);
}

.picture-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.picture-info {
    padding: 15px;
}

.picture-name {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picture-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.picture-actions {
    display: flex;
    gap: 5px;
}

.picture-actions .btn {
    padding: 5px 10px;
    font-size: 12px;
    flex: 1;
}

/* Artists Browse Styles */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.artist-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.artist-card:hover {
    transform: translateY(-5px);
}

.artist-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.artist-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.artist-stats-small {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.artist-stat {
    text-align: center;
}

.artist-stat-number {
    display: block;
    font-weight: bold;
    color: #667eea;
}

.artist-stat-label {
    font-size: 12px;
    color: #666;
}

/* Following Styles */
.following-list {
    display: grid;
    gap: 20px;
}

.following-artist {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.following-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.following-artist-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.following-artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ccc;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
}

.upload-area i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .catalogue-content {
        grid-template-columns: 1fr;
    }
    
    .categories-sidebar {
        order: 2;
    }
    
    .pictures-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .auth-section, .app-section {
        padding: 20px;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-details {
        flex-direction: column;
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .comparison-view {
        grid-template-columns: 1fr;
    }
    
    .artists-grid {
        grid-template-columns: 1fr;
    }
    
    .catalogue-actions {
        justify-content: center;
    }
    
    .section-header {
        text-align: center;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
}