/**
 * Consolidated Panels CSS
 * 
 * Styles for the consolidated panels that replace standalone pages:
 * - Feed panels (replaces feed.php)
 * - Followers/Following modals (replaces followers.php, following.php)
 * - Profile panels (integrates user profiles into right panel)
 * - Dynamic content loading styles
 * - Touch-friendly mobile interactions
 */

/* Panel Base Styles */
.feed-panel,
.profile-panel,
.channels-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    border-left: 1px solid #333;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.feed-panel.active,
.profile-panel.active,
.channels-panel.active {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #333;
    background: #222;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.panel-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.panel-close-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.panel-close-btn:hover {
    background: #333;
    color: #fff;
    transform: scale(1.05);
}

.panel-content {
    padding: 20px;
}

/* Feed Panel Specific Styles */
.feed-filters {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #222;
    border-radius: 12px;
    padding: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.filter-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.filter-btn:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--CS-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.feed-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Channels Panel Specific Styles */
.channel-filters {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #222;
    border-radius: 12px;
    padding: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.channel-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.channel-search .search-input {
    flex: 1;
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.channel-search .search-input:focus {
    outline: none;
    border-color: var(--CS-blue);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.channel-search .search-input::placeholder {
    color: #888;
}

.channel-search .search-btn {
    background: var(--CS-blue);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel-search .search-btn:hover {
    background: var(--CS-aqua);
    transform: translateY(-1px);
}

.channels-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 12px !important;
}

/* Channel Card Styles */
.channel-card {
    background: #222;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid #333;
    position: relative;
}

.channel-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.channel-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: #333;
    flex-shrink: 0;
    border: 2px solid #333;
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #888;
}

.channel-card:hover .channel-icon {
    border-color: var(--CS-blue);
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name,
h5.channel-name {
    margin: 0 0 8px 0;
    color: #fff !important;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.channel-description {
    margin: 0 0 12px 0;
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.channel-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.channel-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.channel-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.channel-card-actions .btn {
    flex: 1;
    min-width: 0;
}

.join-btn {
    background: var(--CS-blue);
    color: #fff;
    border: 1px solid transparent;
}

.join-btn:hover {
    background: var(--CS-aqua);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.join-btn.joined {
    background: var(--CS-blue, #0c6af5);
    color: #fff;
    border: 1px solid var(--CS-blue, #0c6af5);
}

.join-btn.joined:hover {
    background: var(--CS-aqua, #00a3ff);
    color: #fff;
    border-color: var(--CS-aqua, #00a3ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.leave-btn {
    background: transparent;
    color: #28a745;
    border: 1px solid #28a745;
}

.leave-btn:hover {
    background: #28a745;
    color: #fff;
    transform: translateY(-1px);
}

.view-btn {
    background: transparent;
    color: #888;
    border: 1px solid #333;
}

.view-btn:hover {
    background: #333;
    color: #fff;
    border-color: #444;
    transform: translateY(-1px);
}

/* Followers Modal Styles */
.followers-dialog {
    --width: 600px;
    --height: 80vh;
}

.followers-dialog::part(panel) {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;
}

.followers-dialog::part(title) {
    color: var(--CS-blue, #0066cc);
    font-weight: 600;
}

.followers-dialog::part(header) {
    background: #222;
    border-bottom: 1px solid #333;
}

.followers-dialog::part(body) {
    background: #1a1a1a;
    color: #e0e0e0;
    overflow-x: hidden;
}

.followers-dialog::part(footer) {
    background: #1a1a1a;
    border-top: 1px solid #333;
}

.followers-dialog::part(overlay) {
    background: rgba(0, 0, 0, 0.8);
}

.followers-content {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid #333;
    background: linear-gradient(135deg, #222 0%, #1a1a1a 100%);
    margin: -20px -20px 20px -20px;
    border-radius: 12px 12px 0 0;
}

.user-info-header .user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #333;
    border: 3px solid var(--CS-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.user-details h4 {
    margin: 0 0 4px 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.user-details p {
    margin: 0 0 8px 0;
    color: #888;
    font-size: 14px;
}

.user-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #ccc;
}

.user-stats span {
    font-weight: 500;
}

.follow-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #222;
    border-radius: 12px;
    padding: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
}

.tab-btn:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--CS-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.tab-count {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
}

/* User Card Styles */
.user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #222;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.user-card:hover {
    background: #2a2a2a;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #333;
    flex-shrink: 0;
    border: 2px solid #333;
    transition: border-color 0.2s ease;
}

.user-card:hover .user-card-avatar {
    border-color: var(--CS-blue);
}

.user-card-info {
    flex: 1;
    min-width: 0;
}

.user-card-name {
    margin: 0 0 4px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.user-card-username {
    margin: 0 0 4px 0;
    color: #888;
    font-size: 14px;
    line-height: 1.2;
}

.user-card-channel {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 12px;
    line-height: 1.2;
}

.user-card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.user-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* Feed Post Styles */
.feed-post {
    background: #222;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.feed-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--CS-blue), var(--CS-aqua));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.feed-post:hover {
    background: #2a2a2a;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feed-post:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #333;
    flex-shrink: 0;
    border: 2px solid #333;
    transition: border-color 0.2s ease;
}

.feed-post:hover .post-author-avatar {
    border-color: var(--CS-blue);
}

.post-author-info {
    flex: 1;
    min-width: 0;
}

.post-author-name {
    margin: 0 0 4px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.post-meta {
    margin: 0;
    color: #888;
    font-size: 13px;
    line-height: 1.2;
}

.post-actions-menu {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.feed-post:hover .post-actions-menu {
    opacity: 1;
}

.post-menu-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.post-menu-btn:hover {
    background: #333;
    color: #fff;
}

.post-content {
    margin-bottom: 16px;
}

.post-text {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 15px;
}

.post-link-preview {
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.post-link-preview:hover {
    border-color: var(--CS-blue);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.link-preview-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.link-preview-content {
    padding: 16px;
}

.link-preview-title {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.link-preview-description {
    margin: 0 0 8px 0;
    color: #ccc;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-url {
    color: #888;
    font-size: 12px;
    text-decoration: none;
}

.link-preview-url:hover {
    color: var(--CS-blue);
}

.post-footer {
    border-top: 1px solid #333;
    padding-top: 16px;
}

.post-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #888;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.post-stats i {
    font-size: 14px;
}

.post-interaction-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #333;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.interaction-btn:hover {
    background: #333;
    color: #fff;
    border-color: #444;
    transform: translateY(-1px);
}

.interaction-btn.active {
    background: var(--CS-blue);
    border-color: var(--CS-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.interaction-btn i {
    font-size: 14px;
}

/* Comments Section */
.post-comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.comments-list {
    margin-bottom: 16px;
}

.comment-composer {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.comment-composer textarea {
    flex: 1;
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    min-height: 40px;
    transition: all 0.2s ease;
}

.comment-composer textarea:focus {
    outline: none;
    border-color: var(--CS-blue);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.comment-composer textarea::placeholder {
    color: #888;
}

/* Loading States */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

.loading-state i {
    font-size: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state,
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i,
.error-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.error-state {
    color: #ff6b6b;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-container .btn {
    min-width: 140px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.btn-primary {
    background: var(--CS-blue);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--CS-aqua);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #333;
    color: #fff;
    border: 1px solid #444;
}

.btn-secondary:hover:not(:disabled) {
    background: #444;
    border-color: #555;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--CS-blue);
    border: 1px solid var(--CS-blue);
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--CS-blue);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-outline-secondary {
    background: transparent;
    color: #888;
    border: 1px solid #333;
}

.btn-outline-secondary:hover:not(:disabled) {
    background: #333;
    color: #fff;
    border-color: #444;
    transform: translateY(-1px);
}

/* Profile Panel Specific Styles */
.profile-info {
    text-align: center;
}

.profile-info .profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #333;
    border: 3px solid var(--CS-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-info h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.profile-username {
    margin: 0 0 12px 0;
    color: #888;
    font-size: 14px;
}

.profile-bio {
    margin: 0 0 16px 0;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    background: #333;
    padding: 12px;
    border-radius: 8px;
}

.profile-social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid #333;
}

.social-link-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2a2a2a;
    color: #ccc;
    font-size: 18px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.social-link-item:hover {
    background: var(--CS-aqua);
    color: #000;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Use html.visual-refresh prefix to outrank visual_refresh.css's
   html.visual-refresh .btn-primary { background: var(--text) ... } reset
   and the global button { padding: 0 } reset. */
.profile-actions .btn,
html.visual-refresh .profile-actions .btn,
html.visual-refresh .profile-actions button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

html.visual-refresh .profile-actions .btn-primary,
html.visual-refresh .profile-actions .follow-btn {
    background: var(--CS-blue, #0c6af5);
    color: #fff;
    border: 1px solid var(--CS-blue, #0c6af5);
}

html.visual-refresh .profile-actions .btn-primary:hover,
html.visual-refresh .profile-actions .follow-btn:hover {
    background: var(--CS-aqua, #00a3ff);
    border-color: var(--CS-aqua, #00a3ff);
    color: #000;
}

html.visual-refresh .profile-actions .btn-outline-primary,
html.visual-refresh .profile-actions .btn-outline-secondary,
html.visual-refresh .profile-actions .unfollow-btn {
    background: transparent;
    color: #ddd;
    border: 1px solid #444;
}

html.visual-refresh .profile-actions .btn-outline-primary:hover,
html.visual-refresh .profile-actions .btn-outline-secondary:hover,
html.visual-refresh .profile-actions .unfollow-btn:hover {
    background: #2a2a2a;
    border-color: var(--CS-aqua, #00a3ff);
    color: #fff;
}

/* Profile Recent Posts */
.profile-recent-posts {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.profile-recent-posts h5 {
    margin: 0 0 16px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-post-item {
    padding: 14px;
    background: #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.recent-post-item:hover {
    background: #333;
    border-color: var(--CS-aqua);
    transform: translateX(4px);
}

.recent-post-content {
    color: #ddd;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.recent-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.recent-post-date {
    color: #666;
}

.recent-post-stats {
    display: flex;
    gap: 12px;
}

.recent-post-stats i {
    margin-right: 4px;
    color: #666;
}

.no-posts {
    color: #666;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
    font-style: italic;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .feed-panel,
    .profile-panel,
    .channels-panel {
        width: 100vw;
        left: 0;
        right: 0;
        top: var(--layout-header-height, 60px);
        height: calc(100vh - var(--layout-header-height, 60px));
    }
    
    .followers-dialog {
        --width: 95vw;
        --height: 90vh;
    }
    
    .user-card {
        padding: 12px;
    }
    
    .user-card-actions {
        flex-direction: row;
        gap: 6px;
    }
    
    .user-card-actions .btn {
        flex: 1;
        min-width: 0;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .post-interaction-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .interaction-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 10px 12px;
    }
    
    .interaction-btn span {
        display: none;
    }
    
    .feed-post {
        padding: 16px;
    }
    
    .panel-content {
        padding: 16px;
    }
    
    .filter-btn,
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .filter-btn i,
    .tab-btn i {
        font-size: 16px;
    }
}

/* Touch-friendly interactions for mobile devices */
@media (hover: none) and (pointer: coarse) {
    .filter-btn,
    .tab-btn,
    .interaction-btn,
    .user-card-actions button,
    .btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .panel-close-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .post-menu-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .user-card:hover,
    .feed-post:hover,
    .filter-btn:hover,
    .tab-btn:hover,
    .interaction-btn:hover,
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add touch feedback */
    .filter-btn:active,
    .tab-btn:active,
    .interaction-btn:active,
    .btn:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
}

/* Smooth transitions for panel animations */
@media (prefers-reduced-motion: no-preference) {
    .feed-panel,
    .profile-panel {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .user-card,
    .feed-post {
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .feed-panel,
    .profile-panel,
    .user-card,
    .feed-post,
    .filter-btn,
    .tab-btn,
    .interaction-btn,
    .btn {
        transition: none;
    }
    
    .loading-state i {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .feed-panel,
    .profile-panel {
        border-left-width: 2px;
    }
    
    .user-card,
    .feed-post {
        border-width: 2px;
    }
    
    .filter-btn.active,
    .tab-btn.active,
    .interaction-btn.active,
    .btn-primary {
        border: 2px solid #fff;
    }
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
}

/* Additional styles for modern layout integration */
.view-all-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
}

.view-all-btn:hover {
    background: #333;
    color: #fff;
}

.following-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding: 4px;
}

.following-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggested-user {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding: 8px 6px;
    gap: 14px;
}

.suggested-user:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggested-user .follow-btn {
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.suggested-user .follow-btn:hover {
    transform: scale(1.05);
}

/* Toast notification styles */
.toast {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.toast-error {
    background: linear-gradient(135deg, #dc3545, #fd7e14) !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.following-item:focus,
.suggested-user:focus,
.view-all-btn:focus {
    outline: 2px solid var(--CS-blue);
    outline-offset: 2px;
}

/* Loading animation improvements */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-state {
    animation: pulse 2s infinite;
}

/* Post highlight animation for scroll-to functionality */
@keyframes highlight-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
        background-color: transparent;
    }
    10% {
        box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.5);
        background-color: rgba(0, 123, 255, 0.15);
    }
    80% {
        box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.5);
        background-color: rgba(0, 123, 255, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
        background-color: transparent;
    }
}

.highlight-post {
    animation: highlight-flash 3s ease-in-out;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}