/* NKST Makurdi Central Church - Modern UI/UX Styles */

:root {
    --primary-color: #372ac3;
    --secondary-color: #0500ff;
    --accent-color: #e10000;
    --success-color: #10b981;
    --danger-color: #e10000;
    --dark-color: #1f2937;
    --light-color: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    position: relative;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active menu item */
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #b00000;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Secondary buttons in navigation - white outline style */
.nav-menu .btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.nav-menu .btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.45) 0%, rgba(59, 130, 246, 0.45) 100%),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: brightness(1.2);
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7),
                 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7),
                 0 0 15px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Social Feed */
.feed-container {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.post-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.post-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.post-info h3 {
    font-size: 1rem;
    color: var(--dark-color);
}

.post-info p {
    font-size: 0.85rem;
    color: #6b7280;
}

.post-content {
    padding: 1.5rem;
}

.post-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.post-content p {
    color: #4b5563;
    line-height: 1.8;
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 2rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.action-btn:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
}

.action-btn.liked {
    color: var(--danger-color);
}

.comments-section {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #f9fafb;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.comment-text {
    color: #4b5563;
    font-size: 0.95rem;
}

.comment-time {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.comment-form {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.comment-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Login Form */
.login-box {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

/* Desktop Navigation - Ensure it's always visible on large screens */
@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .navbar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 1rem !important;
    }

    .nav-menu {
        display: flex !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        flex-direction: row !important;
        padding: 0 !important;
        gap: 2rem !important;
        box-shadow: none !important;
        overflow-y: visible !important;
        transition: none !important;
        right: auto !important;
        top: auto !important;
    }

    .nav-menu li {
        width: auto !important;
    }

    .nav-menu a {
        display: inline-block !important;
        width: auto !important;
        text-align: center !important;
        padding: 0.5rem 1rem !important;
    }

    .nav-menu .btn {
        width: auto !important;
    }
}

/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, less than 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .navbar {
        padding: 0 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .nav-menu .btn {
        width: 100%;
        text-align: center;
    }

    .hero {
        background-attachment: scroll;
        min-height: 300px;
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 1rem 0;
        gap: 1rem;
    }

    /* Ensure sidebar is visible on mobile */
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        order: 2; /* Show sidebar after feed */
    }

    .feed-container {
        order: 1; /* Show feed first */
    }

    .feed-container,
    .sidebar-card,
    .login-box {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .post-card {
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }

    .post-header {
        padding: 1rem;
    }

    .post-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .post-content {
        padding: 1rem;
    }

    .post-content h2 {
        font-size: 1.25rem;
    }

    .post-actions {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-height: 44px;
        min-width: 44px;
        justify-content: center;
    }

    .comment {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .form-control,
    .comment-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }

    .btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        touch-action: manipulation; /* Prevents double-tap zoom on buttons */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Ensure login button is fully clickable on mobile */
    #loginBtn {
        width: 100%;
        min-height: 48px;
        display: block;
        position: relative;
        z-index: 10;
        cursor: pointer;
    }

    /* Make form controls more touch-friendly */
    .form-control {
        touch-action: manipulation;
        -webkit-appearance: none;
        appearance: none;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .logo p {
        font-size: 0.7rem;
    }

    /* Chat layouts for mobile */
    .chat-layout,
    .chat-container {
        height: calc(100vh - 100px);
        border-radius: 0.5rem;
    }

    .conversations-list,
    .chat-sidebar {
        width: 100%;
        border-right: none;
    }

    .conversations-list.has-active,
    .chat-sidebar.has-active {
        display: none;
    }

    .chat-area,
    .chat-main {
        display: none;
        width: 100%;
    }

    .chat-area.active,
    .chat-main.active {
        display: flex;
    }

    .back-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-messages {
        padding: 1rem;
    }

    .message-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .message-content {
        max-width: 80%;
    }

    .message-text {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .chat-input {
        padding: 0.75rem;
    }

    .chat-input textarea,
    .chat-input input[type="text"] {
        font-size: 16px;
    }

    /* Dashboard and Grids */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .media-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .media-item img {
        height: 200px;
    }

    .groups-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Tables */
    .table-responsive {
        margin: 0 -1rem;
    }

    table th,
    table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    table th {
        font-size: 0.8rem;
    }

    /* Hide less important table columns on mobile */
    table td:nth-child(n+5),
    table th:nth-child(n+5) {
        display: none;
    }
}

/* Small Devices (larger phones, 481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .container {
        padding: 0 1.5rem;
    }

    .navbar {
        padding: 0 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .hero {
        background-attachment: scroll;
        min-height: 350px;
        padding: 2.5rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        max-width: 400px;
        margin: 0 auto;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 1.5rem 0;
        gap: 1.5rem;
    }

    /* Ensure sidebar is visible on larger phones */
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        order: 2;
    }

    .feed-container {
        order: 1;
    }

    .btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .action-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .form-control,
    .comment-input {
        font-size: 16px;
    }

    /* Chat layouts for larger phones */
    .chat-layout,
    .chat-container {
        height: calc(100vh - 105px);
    }

    .conversations-list,
    .chat-sidebar {
        width: 100%;
        border-right: none;
    }

    .conversations-list.has-active,
    .chat-sidebar.has-active {
        display: none;
    }

    .chat-area,
    .chat-main {
        display: none;
        width: 100%;
    }

    .chat-area.active,
    .chat-main.active {
        display: flex;
    }

    .back-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    .message-content {
        max-width: 75%;
    }

    .chat-input textarea,
    .chat-input input[type="text"] {
        font-size: 16px;
    }

    /* Dashboard and Grids */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .groups-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Medium Devices (tablets, 768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 2rem;
    }

    .navbar {
        padding: 0 2rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.25rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .hero {
        background-attachment: scroll;
        min-height: 400px;
        padding: 3rem 2rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1.15rem;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }

    /* Sidebar layout for tablets - show in 2-column grid */
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        order: 2;
    }

    .feed-container {
        order: 1;
    }

    .btn {
        min-height: 44px;
    }

    .action-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Chat layouts for tablets */
    .chat-layout,
    .chat-container {
        height: calc(100vh - 110px);
    }

    .conversations-list,
    .chat-sidebar {
        width: 100%;
        border-right: none;
    }

    .conversations-list.has-active,
    .chat-sidebar.has-active {
        display: none;
    }

    .chat-area,
    .chat-main {
        display: none;
        width: 100%;
    }

    .chat-area.active,
    .chat-main.active {
        display: flex;
    }

    .back-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    /* Dashboard and Grids */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Tablets and Small Desktops (1024px to 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .main-content {
        grid-template-columns: 1fr 320px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Chat and Group Chat Layouts */
.chat-layout,
.chat-container {
    display: flex;
    height: calc(100vh - 120px);
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.conversations-list,
.chat-sidebar {
    width: 350px;
    background: var(--light-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.chat-area,
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.conversation-item {
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: white;
}

.conversation-item.active {
    background: white;
    border-left: 3px solid var(--primary-color);
}

.user-avatar,
.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.chat-header {
    padding: 1.5rem;
    background: var(--primary-color);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
}

.chat-input {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    animation: fadeInUp 0.3s ease;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-text {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
}

.message.own {
    flex-direction: row-reverse;
}

.message.own .message-text {
    background: var(--secondary-color);
    color: white;
    border-top-left-radius: 1rem;
    border-top-right-radius: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.back-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

/* Tables - Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Media Gallery Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.media-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.media-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.media-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.group-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.group-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.member-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}
