/* badsadtheme.css - BadSad Apocalyptic Dark Theme */
/* Combining Dark Forest Aesthetic with Modern Dark Design */

:root {
    /* BadSad Dark Palette - Forest/Apocalyptic */
    --bg-dark: #0a0e0a;
    --bg-medium: #131813;
    --bg-light: #1c231c;
    --text-primary: #b8c5b8;
    --text-secondary: #778877;
    --text-muted: #556655;
    
    /* Primary Colors - Survival Green */
    --primary-color: #4a7c59;
    --primary-dark: #2d4d37;
    --primary-light: #5a8c69;
    
    /* Accent Colors */
    --accent-rust: #c67c3b;
    --accent-orange: #d67c3b;
    --accent-red: #8b2e2e;
    --accent-blue: #3d6a7e;
    --accent-green: #4a7c59;
    
    /* Status Colors */
    --status-working: #5a8a5a;
    --status-partial: #b8914a;
    --status-broken: #8b4545;
    --status-untested: #5a6a7a;
    
    /* UI Elements */
    --border-color: #2a332a;
    --border-light: #3a4a3a;
    --card-bg: #131813;
    --success-color: #5a8a5a;
    --warning-color: #d67c3b;
    
    /* Legacy compatibility */
    --zombie-green: #4a7c59;
    --zombie-green-dark: #2d4d37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Atmospheric Effects - Subtle scanlines and vignette */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 9998;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background: linear-gradient(180deg, rgba(19, 24, 19, 0.95) 0%, rgba(19, 24, 19, 0.98) 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6), 0 0 20px rgba(74, 124, 89, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 30px;
    padding: 0 20px;
    margin: 0 auto;
}

.site-branding {
    flex-shrink: 0;
    white-space: nowrap;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

.site-title a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-shadow: 0 0 15px rgba(74, 124, 89, 0.5), 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(74, 124, 89, 0.2));
}

.site-title a:hover {
    text-shadow: 0 0 25px rgba(74, 124, 89, 0.7), 2px 2px 4px rgba(0,0,0,0.8);
    filter: drop-shadow(0 0 10px rgba(74, 124, 89, 0.4));
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--primary-color);
    background: rgba(74, 124, 89, 0.1);
    text-shadow: 0 0 10px rgba(74, 124, 89, 0.3);
}

/* Dropdown menu for nested pages */
.main-nav li {
    position: relative;
}

.main-nav .has-dropdown > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

.main-nav .dropdown-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 200px;
    padding: 10px 0;
    margin-top: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    list-style: none;
}

.main-nav .has-dropdown:hover .dropdown-submenu {
    display: block;
}

.main-nav .dropdown-submenu li {
    display: block;
}

.main-nav .dropdown-submenu a {
    display: block;
    padding: 10px 20px;
    border-radius: 0;
    background: transparent;
}

.main-nav .dropdown-submenu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.user-dropdown {
    position: relative;
}

.user-trigger {
    background: none;
    border: 2px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    color: var(--text-primary);
}

.user-trigger:hover {
    border-color: var(--primary-color);
    background: rgba(74, 124, 89, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border-radius: 8px;
    min-width: 180px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Site Banner */
.site-banner {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-bottom: 2px solid var(--border-color);
}

.site-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(28, 35, 28, 0.6) 0%, rgba(19, 24, 19, 0.8) 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(74, 124, 89, 0.6), 0 0 40px rgba(74, 124, 89, 0.3), 2px 2px 6px rgba(0,0,0,0.9);
    font-weight: 900;
    letter-spacing: 2px;
    filter: drop-shadow(0 0 10px rgba(74, 124, 89, 0.4));
    animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.hero h2, .hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin: 40px 0;
}

.main-content {
    min-width: 0;
}

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: linear-gradient(135deg, var(--bg-medium) 0%, rgba(28, 35, 28, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.02);
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(74, 124, 89, 0.2), 0 4px 12px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, rgba(28, 35, 28, 0.9) 0%, var(--bg-medium) 100%);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-dark);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

/* Responsive image scaling */
img {
    max-width: 100%;
    height: auto;
}

.post-content img,
article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 8px;
}

.post-content {
    padding: 20px;
}

.post-content h2 {
    margin-bottom: 12px;
    font-size: 22px;
}

.post-content h2 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.post-content h2 a:hover {
    color: var(--primary-light);
    text-shadow: 0 0 8px rgba(74, 124, 89, 0.3);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    align-items: center;
}

.post-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--primary-light);
}

/* Avatars */
.avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 8px rgba(74, 124, 89, 0.2);
}

/* Single Post */
.post-single, .page-single {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.post-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 30px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

.post-header h1, .page-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(74, 124, 89, 0.3);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-name {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.author-name:hover {
    color: var(--primary-light);
}

.post-categories {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.category-badge {
    background: var(--primary-color);
    color: #e8f0e8;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(74, 124, 89, 0.3);
}

.category-badge:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 10px rgba(74, 124, 89, 0.5);
}

.post-body, .page-content {
    margin: 30px 0;
    line-height: 1.8;
    font-size: 17px;
    color: var(--text-primary);
}

.post-body img, .page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-footer {
    padding: 30px;
    border-top: 1px solid var(--border-color);
    background: rgba(19, 24, 19, 0.5);
}

.author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid var(--border-color);
}

/* Comments */
.comments-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 15px;
    background: var(--bg-dark);
    color: var(--text-primary);
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(74, 124, 89, 0.2);
}

.comments-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.comment-author:hover {
    color: var(--primary-light);
}

.comment-date {
    font-size: 13px;
    color: var(--text-muted);
}

.comment-body {
    margin-top: 8px;
    color: var(--text-primary);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.widget h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: var(--primary-color);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text-primary);
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(74, 124, 89, 0.2);
}

.search-form button {
    padding: 10px 15px;
    background: var(--primary-color);
    color: #e8f0e8;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.search-form button:hover {
    background: var(--primary-light);
    box-shadow: 0 0 10px rgba(74, 124, 89, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #e8f0e8;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(74, 124, 89, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.6), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-medium) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--border-light) 0%, var(--bg-light) 100%);
    border-color: var(--primary-color);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
}

/* Profile */
.profile-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.profile-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.profile-avatar {
    margin-bottom: 20px;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(74, 124, 89, 0.3);
}

.role-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.role-admin { 
    background: var(--accent-red); 
    color: white;
    box-shadow: 0 2px 8px rgba(139, 46, 46, 0.4);
}

.role-supporter { 
    background: var(--accent-orange); 
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(214, 124, 59, 0.4);
}

.role-user { 
    background: var(--text-muted); 
    color: white;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.profile-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.profile-info {
    text-align: left;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.profile-info p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-bio {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.profile-bio h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.profile-bio p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

/* Profile Posts Section - Full Width */
.profile-posts-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-bottom: 40px;
}

.profile-posts-section h3 {
    color: var(--primary-light);
    margin-bottom: 25px;
    font-size: 26px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(74, 124, 89, 0.5);
    letter-spacing: 0.5px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-dark);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(74, 124, 89, 0.2);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(90, 138, 90, 0.2);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
    box-shadow: 0 2px 8px rgba(90, 138, 90, 0.2);
}

.alert-error {
    background: rgba(139, 46, 46, 0.2);
    color: var(--accent-red);
    border-left: 4px solid var(--accent-red);
    box-shadow: 0 2px 8px rgba(139, 46, 46, 0.2);
}

.alert-info {
    background: rgba(74, 124, 89, 0.2);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state a {
    color: var(--primary-color);
}

.empty-state a:hover {
    color: var(--primary-light);
}

/* Footer */
.site-footer {
    background: var(--bg-medium);
    color: var(--text-primary);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    opacity: 0.8;
}

/* Static overrides for consistent behavior across all pages */
.content-wrapper {
    max-width: 100%;
}

.post-single,
.page-single {
    max-width: 100% !important;
}

/* Override browser default visited link color for site title */
.site-title a,
.site-title a:visited,
.site-title a:hover,
.site-title a:active,
.site-branding a,
.site-branding a:visited {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

/* Image Alignment Styles */
.img-left {
    float: left;
    margin: 0.5em 1em 0.5em 0;
    max-width: 50%;
}

.img-right {
    float: right;
    margin: 0.5em 0 0.5em 1em;
    max-width: 50%;
}

.img-center {
    display: block !important;
    margin: 1em auto !important;
    max-width: 80%;
    float: none !important;
}

.img-block {
    display: block !important;
    margin: 1em 0 !important;
    clear: both !important;
    float: none !important;
}

/* Video Container Styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1em 0;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Alignment Classes */
.video-left {
    float: left;
    width: 50%;
    margin: 0.5em 1em 0.5em 0;
    padding-bottom: 28.125%;
}

.video-right {
    float: right;
    width: 50%;
    margin: 0.5em 0 0.5em 1em;
    padding-bottom: 28.125%;
}

.video-center {
    width: 80%;
    margin: 1em auto;
    padding-bottom: 45%;
}

.video-full {
    width: 100%;
    margin: 1em 0;
    padding-bottom: 56.25%;
}

/* Lightbox for Images */
.post-body img, .page-body img {
    cursor: pointer;
    transition: opacity 0.2s;
}

.post-body img:hover, .page-body img:hover {
    opacity: 0.9;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1000000;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 4px;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.7);
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .profile-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Supporter lock page styling */
.supporter-lock a {
    color: var(--text-primary);
    text-decoration: none;
}

.supporter-lock a.btn,
.supporter-lock a.btn-primary,
.supporter-lock a.btn-secondary,
.supporter-lock a.btn-sm {
    display: inline-block;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero h2, .hero p {
        font-size: 1rem;
    }
    
    .post-single, .page-single {
        padding: 20px;
    }
    
    .comments-section {
        padding: 20px;
    }
    
    .profile-posts-section {
        padding: 20px;
    }
    
    .profile-card,
    .profile-content {
        padding: 20px;
    }
}

/* ============================================
   POLL SYSTEM STYLES
   ============================================ */

/* Vote Button */
.vote-button,
.poll-vote-btn,
button[type="submit"].vote-button {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #e8f0e8;
    border: 1px solid rgba(74, 124, 89, 0.3);
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    margin-top: 15px;
}

.vote-button:hover,
.poll-vote-btn:hover,
button[type="submit"].vote-button:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.6), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.vote-button:disabled,
.poll-vote-btn:disabled {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

/* Poll Options */
.poll-options,
.poll-widget-options {
    margin: 20px 0;
}

.poll-option,
.poll-option-label {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.poll-option:hover,
.poll-option-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-medium);
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.2);
}

.poll-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.poll-option input[type="radio"],
.poll-option input[type="checkbox"],
.poll-option-label input {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.poll-option.selected,
.poll-option-label:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(74, 124, 89, 0.15);
}

/* Poll Cards */
.poll-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Poll Results */
.poll-results,
.poll-widget-results {
    margin: 20px 0;
}

.result-option,
.poll-result-item {
    margin-bottom: 18px;
}

.result-header,
.poll-result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.result-text {
    font-weight: 500;
}

.result-stats,
.poll-result-stats {
    color: var(--text-secondary);
    font-weight: 600;
}

.result-bar,
.poll-result-bar {
    height: 32px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.result-fill,
.poll-result-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #e8f0e8;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.result-fill.voted,
.poll-result-fill.voted {
    background: linear-gradient(90deg, var(--accent-green), var(--primary-color));
}

/* Poll Messages */
.poll-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid;
}

.message-info,
.poll-info {
    background: rgba(61, 106, 126, 0.2);
    color: #7db4d4;
    border-color: var(--accent-blue);
}

.message-success,
.poll-success {
    background: rgba(90, 138, 90, 0.2);
    color: #8bc88b;
    border-color: var(--status-working);
}

.message-error,
.poll-ended {
    background: rgba(139, 69, 69, 0.2);
    color: #d48b8b;
    border-color: var(--status-broken);
}

.poll-message a {
    color: inherit;
    text-decoration: underline;
    font-weight: bold;
}

/* Poll Meta */
.poll-meta,
.poll-widget-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.poll-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-active,
.poll-status-active {
    background: rgba(90, 138, 90, 0.2);
    color: #8bc88b;
    border-color: var(--status-working);
}

.badge-closed,
.poll-status-closed {
    background: rgba(139, 69, 69, 0.2);
    color: #d48b8b;
    border-color: var(--status-broken);
}

.badge-draft {
    background: rgba(90, 106, 122, 0.2);
    color: #8ba4c4;
    border-color: var(--status-untested);
}

.badge-supporter {
    background: rgba(198, 124, 59, 0.2);
    color: #e8a857;
    border-color: var(--accent-rust);
}

/* Poll Widget (Embedded) */
.poll-widget {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.poll-widget-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.poll-widget-title {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.poll-widget-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.6;
}

.poll-widget-locked,
.poll-widget-error {
    padding: 20px;
    text-align: center;
    border-radius: 6px;
    margin: 15px 0;
}

.poll-widget-locked {
    background: rgba(198, 124, 59, 0.2);
    color: #e8a857;
    border: 1px solid var(--accent-rust);
}

.poll-widget-error {
    background: rgba(139, 69, 69, 0.2);
    color: #d48b8b;
    border: 1px solid var(--status-broken);
}

/* Poll Description */
.poll-description {
    margin: 15px 0 20px;
    padding: 15px;
    background: var(--bg-light);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* No Polls State */
.no-polls {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-polls h3 {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* Responsive Poll Styles */
@media (max-width: 768px) {
    .poll-card,
    .poll-widget {
        padding: 20px 15px;
    }
    
    .poll-option,
    .poll-option-label {
        padding: 12px;
    }
    
    .result-bar,
    .poll-result-bar {
        height: 28px;
    }
    
    .vote-button,
    .poll-vote-btn {
        padding: 12px 20px;
    }
}

/* ============================================
   PROFILE POSTS SECTION
   ============================================ */

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-item {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.post-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(74, 124, 89, 0.3);
    transform: translateY(-2px);
}

.post-thumbnail {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-dark);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.08);
}

.post-info {
    flex: 1;
    padding: 20px;
    padding-left: 0;
}

.post-info h4 {
    margin: 0 0 12px 0;
    font-size: 22px;
    line-height: 1.3;
}

.post-info h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.post-info h4 a:hover {
    color: var(--primary-light);
    text-shadow: 0 0 10px rgba(74, 124, 89, 0.4);
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Profile Posts Responsive */
@media (max-width: 768px) {
    .post-item {
        flex-direction: column;
        gap: 0;
    }
    
    .post-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .post-info {
        padding: 15px;
    }
    
    .post-info h4 {
        font-size: 18px;
    }
}
