/**
 * Forum4 Polls - User Profile Styles
 * Version: 2.0.6
 */

/* ========================================
   PROFILE CONTAINER
   ======================================== */

.forum4-user-profile {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ========================================
   PROFILE HEADER
   ======================================== */

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    color: white;
}

.profile-username {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.profile-role {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.profile-meta {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.profile-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 24px;
    font-weight: 700;
}

/* ========================================
   PROFILE STATS
   ======================================== */

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.stat-icon.polls {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-icon.votes {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stat-icon.comments {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-icon.rank {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

/* ========================================
   TABS
   ======================================== */

.profile-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 24px;
}

.tab-button {
    padding: 16px 24px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-button:hover {
    color: #667eea;
}

.tab-button.active {
    color: #667eea;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tabs-content {
    padding: 24px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ========================================
   POLLS LIST
   ======================================== */

.profile-polls-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-poll-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.profile-poll-item:hover {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.poll-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.poll-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.poll-item-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.poll-item-status.active {
    background: #d1fae5;
    color: #065f46;
}

.poll-item-status.closed {
    background: #fee2e2;
    color: #991b1b;
}

.poll-item-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
}

.poll-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   ACTIVITY LOG
   ======================================== */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.activity-icon.vote {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.activity-icon.create {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.activity-icon.comment {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #94a3b8;
}

/* ========================================
   BADGES
   ======================================== */

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.badge-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.badge-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.badge-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.badge-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.badge-description {
    font-size: 12px;
    color: #64748b;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-text {
    font-size: 16px;
    color: #64748b;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-username {
        font-size: 24px;
    }
    
    .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tabs-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        white-space: nowrap;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 24px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .tabs-content {
        padding: 16px;
    }
}
