:root {
    --primary-dark: #003366;
    --primary-medium: #336699;
    --accent-green: #4CAF50;
    --accent-yellow: #FFEB3B;
    --neutral-light: #F5F5F5;
    --white: #FFFFFF;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e1e5e9;
    --shadow-light: 0 2px 10px rgba(0, 51, 102, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 51, 102, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: var(--white);
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%25" cy="0%25" r="100%25"><stop offset="0%25" stop-color="%23fff" stop-opacity=".1"/><stop offset="100%25" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat-x;
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
}

.group-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #45a049 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.verification-badge {
    background: var(--accent-green);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: 1rem;
}

.group-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.group-type {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

.group-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    font-size: 0.95rem;
    opacity: 0.9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-actions {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 3;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Admin Dashboard */
.admin-dashboard {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.admin-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%25" cy="0%25" r="100%25"><stop offset="0%25" stop-color="%23fff" stop-opacity=".1"/><stop offset="100%25" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat-x;
    opacity: 0.3;
}

.admin-content {
    position: relative;
    z-index: 2;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-subtitle {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.875rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    flex: 1;
    min-width: 160px;
    justify-content: center;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.admin-btn.primary:hover {
    background: var(--neutral-light);
    color: var(--accent-green);
    border-color: var(--neutral-light);
}

/* Profile Content */
.profile-content {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    margin: -2rem 1rem 3rem 1rem;
    position: relative;
    z-index: 3;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-stats {
    background: var(--neutral-light);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-dark);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 2.5rem;
}

.content-left {
    min-width: 0;
}

.content-right {
    min-width: 0;
}

/* About Section */
.about-section {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .title-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    color: var(--primary-medium);
    font-size: 1.1rem;
}

.edit-link {
    background: var(--neutral-light);
    color: var(--primary-medium);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.edit-link:hover {
    background: var(--primary-medium);
    color: var(--white);
    text-decoration: none;
    transform: scale(1.05);
}

.about-content {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
    white-space: pre-wrap;
}

.no-content {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: var(--neutral-light);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

/* Admin Sidebar */
.admin-sidebar {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-card {
    background: var(--neutral-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
}

.admin-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.admin-details h6 {
    margin: 0 0 0.25rem 0;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.admin-badge {
    background: var(--accent-green);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.375rem;
    display: inline-block;
}

.author-link {
    text-decoration: none;
    color: inherit;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.author-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-green);
    transition: width 0.3s ease;
}

.author-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.author-link:hover::after {
    width: 100%;
}

.author-link h6 {
    margin: 0;
    transition: all 0.3s ease;
}

/* Recent Posts Section */
.posts-section {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
}

.posts-header {
    background: var(--neutral-light);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.posts-header h3 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-all-link {
    color: var(--primary-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.view-all-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.post-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.post-item:hover {
    background: rgba(51, 102, 153, 0.02);
    text-decoration: none;
    color: inherit;
    transform: translateX(4px);
}

.post-item:last-child {
    border-bottom: none;
}

.post-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    flex-shrink: 0;
}

.post-content {
    flex-grow: 1;
    min-width: 0;
}

.post-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.post-author {
    font-weight: 600;
    color: var(--primary-medium);
}

.no-posts {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-posts-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.create-post-cta {
    background: var(--accent-green);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: 1rem;
}

.create-post-cta:hover {
    background: #45a049;
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-header {
        padding: 2rem 0 1rem;
    }

    .group-avatar,
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .group-title {
        font-size: 1.75rem;
    }

    .profile-content {
        margin: -1.5rem 0.5rem 2rem 0.5rem;
    }

    .profile-actions {
        position: static;
        justify-content: center;
        margin-top: 1.5rem;
        flex-wrap: wrap;
    }

    .action-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .group-meta {
        justify-content: center;
        text-align: center;
        gap: 1rem;
    }

    .admin-dashboard {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .admin-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-btn {
        flex: none;
        min-width: auto;
    }

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

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Mobile: Single column layout */
    .main-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .admin-sidebar {
        order: 1;
        position: static;
        margin-bottom: 1.5rem;
    }

    .content-left {
        order: 2;
    }

    .section-title {
        font-size: 1.1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .about-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .posts-section {
        margin-bottom: 1.5rem;
    }

    .posts-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .posts-header h3 {
        font-size: 1.1rem;
    }

    .post-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .post-meta {
        justify-content: center;
        gap: 0.75rem;
    }

    .admin-grid {
        gap: 0.75rem;
    }

    .admin-card {
        padding: 0.875rem;
    }

    .admin-info {
        gap: 0.625rem;
    }

    .verification-badge {
        margin-left: 0;
        margin-top: 0.5rem;
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-actions {
        gap: 0.5rem;
    }

    .admin-btn {
        padding: 0.75rem 1rem;
    }
}