/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #FAFAFA;
    color: #2C2C2C;
    line-height: 1.6;
}

/* Typography */
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
.text-large { font-size: 16px; }
.text-base { font-size: 14px; }
.text-small { font-size: 12px; }
.text-secondary { color: #6B7280; }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container { padding: 0 24px; }
}

@media (min-width: 1024px) {
    .container { padding: 0 32px; }
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand h1 {
    color: #8B5CF6;
    font-size: 24px;
    font-weight: 700;
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 32px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: #6B7280;
    width: 20px;
    height: 20px;
}

.search-container input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    background: #F9FAFB;
    transition: all 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #8B5CF6;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #E5E7EB;
    transition: border-color 0.2s ease;
}

.user-avatar:hover {
    border-color: #8B5CF6;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #F3F4F6;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 40px;
}

.btn-primary {
    background: #8B5CF6;
    color: white;
}

.btn-primary:hover {
    background: #7C3AED;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #8B5CF6;
    border: 1px solid #8B5CF6;
}

.btn-secondary:hover {
    background: #F3F4F6;
}

.btn-ghost {
    background: transparent;
    color: #6B7280;
}

.btn-ghost:hover {
    background: #F3F4F6;
    color: #2C2C2C;
}

.btn-full {
    width: 100%;
}

/* Main Content */
.main-content {
    padding: 24px 0;
}

/* Filters */
.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-tag {
    padding: 8px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    background: white;
    color: #6B7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-tag:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.filter-tag.active {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

/* Gallery */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.doll-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .doll-gallery {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Doll Cards */
.doll-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.doll-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.doll-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.doll-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.doll-card:hover .doll-image img {
    transform: scale(1.02);
}

.for-sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #10B981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.like-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.like-button:hover {
    background: white;
    transform: scale(1.1);
}

.like-button.liked {
    color: #EC4899;
}

.doll-info {
    padding: 16px;
}

.doll-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2C2C2C;
}

.doll-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.author-name {
    font-size: 14px;
    color: #6B7280;
}

.doll-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #6B7280;
}

.doll-price {
    font-size: 16px;
    font-weight: 600;
    color: #10B981;
}

/* Loading */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top: 4px solid #8B5CF6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.load-more-container {
    text-align: center;
    padding: 24px;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.modal-large {
    max-width: 900px;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6B7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #F3F4F6;
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2C2C2C;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* Upload */
.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .upload-container {
        grid-template-columns: 1fr;
    }
}

.upload-area {
    border: 2px dashed #E5E7EB;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.upload-area:hover {
    border-color: #8B5CF6;
    background: #F3F4F6;
}

.upload-area i {
    width: 48px;
    height: 48px;
    color: #6B7280;
    margin-bottom: 16px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

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

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

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .nav-search {
        margin: 0 16px;
    }
    
    .doll-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .container {
        padding: 0 12px;
    }
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

