/* Nivaran - Global Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #e5e7eb;
    --border-color: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    width: 100%;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav-brand img,
.sidebar-header img,
.auth-header img,
.footer-section img {
    height: 80px;
    width: auto;
}

/* Logo styles */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

/* For sidebar and auth pages */
.sidebar-header img {
    height: 36px;
}

.sidebar-header a:hover img,
.auth-header a:hover img {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.auth-header img {
    height: 50px;
    margin-bottom: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    margin: 0;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.role-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.role-card input {
    display: none;
}

.role-card:hover {
    border-color: var(--primary-color);
}

.role-card input:checked + .role-content {
    color: var(--primary-color);
}

.role-card input:checked ~ .role-content {
    border-color: var(--primary-color);
}

.role-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.role-card h4 {
    margin: 0.5rem 0;
}

.role-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-buttons .btn {
    flex: 1;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: var(--shadow-md);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-nav {
    padding: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-secondary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link span {
    font-size: 1.25rem;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-info p {
    margin: 0;
    color: var(--text-secondary);
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin: 0;
}

/* Posts */
.posts-grid, .posts-feed {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    gap: 0.75rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 0.25rem 0;
}

.post-role {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.post-role.donor {
    background: #dbeafe;
    color: #1e40af;
}

.post-role.ngo {
    background: #d1fae5;
    color: #065f46;
}

.post-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-content h3 {
    margin: 0 0 0.5rem 0;
}

.post-content p {
    color: var(--text-secondary);
}

.post-images {
    position: relative;
    margin: 1rem 0;
}

.post-images img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.image-count {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.post-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.post-details .detail {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-location {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Filters Bar */
.filters-bar {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

/* Map */
.map-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

#map {
    width: 100%;
    height: 600px;
}

.map-popup {
    min-width: 250px;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.popup-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.popup-header h3 {
    margin: 0;
    font-size: 1rem;
}

.verified-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.popup-body p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.popup-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* NGO Cards */
.ngo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ngo-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.ngo-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ngo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.ngo-info {
    padding: 1rem;
}

.ngo-info h3 {
    margin: 0 0 0.5rem 0;
}

.ngo-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* NGO List View */
.ngo-list-card {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.ngo-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ngo-details {
    flex: 1;
}

.ngo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ngo-header h3 {
    margin: 0;
}

.ngo-distance,
.ngo-rating,
.ngo-bio {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ngo-contact {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.ngo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

/* Chat */
.chat-list-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.chat-list-item:hover {
    background: var(--bg-secondary);
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
}

.chat-info h4 {
    margin: 0 0 0.25rem 0;
}

.chat-role,
.chat-post {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.chat-meta {
    text-align: right;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Messages */
#messages-container {
    height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message-own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.message-own .message-content {
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 var(--radius-md);
}

.message-other .message-content {
    background: white;
    border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0;
}

.message-content {
    padding: 0.75rem;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.message-text {
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Loading & Empty States */
.loading, .loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state, .error-state, .no-posts, .no-chats {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.offered {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.accepted {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.picked {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* History */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.history-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.history-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.history-item h4 {
    margin: 0 0 0.25rem 0;
}

.history-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Landing Page */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

.hero-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat h3 {
    font-size: 2.5rem;
    margin: 0;
}

.stat p {
    margin: 0;
    opacity: 0.9;
}

.features, .how-it-works, .about {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.process {
    margin: 2rem 0;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Message Modal */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.message-modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.message-modal-content.success .message-icon {
    background: var(--secondary-color);
    color: white;
}

.message-modal-content.error .message-icon {
    background: var(--danger-color);
    color: white;
}

.message-modal-content.info .message-icon {
    background: var(--primary-color);
    color: white;
}

.message-modal-content h3 {
    margin: 0;
    font-size: 1.5rem;
}

.message-modal-content.success h3 {
    color: var(--secondary-color);
}

.message-modal-content.error h3 {
    color: var(--danger-color);
}

.message-modal-content.info h3 {
    color: var(--primary-color);
}

.message-modal-content p {
    margin: 1rem 0 1.5rem 0;
    color: var(--text-secondary);
}

.message-modal-content .btn {
    min-width: 120px;
}

/* Twitter-like Feed Styles */
.twitter-feed-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.feed-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.feed-header h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Create Post Box */
.create-post-box {
    padding: 1rem 1.5rem;
    border-bottom: 8px solid var(--bg-secondary);
}

.post-input-area {
    display: flex;
    gap: 1rem;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-input-wrapper {
    flex: 1;
}

#post-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 1.125rem;
    font-family: inherit;
    padding: 0.5rem 0;
    min-height: 60px;
}

#post-textarea::placeholder {
    color: var(--text-secondary);
}

#post-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-detail-row {
    margin-bottom: 0.75rem;
}

.post-detail-row input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.post-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.post-actions-left {
    display: flex;
    gap: 0.5rem;
}

.post-action-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.post-action-btn:hover {
    background: var(--bg-secondary);
}

.btn-post {
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    border-radius: 9999px;
}

.btn-post:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Feed Tabs */
.feed-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 61px;
    background: white;
    z-index: 9;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
}

/* Twitter Posts Feed */
.twitter-posts-feed {
    /* Posts will be appended here */
}

.twitter-post {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.twitter-post:hover {
    background: var(--bg-secondary);
}

.post-avatar-container {
    flex-shrink: 0;
}

.post-content-main {
    flex: 1;
    min-width: 0;
}

.post-header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.post-author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.post-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-role-badge.donor {
    background: #dbeafe;
    color: #1e40af;
}

.post-role-badge.ngo {
    background: #d1fae5;
    color: #065f46;
}

.post-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.post-text {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0.5rem 0;
    word-wrap: break-word;
}

.post-details-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.detail-tag {
    background: var(--bg-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-actions-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.post-action-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-action-icon:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .twitter-feed-container {
        border-left: none;
        border-right: none;
    }

    .create-post-box {
        padding: 1rem;
    }

    .post-input-area {
        gap: 0.75rem;
    }

    .post-avatar {
        width: 40px;
        height: 40px;
    }

    #post-textarea {
        font-size: 1rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .post-actions {
        flex-direction: column;
    }

    .filters-bar {
        flex-direction: column;
    }
}

/* Image Upload and Preview Styles */
.image-preview-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.remove-image-btn:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* Post Images Display */
.post-images {
    margin-top: 0.75rem;
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    gap: 2px;
    max-height: 500px;
}

.post-images.single {
    grid-template-columns: 1fr;
}

.post-images.double {
    grid-template-columns: repeat(2, 1fr);
}

.post-images.multiple {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.post-image-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 16/9;
}

.post-images.single .post-image-item {
    aspect-ratio: auto;
    max-height: 500px;
}

.post-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-image-item:hover img {
    transform: scale(1.05);
}

.more-images-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    top: 50%;
    transform: translateY(-50%);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-prev {
    left: -80px;
}

.modal-next {
    right: -80px;
}

.image-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Responsive Image Styles */
@media (max-width: 768px) {
    .image-preview-item {
        width: 80px;
        height: 80px;
    }

    .post-images {
        max-height: 400px;
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
    }

    .image-counter {
        bottom: 10px;
    }
}

/* Profile Completion Styles */
.profile-complete-card {
    max-width: 600px;
    width: 100%;
}

.profile-complete-card .auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-complete-card .auth-header img {
    height: 50px;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-image-preview {
    margin-top: 0.5rem;
    position: relative;
    display: inline-block;
}

.profile-image-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

.remove-preview {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-preview:hover {
    background: #dc2626;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
