/* CSS Variables matching main site */
:root {
    --primary-color: #3e6ae1;
    --primary-hover: #2c5bd9;
    --background-color: #1a1a1a;
    --surface-color: #2a2a2a;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #3a3a3a;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

[data-theme="light"] {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --background-color: #ffffff;
    --surface-color: #f5f5f5;
    --text-color: #212529;
    --text-secondary: #6c757d;
    --border-color: #e0e0e0;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

/* Dark theme to match the main site */
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; 
    margin: 0; 
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    padding-top: 70px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-display: swap;
}
.container { max-width: 1000px; margin: 0 auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
@media (max-width: 768px) { .col-md-6 { flex: 0 0 100%; max-width: 100%; } }

/* Dark theme cards */
.news-item {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--surface-color) !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-height: 1px;
    overflow: hidden;
}
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

/* Header styles are now in /assets/css/style.css with !important */
/* All inline header styles removed to prevent conflicts */

/* Language Menu Overlay */
.language-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2147483646;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-menu-overlay.show {
    display: block;
    opacity: 1;
}

/* Language Menu - Modal */
.language-menu {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    z-index: 2147483647;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.language-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

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

.language-menu-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.language-menu-close {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.language-menu-close:hover {
    color: var(--primary-color);
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 1.5rem;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

.language-switcher {
    position: relative;
}

.language-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    border: 1px solid transparent;
}

.language-item:hover {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.language-item.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-color: var(--primary-color);
}

.language-name {
    color: inherit;
    font-size: 0.95rem;
    white-space: nowrap;
}

.language-emoji {
    font-size: 1.2rem;
    line-height: 1;
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Header controls styling (for content, not main header) - from view.php */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.language-selector-header {
    margin-left: 10px;
}

/* Navigation buttons dark theme */
.btn-outline-primary {
    color: white;
    border-color: var(--primary-color);
    background: transparent;
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-outline-primary:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Remove old language selector styles */
.language-selector {
    display: none;
}

.flag-icon {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    flex-shrink: 0;
}

.language-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.language-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Footer Styles */
.main-footer {
    background-color: var(--surface-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.footer-section h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.footer-bottom p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links a:hover {
    color: var(--primary-color) !important;
}

.privacy-consent {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 20px);
    background-color: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--text-color);
    width: min(90%, 700px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 12000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.privacy-consent.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.privacy-consent__text {
    flex: 1;
}
.privacy-consent__title {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}
.privacy-consent__description {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.privacy-consent__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.privacy-consent__actions .btn {
    min-width: 140px;
}
@media (max-width: 600px) {
    .privacy-consent {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .privacy-consent__actions {
        width: 100%;
    }
    .privacy-consent__actions .btn {
        flex: 1;
    }
}

/* Mobile fixes - header styles are now in /assets/css/style.css */
/* All inline header styles removed to prevent conflicts */

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    body {
        padding-top: 60px;
    }
    
    header {
        padding: 10px 15px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    /* Hide only logo and title on mobile */
    header .d-flex:first-child .d-flex:first-child {
        display: none !important;
    }
    
    /* Make header single column on mobile */
    header .d-flex:first-child {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Beautiful ONE ROW mobile navigation */
    .header-controls {
        width: 100%;
        justify-content: center;
        gap: 4px;
        flex-wrap: nowrap !important;
        display: flex !important;
    }
    
    .header-controls > a,
    .language-selector-header .language-toggle {
        flex: 1;
        min-width: 0;
        max-width: none;
        padding: 8px 4px;
        font-size: 0.7rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border-radius: 5px;
        border: 1px solid var(--primary-color);
        background: transparent;
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
        font-weight: 500;
        white-space: nowrap;
    }
    
    .header-controls > a:hover,
    .language-selector-header .language-toggle:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(62, 106, 225, 0.3);
    }
    
    .language-selector-header {
        margin-left: 0;
        margin-top: 0;
    }
    
    .language-menu {
        padding: 60px 20px 20px 20px;
    }
    
    .language-menu .container {
        min-height: auto;
        height: auto;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .language-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        max-width: 500px;
        width: 100%;
        margin: 0 auto;
    }
    
    .container {
        padding: 0 8px;
    }
    
    article header h1 {
        font-size: 1.5rem;
        text-align: center;
        color: var(--text-color);
    }
    
    .breadcrumb {
        justify-content: center;
        flex-wrap: wrap;
        background-color: var(--surface-color);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.75rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    footer .row {
        text-align: center;
    }
    
    footer .footer-links {
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 15px !important;
    }
    
    footer .col-md-6:first-child {
        order: 2;
        margin-bottom: 0 !important;
        margin-top: 1rem;
    }
    
    footer .col-md-6:last-child {
        order: 1;
    }
    
    footer .footer-links a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-header {
        height: 60px;
    }
    
    body {
        padding-top: 60px;
    }
    
    .language-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        gap: 12px;
    }
    
    .language-item {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .language-name {
        font-size: 15px;
    }
    
    .language-emoji {
        width: auto;
        font-size: 1rem;
    }
    
    .container {
        padding: 0 6px;
    }
    
    header {
        padding: 4px 4px;
        margin-bottom: 15px;
    }
    
    .header-controls {
        gap: 3px;
    }
    
    .header-controls > a,
    .language-selector-header .language-toggle {
        padding: 6px 3px;
        font-size: 0.65rem;
        gap: 1px;
    }
    
    .language-menu {
        padding: 80px 15px 20px 15px;
    }
    
    .language-menu .container {
        padding: 0;
    }
    
    article header h1 {
        font-size: 1.3rem;
    }
    
    .version-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.5rem;
        display: inline-block;
    }
    
    .text-muted {
        font-size: 0.9rem;
    }
    
    footer .footer-links {
        gap: 10px !important;
    }
    
    footer .footer-links a {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    footer .text-muted {
        font-size: 0.85rem;
    }
}

/* Dark theme elements */
.card {
    background-color: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
}

/* Prevent CLS (Cumulative Layout Shift) */
.card-img-top {
    width: 100%;
    height: auto;
    aspect-ratio: 600 / 200;
    object-fit: cover;
    display: block;
    background-color: var(--surface-color);
}

.card-body {
    min-height: 1px;
    background-color: var(--surface-color) !important;
    color: var(--text-color) !important;
}

/* Fix for ad containers to prevent CLS */
ins.adsbygoogle {
    display: block !important;
    min-height: 100px;
    background-color: var(--surface-color);
}

.card-title {
    color: var(--text-color) !important;
}

.card-text {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.card-footer {
    background-color: var(--surface-color) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Fix Bootstrap list groups */
.list-group {
    background-color: transparent !important;
}

.list-group-item {
    background-color: var(--surface-color) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

.list-group-flush .list-group-item {
    background-color: transparent !important;
    border-color: var(--border-color) !important;
}

/* Fix any remaining white backgrounds */
.bg-white {
    background-color: var(--surface-color) !important;
}

.bg-light {
    background-color: var(--surface-color) !important;
}

/* Ensure news items are properly styled */
.news-item * {
    background-color: inherit !important;
}

.news-item .card,
.news-item .card-body,
.news-item .card-header,
.news-item .card-footer {
    background-color: var(--surface-color) !important;
    color: var(--text-color) !important;
}

.version-badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    background-color: rgba(62, 106, 225, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(62, 106, 225, 0.3);
    border-radius: 5px;
}

/* Badges */
.badge.bg-success {
    background-color: var(--success-color) !important;
    color: white !important;
}
.badge.bg-warning {
    background-color: #f39c12 !important;
    color: white !important;
}
.badge.bg-secondary {
    background-color: var(--text-secondary) !important;
    color: white !important;
}
.badge.bg-info {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Main Version badge styling */
.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
    color: white !important;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(62, 106, 225, 0.3);
}

/* Button styling */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-primary,
.btn-primary[itemprop],
.btn.btn-primary,
.btn.btn-primary[itemprop] {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    border-radius: 5px !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
}
.btn-primary:hover,
.btn-primary[itemprop]:hover,
.btn.btn-primary:hover,
.btn.btn-primary[itemprop]:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: white !important;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
}
.btn-success:hover {
    background-color: #27ae60;
    border-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Star rating and voting */
.star-rating {
    display: flex !important;
    gap: 3px;
    flex-shrink: 0;
    align-items: center;
}
.star-rating .star {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.star-rating .star.selected,
.star-rating .star.hovered {
    color: #ffc107;
}
.vote-block {
    background-color: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
}
.vote-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--text-color) !important;
    text-align: center;
}
.vote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    color: var(--text-color) !important;
    flex-wrap: nowrap;
}
.vote-row span {
    font-size: 0.8rem;
    min-width: 70px;
    flex-shrink: 0;
}
.vote-aggregate {
    margin-top: 1rem;
    font-size: 0.5rem;
    color: var(--text-color) !important;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.2;
    word-spacing: 1px;
}
.vote-aggregate .fa-star {
    color: #ffc107;
    font-size: 0.6rem;
    margin: 0 1px;
}
.vote-message {
    font-size: 0.85rem;
    color: var(--text-secondary) !important;
    text-align: center;
    margin-top: 0.5rem;
}

.news-item .vote-block {
    background-color: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    margin: 1rem 0 0 0;
    padding: 1rem;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}
.page-link {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 5px;
}
.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.page-item.disabled .page-link {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Mobile improvements */
@media (max-width: 600px) {
    .star-rating .star {
        font-size: 1rem;
    }
    .vote-row {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .btn-outline-primary {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .other-bug-fixes-section {
        padding: 1rem 0.5rem;
    }
    header {
        padding: 10px 15px;
    }
    
    /* Fix vote block on mobile */
    .vote-block {
        margin: 1rem -0.5rem 0 -0.5rem;
        border-radius: 8px;
        padding: 1rem;
    }
    
    .vote-row {
        font-size: 0.9rem;
    }
    
    .star-rating .star {
        font-size: 1.0rem;
        margin-right: 0.05rem;
    }
}

/* Page Header styling */
.page-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
    padding: 2rem 0 !important;
}

.page-header h1 {
    font-size: 3rem !important;
    font-weight: 700 !important;
    margin: 0 auto 1.5rem auto !important;
    color: var(--text-color) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.page-header h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 auto !important;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center !important;
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
}

/* Logo and title styling (for header) */
header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    margin: 0;
}

header h1 img {
    height: 35px;
    width: auto;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    margin: 0;
}

h1 img {
    height: 35px;
    width: auto;
}

/* News item content styling */
.news-item .card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-item .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-item .card-text {
    flex-grow: 1;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.news-item .card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Image styling */
.news-item img {
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    width: 100%;
    object-position: center;
}

.news-item .card-img-top {
    height: auto;
    min-height: 200px;
}

.news-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

/* Feature styling */
.feature-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    margin-top: 0.8rem;
}

.feature-title:first-child {
    margin-top: 0;
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

/* Latest Tesla News Section Styles */
.latest-tesla-news {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.tesla-news-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tesla-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(62, 106, 225, 0.15);
    border-color: var(--primary-color);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.news-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.95rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.news-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-date i {
    color: var(--primary-color);
}

.read-more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more-link:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

.read-more-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(2px);
}

/* Mobile responsive for Tesla news */
@media (max-width: 768px) {
    .latest-tesla-news {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .tesla-news-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .read-more-link {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .latest-tesla-news {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .tesla-news-card {
        padding: 1rem;
    }
    
    .news-title a {
        font-size: 1rem;
    }
    
    .news-excerpt {
        font-size: 0.9rem;
    }
}

/* Tesla Stock Section Styles */
.tesla-stock-section {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.stock-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.stock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(62, 106, 225, 0.15);
    border-color: var(--primary-color);
}

/* Price Card Styles */
.price-card .stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stock-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.stock-exchange {
    background-color: rgba(62, 106, 225, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: block;
    line-height: 1;
}

.price-change {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-change.positive {
    color: #4caf50;
}

.price-change.negative {
    color: #f44336;
}

.stock-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Chart Card Styles */
.chart-card .chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 200px;
    min-height: 200px;
    width: 100%;
}

#teslaChart {
    width: 100% !important;
    height: 100% !important;
}

/* Stats Card Styles */
.stats-card .stats-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Mobile responsive for stock section */
@media (max-width: 768px) {
    .tesla-stock-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .stock-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .price-change {
        font-size: 0.9rem;
    }
    
    .chart-container {
        height: 150px;
    }
    
    .stats-grid {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .tesla-stock-section {
        padding: 1rem;
    }
    
    .stock-card {
        padding: 1rem;
    }
    
    .current-price {
        font-size: 1.8rem;
    }
    
    .stock-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .chart-container {
        height: 120px;
    }
    
    .stat-item {
        padding: 0.4rem 0;
    }
    
    .stat-label,
    .stat-value {
        font-size: 0.8rem;
    }
}

/* View.php specific styles */
/* Dark theme elements */
.related-version {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-top: 1rem;
}
.related-version .card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}

/* Release notes grid layout */
.release-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .release-notes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .release-notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ensure content doesn't overflow */
.content {
    overflow-x: hidden;
    margin-top: 2rem;
}

.release-note {
    margin-bottom: 0;
    padding: 1.5rem;
    border-radius: 10px;
    background-color: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    break-inside: avoid;
    page-break-inside: avoid;
}

.release-note:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.release-note h3 {
    color: var(--primary-color) !important;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.release-note > * {
    flex-shrink: 0;
}

.release-note p {
    margin-bottom: 0.75rem;
    color: var(--text-color) !important;
    line-height: 1.6;
}

.release-note ul,
.release-note ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    color: var(--text-color) !important;
}

.release-note li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.release-note img {
    width: 100%;
    height: auto;
    max-height: 300px;
    margin-bottom: 1rem;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Alert styling */
.alert-info {
    background-color: rgba(62, 106, 225, 0.1);
    border: 1px solid rgba(62, 106, 225, 0.3);
    color: var(--primary-color);
    border-radius: 8px;
}

/* Fix card border radius and styling issues */
.bug-fix-card {
    background-color: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px;
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}
.bug-fix-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}
.bug-fix-card .card-title {
    color: var(--text-color) !important;
}
.bug-fix-card .card-text {
    color: var(--text-color) !important;
}
.bug-fix-card .card-body {
    background-color: var(--surface-color) !important;
}
.bug-fix-card .card-img-top {
    border-radius: 10px 10px 0 0;
}

.bug-fix-item {
    margin-left: 2rem;
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
    margin-top: 1rem;
}
.bug-fix-item .card {
    background-color: #f8f9fa;
}

/* Breadcrumb styling for dark theme */
.breadcrumb {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.breadcrumb-item a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 500;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-secondary);
    content: var(--bs-breadcrumb-divider, "/");
    margin: 0 0.5rem;
}

/* Article header styling */
article header {
    margin-bottom: 2rem;
}
article header h1 {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-size: 1.8rem;
}
.text-muted i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Success and error message colors */
.text-success {
    color: #4caf50 !important;
}
.text-danger {
    color: #f44336 !important;
}

/* Additional styles from index.php second style block */
@media (max-width: 480px) {
    .d-flex.gap-2 {
        flex-wrap: wrap;
        gap: 8px !important;
    }
    .btn-outline-primary {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 0.75rem;
        padding: 8px 10px;
    }
}

