:root{
    --primary: #ff7a00;
    --primary-600: #e86e00;
    --primary-light: #fff7df;
    --border: #e6e6e6;
    --muted: #6b7280;
    --bg: #fff;
    --shadow: 0 6px 24px rgba(0,0,0,.08);
    --shadow-hover: 0 12px 32px rgba(0,0,0,.12);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --success: #22c55e;
    --warning: #f59e0b;
}

body { background: #fafbfc; }

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
}

/* Hero Profile Card */
.profile-hero {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    border: 1px solid #f1f5f9;
}

.profile-cover {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.profile-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,122,0,0.1) 0%, rgba(102,126,234,0.1) 100%);
    z-index: 1;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.share-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.profile-info {
    position: relative;
    padding: 0 32px 32px;
    margin-top: -80px;
    z-index: 5;
}

.profile-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-avatar-wrapper {
    position: relative;
    z-index: 6;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    object-fit: cover;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    outline: 4px solid #f59e0b;
    outline-offset: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,122,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
    z-index: 1;
}

.default-avatar-icon {
    width: 60px;
    height: 60px;
    z-index: 2;
    position: relative;
}

.profile-cover-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
}

.profile-cover-default::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
            radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
            radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%);
    background-size: 100px 100px;
}

.profile-cover-default::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E") repeat;
}

.verified-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    font-size: 16px;
}

.profile-details {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.6;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,122,0,0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: #e2e8f0;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

/* Content Section */
.content-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-count {
    background: var(--primary-light);
    color: #b45309;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Modern Ads Grid */
.modern-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.modern-ad-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.modern-ad-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255,122,0,0.2);
}

.ad-image-container {
    position: relative;
    aspect-ratio: 4/3;
    background: #f8fafc;
    overflow: hidden;
}

.ad-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modern-ad-card:hover .ad-image-container img {
    transform: scale(1.05);
}

.ad-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
}

.ad-content {
    padding: 20px;
}

.ad-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.ad-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.ad-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ad-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-container {
        padding: 16px;
    }

    .modern-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .profile-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .profile-cover {
        height: 200px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-info {
        padding: 0 20px 24px;
        margin-top: -60px;
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .modern-ads-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 12px;
    }

    .content-section {
        padding: 20px;
        border-radius: 16px;
    }

    .profile-cover {
        height: 160px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-info {
        margin-top: -40px;
    }
}