/* social features styles */

/* feed */
.new-post-form {
    background: var(--bg-card, #1a1a1f);
    border: 1px solid var(--border, #2a2a3a);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.new-post-form textarea {
    width: 100%;
    min-height: 80px;
    background: var(--bg-primary, #0a0a0f);
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

.new-post-form .btn {
    width: 100%;
}

.feed-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* post card */
.post {
    background: var(--bg-card, #1a1a1f);
    border: 1px solid var(--border, #2a2a3a);
    border-radius: 12px;
    padding: 16px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
}

.post-meta {
    flex: 1;
    min-width: 0;
}

.post-author {
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: block;
}

.post-time {
    color: var(--text-secondary, #888);
    font-size: 12px;
}

.post-delete, .post-report {
    background: none;
    border: none;
    color: var(--text-secondary, #666);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    flex-shrink: 0;
}

.post-content {
    color: #ddd;
    line-height: 1.5;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.post-content a {
    color: var(--accent, #00ff9d);
}

/* led reactions */
.post-reactions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border, #333);
    flex-wrap: wrap;
    gap: 8px;
}

.led-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary, #666);
}

.led.lit {
    box-shadow: 0 0 6px currentColor;
}

.led-count {
    color: var(--text-secondary, #888);
    font-size: 13px;
    font-weight: 600;
}

.led-details-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 10px;
}

.reaction-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.react-btn {
    background: var(--bg-secondary, #333);
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.15s;
}

.react-btn:hover {
    transform: scale(1.1);
}

.react-btn.active {
    background: var(--accent, #00ff9d);
}

.react-btn.more {
    background: var(--bg-primary, #222);
    color: var(--text-secondary, #888);
    font-size: 12px;
}

.post-footer {
    margin-top: 8px;
}

.comment-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 0;
}

/* comments */
.post-comments {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border, #333);
}

.comment-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.comment-form input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

.comment-form button {
    padding: 8px 16px;
    font-size: 13px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    background: var(--bg-primary, #0a0a0f);
    border-radius: 8px;
    padding: 8px 12px;
}

.comment-author {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    margin-right: 6px;
}

.comment-time {
    color: var(--text-secondary, #666);
    font-size: 11px;
}

.comment-content {
    color: #ddd;
    font-size: 13px;
    margin-top: 4px;
}

/* reaction modal */
.reaction-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.reaction-modal-content {
    background: var(--bg-card, #1a1a1f);
    border: 1px solid var(--border, #333);
    border-radius: 12px;
    padding: 20px;
    max-width: 360px;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
}

.reaction-modal-content h3 {
    margin: 0 0 16px;
    color: #fff;
    text-align: center;
    font-size: 16px;
}

.all-reactions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.all-reactions button {
    background: var(--bg-secondary, #333);
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 18px;
    cursor: pointer;
}

.led-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.led-breakdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-primary, #0a0a0f);
    border-radius: 6px;
}

.led-emoji { font-size: 18px; }
.led-type { flex: 1; color: var(--text-secondary, #888); font-size: 13px; }
.led-item-count { color: #fff; font-weight: 600; }

.close-modal {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 10px;
    background: var(--bg-secondary, #333);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

/* profile */
.profile-header {
    position: relative;
    margin-bottom: 16px;
}

.profile-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--accent, #00ff9d) 0%, #1a1a2e 100%);
    border-radius: 12px 12px 0 0;
    background-size: cover;
    background-position: center;
}

.profile-banner.default {
    background: linear-gradient(135deg, var(--accent, #00ff9d) 0%, #1a1a2e 100%);
}

.profile-avatar-wrap {
    position: absolute;
    left: 16px;
    top: 90px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary, #0a0a0f);
    object-fit: cover;
    background: var(--bg-card, #1a1a1f);
}

.profile-info {
    padding: 40px 16px 16px;
    background: var(--bg-card, #1a1a1f);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border, #2a2a3a);
    border-top: none;
}

.profile-name {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.profile-username {
    color: var(--text-secondary, #888);
    font-size: 13px;
}

.profile-pronouns {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--bg-secondary, #333);
    border-radius: 10px;
    color: var(--text-secondary, #888);
    font-size: 11px;
}

.profile-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.profile-edit-btn {
    position: absolute;
    top: 130px;
    right: 16px;
    background: var(--bg-secondary, #333);
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.profile-body {
    background: var(--bg-card, #1a1a1f);
    border: 1px solid var(--border, #2a2a3a);
    border-radius: 12px;
    padding: 16px;
}

.profile-bio {
    color: #ddd;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.profile-about, .profile-interests, .profile-links, .profile-projects {
    margin-bottom: 16px;
}

.profile-about h3, .profile-interests h3, .profile-links h3, .profile-projects h3 {
    color: var(--text-secondary, #888);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.profile-about p {
    color: #ddd;
    font-size: 14px;
    line-height: 1.5;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--bg-secondary, #333);
    padding: 4px 10px;
    border-radius: 12px;
    color: #ddd;
    font-size: 12px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-primary, #0a0a0f);
    border-radius: 6px;
    color: var(--accent, #00ff9d);
    text-decoration: none;
    margin-bottom: 6px;
    font-size: 13px;
}

.link-type {
    background: var(--bg-secondary, #333);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary, #888);
    font-size: 10px;
    text-transform: uppercase;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.project-card {
    background: var(--bg-primary, #0a0a0f);
    border-radius: 8px;
    padding: 10px;
}

.project-card h4 {
    color: #fff;
    margin: 0 0 4px;
    font-size: 13px;
}

.project-card p {
    color: var(--text-secondary, #888);
    font-size: 11px;
    margin: 0 0 6px;
}

.project-card a {
    color: var(--accent, #00ff9d);
    font-size: 11px;
}

.profile-custom {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-primary, #0a0a0f);
    border-radius: 8px;
    color: #ddd;
    font-size: 14px;
}

/* profile editor */
.profile-editor {
    background: var(--bg-card, #1a1a1f);
    border: 1px solid var(--border, #2a2a3a);
    border-radius: 12px;
    padding: 16px;
}

.profile-editor h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

.profile-editor label {
    display: block;
    color: var(--text-secondary, #888);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
    margin-top: 12px;
}

.profile-editor label:first-of-type {
    margin-top: 0;
}

.profile-editor input[type="text"],
.profile-editor input[type="url"],
.profile-editor textarea {
    width: 100%;
    margin-bottom: 0;
}

.profile-editor input[type="color"] {
    width: 50px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.profile-editor small {
    color: var(--text-secondary, #666);
    font-size: 11px;
    display: block;
    margin-top: 4px;
}

.profile-editor .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.profile-editor .form-actions button {
    flex: 1;
    padding: 10px;
}

.profile-uploads, .profile-links-editor {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border, #333);
}

.profile-uploads h3, .profile-links-editor h3 {
    color: var(--text-secondary, #888);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.profile-uploads button {
    background: var(--bg-secondary, #333);
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    color: #fff;
    cursor: pointer;
    margin-right: 8px;
    font-size: 13px;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-primary, #0a0a0f);
    border-radius: 6px;
    margin-bottom: 6px;
}

.link-item span {
    color: #ddd;
    font-size: 12px;
}

.link-item button {
    background: none;
    border: none;
    color: var(--error, #ff4d6d);
    cursor: pointer;
    font-size: 16px;
}

.add-link-form {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.add-link-form select {
    width: 100px;
    padding: 8px;
    font-size: 12px;
}

.add-link-form input {
    flex: 1;
    min-width: 120px;
    padding: 8px;
    font-size: 12px;
}

.add-link-form button {
    padding: 8px 14px;
    font-size: 12px;
}

/* toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    z-index: 1001;
    animation: slideUp 0.3s ease;
}

.toast.success { background: var(--success, #00ff9d); color: #000; }
.toast.error { background: var(--error, #ff4d6d); }

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* empty states */
.empty-feed, .empty-profile {
    text-align: center;
    color: var(--text-secondary, #888);
    padding: 30px 16px;
}

.empty-profile p {
    margin-bottom: 12px;
}

.empty-profile .btn {
    display: inline-block;
}

.loading, .error {
    text-align: center;
    color: var(--text-secondary, #888);
    padding: 20px;
}

.error { color: var(--error, #ff4d6d); }
