/**
 * Reactive Interface Styles
 * Complete styling system for reactive dashboard components
 */

/* ================================================================
   LAYOUT FOUNDATION
   ================================================================ */

#reactive-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0f0915;
    color: #e2e8f0;
}

.reactive-header {
    height: 60px;
    background: linear-gradient(90deg, rgba(26, 13, 46, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 2rem;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    width: 100%;
}

.reactive-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 1rem;
    padding: 1rem;
}

.reactive-sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(26, 13, 46, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.reactive-content {
    flex: 1;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.3) 0%, rgba(26, 13, 46, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    overflow-y: auto;
    padding: 2rem;
}

.reactive-right-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex-shrink: 0;
}

/* ================================================================
   HEADER COMPONENTS
   ================================================================ */

.logo-area {
    flex-shrink: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.05em;
}

.search-area {
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    color: #e2e8f0;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.header-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
    border-radius: 8px;
}

.header-btn:hover {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    min-width: 20px;
    text-align: center;
}

.connection-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background: #ef4444;
    animation: none;
}

/* ================================================================
   SIDEBAR NAVIGATION
   ================================================================ */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.02em;
    position: relative;
}

.nav-item:hover {
    background: rgba(192, 132, 252, 0.1);
    color: #e2e8f0;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-left: 3px solid #c084fc;
    padding-left: calc(1rem - 3px);
    color: #e2e8f0;
}

.unread-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: none;
}

.unread-badge:not(:empty) {
    display: block;
}

.sidebar-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: 1rem;
    margin-top: auto;
}

.logout-btn {
    color: #ef4444;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ================================================================
   CONTENT SECTIONS
   ================================================================ */

.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================================================
   FEED SECTION
   ================================================================ */

.feed-header {
    margin-bottom: 2rem;
}

.feed-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.post-composer {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.composer-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    object-fit: cover;
    flex-shrink: 0;
}

.composer-input-area {
    flex: 1;
}

.composer-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(15, 9, 21, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 1rem;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.composer-textarea:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.composer-action-btn {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.composer-action-btn:hover {
    border-color: #c084fc;
    color: #c084fc;
    background: rgba(192, 132, 252, 0.1);
}

.composer-submit-btn {
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.composer-submit-btn:hover {
    box-shadow: 0 8px 20px rgba(192, 132, 252, 0.3);
    transform: translateY(-2px);
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ================================================================
   MESSAGE SECTION
   ================================================================ */

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.messages-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.new-message-btn {
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    font-size: 0.9rem;
}

.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1rem;
    height: calc(100% - 60px);
}

.conversations-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    overflow-y: auto;
}

.conversations-list {
    padding: 1rem;
}

.messages-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.messages-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.message-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.message-input {
    flex: 1;
    background: rgba(15, 9, 21, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-input:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.send-message-btn {
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.send-message-btn:hover {
    box-shadow: 0 4px 12px rgba(192, 132, 252, 0.3);
}

/* ================================================================
   NOTIFICATIONS SECTION
   ================================================================ */

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.notifications-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.clear-notifications-btn {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    font-size: 0.9rem;
}

.clear-notifications-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ================================================================
   PROFILE SECTION
   ================================================================ */

.profile-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-banner {
    width: 100%;
    height: 200px;
}

.profile-info {
    padding: 2rem;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.profile-avatar-area {
    margin-bottom: 1rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #0f0915;
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    object-fit: cover;
}

.profile-details {
    background: rgba(15, 9, 21, 0.5);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.profile-bio {
    color: #cbd5e1;
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.01em;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    letter-spacing: 0.01em;
}

.profile-actions {
    display: flex;
    gap: 1rem;
}

.profile-action-btn {
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.profile-action-btn:hover {
    box-shadow: 0 8px 20px rgba(192, 132, 252, 0.3);
    transform: translateY(-2px);
}

.profile-posts {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.profile-posts h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

/* ================================================================
   SETTINGS SECTION
   ================================================================ */

.settings-header {
    margin-bottom: 2rem;
}

.settings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.settings-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.settings-item {
    margin-bottom: 1rem;
}

.settings-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.settings-input {
    width: 100%;
    background: rgba(15, 9, 21, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-input:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #cbd5e1;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ================================================================
   RIGHT SIDEBAR
   ================================================================ */

.sidebar-widget {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.trending-items,
.suggestions-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ================================================================
   EMPTY STATES
   ================================================================ */

.empty-state-content {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.empty-state-text {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 1400px) {
    .reactive-right-sidebar {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    .reactive-right-sidebar {
        display: none;
    }

    .reactive-content {
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 992px) {
    .reactive-sidebar {
        width: 240px;
        padding: 1rem;
    }

    .reactive-content {
        padding: 1.5rem;
    }

    .messages-container {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 768px) {
    .reactive-main {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .reactive-sidebar {
        width: 100%;
        border-radius: 0;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
        padding: 0.5rem 1rem;
        gap: 0;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        flex: 1;
    }

    .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .sidebar-footer {
        border: none;
        padding: 0;
        margin: 0;
        margin-left: auto;
    }

    .reactive-content {
        border-radius: 0;
        padding: 1rem;
        max-width: 100%;
    }

    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .conversations-panel {
        display: none;
    }

    .search-area {
        max-width: 200px;
    }

    .profile-stats {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .reactive-header {
        padding: 0 1rem;
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .search-area {
        display: none;
    }

    .header-actions {
        gap: 1rem;
    }

    .reactive-content {
        padding: 0.75rem;
    }

    .post-composer {
        padding: 1rem;
    }

    .composer-header {
        gap: 0.75rem;
    }

    .profile-info {
        padding: 1rem;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.2rem;
    }

    .profile-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ================================================================
   ANIMATIONS & TRANSITIONS
   ================================================================ */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */

button:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

input:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* ================================================================
   SCROLLBAR STYLING
   ================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
