/* profile.css - Complete */
.profile-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px;
}

/* Profile Header */
.profile-header {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--violet);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    position: relative;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--violet);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.profile-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-username {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0.75rem 0;
    line-height: 1.4;
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 0.5rem 0;
}

.profile-badge {
    background-color: var(--bg-input);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Stats Row */
.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    text-align: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.stat-item:hover {
    background-color: var(--bg-primary);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Follow Button */
.follow-btn, .edit-profile-btn {
    background-color: var(--violet);
    color: white;
    border: none;
    border-radius: 2rem;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.follow-btn.following {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.edit-profile-btn {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.follow-btn:hover, .edit-profile-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg-secondary);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--violet);
    border-bottom: 2px solid var(--violet);
}

/* Posts Grid */
.posts-grid {
    padding: 0.5rem 0;
}

/* Post card inside profile */
.posts-grid .post-card {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.posts-grid .post-card:hover {
    background-color: var(--bg-primary);
}

.posts-grid .post-content p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.posts-grid .post-image {
    max-width: 100%;
    max-height: 250px;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}

.posts-grid .post-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.posts-grid .post-stats i {
    margin-right: 0.25rem;
}

.post-time {
    margin-left: auto;
}

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

.modal.show {
    display: flex;
}

.edit-modal {
    background-color: var(--bg-secondary);
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background-color: var(--bg-secondary);
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.modal-footer .btn {
    width: 100%;
}

/* Form groups inside modal */
.edit-modal .form-group {
    margin-bottom: 1rem;
}

.edit-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.edit-modal input,
.edit-modal textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.edit-modal input:focus,
.edit-modal textarea:focus {
    outline: none;
    border-color: var(--violet);
}

.edit-modal textarea {
    resize: vertical;
    font-family: inherit;
}

.form-helper {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 0.25rem;
}

/* Loading and empty states */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--violet);
}

.empty-state .btn {
    margin-top: 1rem;
    width: auto;
    display: inline-block;
}
/* ─── Profile Streak ───────────────────────────── */
.profile-streak {
    display: inline-block;
    padding: 4px 16px;
    margin: 4px auto 8px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

.dark-mode .profile-streak {
    background: linear-gradient(135deg, #d97706, #dc2626);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}
/* ─── Video in Profile ──────────────────────────── */
.video-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    border-radius: 12px;
    max-height: 400px;
    background: #000;
}

/* ─── Poll in Profile ───────────────────────────── */
.poll-preview {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 8px;
    border: 1px solid var(--border);
}

.poll-preview .poll-preview-question {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.poll-preview .poll-preview-options {
    font-size: 13px;
    color: var(--text-secondary);
}

.poll-preview .poll-preview-timer {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}