/* =========================================
   Community Pages Unified Styles
   Used by: Details.cshtml, Index.cshtml
   Last Updated: October 19, 2025
   ========================================= */

/* =========================================
   COMMUNITY DETAIL PAGE
   ========================================= */

.community-detail-page {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    background-color: #dae0e6;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .community-detail-page {
        grid-template-columns: 260px 1fr 300px;
        gap: 1rem;
    }
}

@media (max-width: 1200px) {
    .community-detail-page {
        grid-template-columns: 240px 1fr 280px;
    }
}

@media (max-width: 992px) {
    .community-detail-page {
        grid-template-columns: 1fr 300px;
        gap: 1rem;
    }
    
    .community-detail-page .sidebar:first-child {
        display: none;
    }
}

@media (max-width: 768px) {
    .community-detail-page {
        grid-template-columns: 1fr;
    }
    
    .community-detail-page .right-sidebar {
        display: none;
    }
}

/* Moderator Control Panel */
.moderator-panel {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.moderator-panel-header {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.moderator-panel-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.moderator-actions {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mod-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.mod-action-btn:hover {
    background: #f5f5f5;
    border-color: #ff9800;
    color: #ff9800;
    transform: translateX(4px);
}

.mod-action-btn i {
    width: 20px;
    text-align: center;
    color: #ff9800;
}

.mod-quick-stats {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.mod-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mod-stat-item i {
    font-size: 1.2rem;
}

/* Community Header - Reddit Style */
.community-header {
    position: relative;
    color: white;
    padding: 1.5rem 2rem;
    margin-bottom: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.community-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.community-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.community-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Professional Community Icon */
.community-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.community-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.community-details h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.community-name {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.community-description {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
    max-width: 400px;
    line-height: 1.3;
}

.community-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.community-type, .nsfw-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nsfw-badge {
    background-color: rgba(239, 68, 68, 0.8);
}

/* Compact Action Buttons - Reddit Style */
.community-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.community-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    min-width: auto;
    white-space: nowrap;
}

.community-actions .btn-primary {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 1);
    color: #1a73e8;
    font-weight: 600;
    text-shadow: none;
}

.community-actions .btn-primary:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
    color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.community-actions .btn-outline-light {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.community-actions .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.community-actions .dropdown-toggle::after {
    display: none;
}

/* Navigation - Reddit Style */
.community-navigation {
    background-color: white;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-pills {
    display: flex;
    margin: 0;
    padding: 0;
    border: none;
}

.nav-pills .nav-link {
    color: #6b7280;
    border-radius: 0;
    margin: 0;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-pills .nav-link:hover {
    background-color: #f3f4f6;
    color: #1a73e8;
}

.nav-pills .nav-link.active {
    background-color: transparent;
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.sort-options {
    padding: 1rem 1.5rem;
}

.sort-options .form-select {
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background-color: white;
    min-width: 120px;
}

/* Tab Content */
.tab-content {
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Create Post Section */
.create-post-section {
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.create-post-btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 20px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border: none;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
}

.create-post-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.4);
}

/* No Posts Message */
.no-posts-message {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
    margin: 2rem 0;
}

.no-posts-message .icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.no-posts-message h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.no-posts-message p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.no-posts-message .btn {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.no-posts-message .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
    color: white;
}

/* Posts Container */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Post Item - Reddit Style */
.post-item-detailed {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-item-detailed:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.post-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 3rem;
    padding: 0.5rem 0;
}

.vote-button {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.vote-button:hover {
    background-color: #f3f4f6;
}

.vote-button.upvoted {
    color: #ff4500;
}

.vote-button.downvoted {
    color: #7c3aed;
}

.vote-count {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.post-main-content {
    flex: 1;
    min-width: 0;
}

.post-main-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-main-content h3 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}

.post-main-content h3 a:hover {
    color: #1a73e8;
}

.post-excerpt {
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-info {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.post-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: #f3f4f6;
    color: #6b7280;
    border-radius: 12px;
    font-size: 0.7rem;
    text-decoration: none;
    font-weight: 500;
}

.tag:hover {
    background-color: #1a73e8;
    color: white;
}

/* Stats Grid */
.community-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Sidebar Styles */
.sidebar, .right-sidebar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 1.5rem;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.sidebar-section {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

.category-list li a:hover {
    background-color: #f3f4f6;
    color: #1a73e8;
}

.category-list li a.active {
    background-color: #1a73e8;
    color: white;
}

.category-list li a i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
}

.load-more-btn {
    background: transparent;
    border: 2px solid #1a73e8;
    color: #1a73e8;
    padding: 0.75rem 2rem;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background-color: #1a73e8;
    color: white;
    transform: translateY(-1px);
}

/* Ad Sections */
.ad-placeholder, .ad-banner-section {
    background-color: #f8f9fa;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
}

.ad-label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   COMMUNITY INDEX/LIST PAGE
   ========================================= */

.page-wrap {
    padding-block: 1.25rem;
}

.toolbar {
    gap: .75rem;
}

.toolbar .actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.community-card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius, 12px);
    transition: transform .15s ease, box-shadow .15s ease;
    background: var(--card-bg, var(--bs-body-bg));
}

.community-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.community-card .avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.metric {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-size: .875rem;
    border: 1px solid rgba(0,0,0,0.08);
    background: var(--metric-bg, rgba(0,0,0,0.03));
}

/* Ad slot placeholders */
.ad-slot {
    width: 100%;
    min-height: 120px;
    border: 1px dashed rgba(0,0,0,0.2);
    border-radius: var(--radius, 12px);
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.025), rgba(0,0,0,0.025) 10px, rgba(0,0,0,0.05) 10px, rgba(0,0,0,0.05) 20px);
    display: grid;
    place-items: center;
    color: rgba(0,0,0,0.55);
    font-size: .9rem;
}

/* Sidebar blocks */
.side-block {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius, 12px);
    background: var(--card-bg, var(--bs-body-bg));
}

/* Featured list */
.featured-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 0;
}

.featured-item img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

/* UI Controls */
.ui-ctl, .ui-btn {
    height: var(--ui-h, 40px);
    padding: 0 .875rem;
    border-radius: 10px;
}

.form-control.ui-ctl, .form-select.ui-ctl {
    line-height: 1.2;
}

.ui-btn-minw {
    min-width: 120px;
}

.ui-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    line-height: 1;
    overflow: hidden;
}

.ui-btn .label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14ch;
}

.min-w-0 {
    min-width: 0;
}

.toolbar .btn, .toolbar .form-select, .toolbar .form-control {
    border-radius: 10px;
}

.search-wrap {
    position: relative;
}

.search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
    pointer-events: none;
}

.search-wrap input.ui-ctl {
    padding-left: 2.25rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (min-width: 768px) {
    .ui-btn-minw {
        min-width: 140px;
    }
}

@media (max-width: 1200px) {
    .community-detail-page {
        grid-template-columns: 240px 1fr;
    }
    
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .community-detail-page {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .sidebar {
        display: none;
    }
    
    .community-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .community-actions {
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .community-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .community-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-pills {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .community-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-item-detailed {
        flex-direction: column;
    }
    
    .post-stats {
        flex-direction: row;
        justify-content: space-around;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .community-card .card-body {
        padding: .75rem;
    }
    
    .ui-btn .label {
        display: none;
    }
}

/* =========================================
   DARK MODE SUPPORT
   ========================================= */

body.dark-mode .community-detail-page {
    background-color: #111827;
    color: #f9fafb;
}

body.dark-mode .community-header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

body.dark-mode .community-navigation,
body.dark-mode .tab-content,
body.dark-mode .sidebar,
body.dark-mode .right-sidebar,
body.dark-mode .post-item-detailed,
body.dark-mode .stat-card {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-mode .nav-pills .nav-link {
    color: #d1d5db;
}

body.dark-mode .nav-pills .nav-link:hover {
    background-color: #374151;
    color: #60a5fa;
}

body.dark-mode .nav-pills .nav-link.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

body.dark-mode .no-posts-message {
    background-color: #111827;
    border-color: #374151;
}

body.dark-mode .create-post-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: #374151;
}

body.dark-mode .community-card {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-mode .side-block {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-mode .metric {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #374151;
}

/* Sidebar Community List Styling */
.community-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.community-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.community-item:hover {
    background: #e9ecef;
    border-left-color: #0079D3;
    transform: translateX(2px);
}

.community-item.active {
    background: #e7f3ff;
    border-left-color: #0079D3;
    font-weight: 600;
}

.community-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.community-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.community-info {
    flex: 1;
    min-width: 0;
}

.community-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-meta {
    font-size: 11px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.community-meta .badge {
    font-size: 9px;
    padding: 2px 6px;
}

body.dark-mode .community-item {
    background: #2d3748;
    color: #e2e8f0;
}

body.dark-mode .community-item:hover {
    background: #374151;
}

body.dark-mode .community-item.active {
    background: #1e3a5f;
}

body.dark-mode .community-meta {
    color: #a0aec0;
}

body.dark-mode .tag {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #374151;
    color: #d1d5db;
}

body.dark-mode .tag:hover {
    background-color: #1a73e8;
    color: white;
}

/* Rules Styling */
.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.rules-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.rules-actions {
    display: flex;
    gap: 10px;
}

.rules-content {
    margin-bottom: 20px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.rule-item:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.rule-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rule-text {
    flex: 1;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.rule-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.rules-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.rules-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    color: #1565c0;
}

.rules-note i {
    color: #1976d2;
    margin-top: 2px;
    flex-shrink: 0;
}

.no-rules {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-rules-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 15px;
    opacity: 0.7;
}

.no-rules h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-rules p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Dark mode for rules */
body.dark-mode .rules-header {
    border-color: #374151;
}

body.dark-mode .rules-header h3 {
    color: #e2e8f0;
}

body.dark-mode .rule-item {
    background: #2d3748;
    border-color: #374151;
    color: #e2e8f0;
}

body.dark-mode .rule-item:hover {
    background: #374151;
    border-color: #007bff;
}

body.dark-mode .rule-text {
    color: #e2e8f0;
}

body.dark-mode .rules-footer {
    border-color: #374151;
}

body.dark-mode .rules-note {
    background: #1e3a5f;
    border-color: #2563eb;
    color: #93c5fd;
}

body.dark-mode .rules-note i {
    color: #60a5fa;
}

body.dark-mode .no-rules {
    color: #a0aec0;
}

body.dark-mode .no-rules h4 {
    color: #e2e8f0;
}

