/* profile.css - Complete & Fixed */

:root {
    --primary-color: #ff3366; 
    --secondary-color: #00bfff; 
    --card-bg: #222; 
    --bg-color: #1c1c1c;
    --input-bg: #333;
    --text-main: #fff;
    --text-muted: #888;
    --border-color: #444;
}

body.light-mode {
    --bg-color: #f4f4f9;
    --card-bg: #ffffff;
    --input-bg: #eef0f5;
    --text-main: #1a1a1a;
    --text-muted: #555;
    --border-color: #ddd;
    --primary-color: #e62955;
}

.profile-section {
    padding: 0 0 80px 0;
    overflow-y: auto;
    height: 100%;
    background-color: var(--bg-color);
}

/* HEADER */
.profile-header {
    background: var(--card-bg);
    padding: 20px; text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.profile-avatar {
    width: 80px; height: 80px; margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--secondary-color), #0088cc);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2.5em; font-weight: bold; color: white;
    box-shadow: 0 4px 10px rgba(0, 191, 255, 0.3);
}
.name-row { display: flex; justify-content: center; align-items: center; gap: 5px; }
.profile-username { color: var(--text-main); margin: 5px 0; font-size: 1.4em; }
.verified-tick svg { margin-top: 2px; }
.profile-bio { color: var(--text-muted); font-style: italic; font-size: 0.9em; margin-bottom: 15px; }

.share-trigger-btn {
    background: var(--secondary-color); color: #000;
    border: none; padding: 8px 20px; border-radius: 20px;
    font-weight: bold; cursor: pointer; font-size: 0.9em;
    transition: transform 0.2s;
}
.share-trigger-btn:hover { transform: translateY(-2px); }

/* FRIENDS LIST */
.friends-section-wrapper { margin-bottom: 20px; }
.friends-scroll-container {
    display: flex; overflow-x: auto; padding: 10px 15px; gap: 15px;
    scrollbar-width: none;
}
.friends-scroll-container::-webkit-scrollbar { display: none; }
.friend-item {
    display: flex; flex-direction: column; align-items: center; cursor: pointer; min-width: 60px;
}
.friend-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #222);
    color: white; display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 1.2em; border: 2px solid var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.friend-name {
    margin-top: 5px; font-size: 0.7em; color: var(--text-muted);
    text-align: center; max-width: 60px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* EDIT FORM */
.edit-form-card {
    background: var(--card-bg); margin: 20px; padding: 20px;
    border-radius: 12px; border: 1px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); animation: fadeIn 0.3s;
}
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.edit-form-card h4 { margin-bottom: 15px; color: var(--secondary-color); border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.edit-form-card input, .edit-form-card textarea {
    width: 100%; padding: 12px; margin-bottom: 12px;
    background: var(--input-bg); border: 1px solid var(--border-color);
    color: var(--text-main); border-radius: 8px; font-size: 1em;
}
.save-btn { width: 100%; padding: 12px; background: var(--secondary-color); color: #000; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* TABS & LISTS */
.profile-tabs { display: flex; justify-content: space-around; background: var(--card-bg); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 10; }
.tab-btn { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 15px 0; font-weight: bold; cursor: pointer; border-bottom: 3px solid transparent; }
.tab-btn.active { color: var(--secondary-color); border-bottom: 3px solid var(--secondary-color); }
.tab-content { display: none; padding: 15px; }
.tab-content.active { display: block; }

.limit-info { font-size: 0.8em; color: var(--text-muted); text-align: right; margin-bottom: 10px; }
.vertical-list { display: flex; flex-direction: column; gap: 15px; padding-bottom: 20px; }

.list-card {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 15px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.card-left { display: flex; align-items: center; gap: 15px; flex-grow: 1; overflow: hidden; }
.card-icon { font-size: 1.8em; }
.card-info { display: flex; flex-direction: column; overflow: hidden; }
.card-title { font-weight: bold; font-size: 1em; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 0.75em; color: var(--text-muted); }
.icon-btn {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-muted); width: 35px; height: 35px;
    border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center;
}
.icon-btn.del:hover { color: #ff4444; border-color: #ff4444; }

/* SIDEBAR */
#settings-sidebar { 
    position: fixed; top: 0; right: 0; width: 280px; height: 100vh; 
    background: var(--card-bg); z-index: 2000; padding: 20px; 
    transform: translateX(100%); transition: transform 0.3s ease-out; 
    border-left: 1px solid var(--border-color);
    display: flex; flex-direction: column; gap: 10px; overflow-y: auto;
}
#settings-sidebar.open { transform: translateX(0); }

.sidebar-title {
    margin-top: 0; margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}

.setting-item { 
    width: 100%; background: var(--input-bg); color: var(--text-main); 
    border: none; padding: 12px 15px; text-align: left; 
    border-radius: 4px; cursor: pointer; text-decoration: none; 
    display: block; font-size: 0.95em; transition: background 0.2s;
}
.setting-item:hover { background: rgba(100,100,100,0.2); }
.setting-item.logout { margin-top: auto; color: #ff4444; background: rgba(255, 68, 68, 0.1); }

/* SHARE OVERLAY */
.post-creator { 
    margin: 15px; padding: 15px; background: var(--card-bg); border-radius: 12px; 
    border: 1px solid var(--secondary-color); box-shadow: 0 0 15px rgba(0, 191, 255, 0.1);
    position: fixed; bottom: 70px; left: 0; right: 0; z-index: 100; max-width: 500px; margin: 0 auto 80px auto;
    animation: slideUp 0.3s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.share-type-switch { display: flex; gap: 20px; margin-bottom: 15px; color: var(--text-muted); font-size: 0.9em; }
.creator-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.asset-select { flex-grow: 1; background: var(--input-bg); color: var(--text-main); border: 1px solid var(--border-color); padding: 10px; border-radius: 4px; outline: none; }
.post-creator textarea { width: 100%; height: 80px; background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-main); padding: 10px; border-radius: 8px; resize: none; margin-bottom: 10px; }
.publish-btn { width: 100%; padding: 12px; background: var(--secondary-color); color: #000; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* AUTH CARD */
.login-prompt-card { text-align: center; padding: 40px 20px; background: var(--card-bg); border-radius: 8px; margin: 20px; border: 1px solid var(--primary-color); }
.login-btn { background: var(--secondary-color); color: #000; padding: 10px 20px; text-decoration: none; border-radius: 4px; display: inline-block; font-weight: bold; }
