/* 419Eater.com Modern CSS Framework */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #4A6184 0%, #5C7099 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.logo img {
    max-width: 223px;
    height: auto;
}

/* Navigation */
.nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ffffff;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.footer-info a {
    color: #3498db;
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #3498db;
    transform: translateY(-2px);
}

/* Accessibility improvements */
.using-keyboard *:focus {
    outline: 2px solid #3498db !important;
    outline-offset: 2px !important;
}

/* Lazy loading placeholder */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* New Layout Styles */
.ad-section {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.scam-alert {
    color: #dc3545;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}

.scam-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.scam-tracker-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.social-integration {
    text-align: center;
    margin: 30px 0;
}

.google-plus {
    margin-top: 20px;
}

.intro-section h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.explanation {
    line-height: 1.7;
    font-size: 1.1rem;
}

.important-links {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.forum-header {
    text-align: center;
    background: #C6D3E7;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.forum-header a {
    color: #4A6D9C;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.forum-footer {
    text-align: center;
    background: #4A6184;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}

.forum-footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.forum-footer a:hover {
    text-decoration: underline;
}

.thread-author a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.thread-author a:hover {
    text-decoration: underline;
}

.ip-tracker-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.news-link {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1rem;
}

.news-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.news-link a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.scam-tracker {
    margin: 30px 0;
}

.scam-tracker img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Content Sections */
.content-section {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.content-section h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.content-section p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.7;
}

.content-section a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.content-section a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Forum Section */
.forum-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    color: white;
}

.forum-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.forum-threads {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.thread-item {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    transition: background 0.3s ease;
}

.thread-item:hover {
    background: rgba(255,255,255,0.1);
}

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

.thread-meta {
    width: 200px;
    flex-shrink: 0;
    padding-right: 20px;
    font-size: 0.9rem;
}

.thread-content {
    flex: 1;
}

.thread-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.thread-title a {
    color: white;
    text-decoration: none;
}

.thread-title a:hover {
    text-decoration: underline;
}

.thread-text {
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.5;
}

.thread-stats {
    margin-top: 5px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108,117,125,0.4);
}

/* Donation Section */
.donation-section {
    text-align: center;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
}

.donation-section img {
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-info {
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 9999;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .main-nav.nav-open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-link {
        display: block;
        padding: 20px;
        width: 100%;
        text-align: left;
        font-size: 1.1rem;
    }

    .header-content {
        justify-content: space-between;
    }

    .logo {
        margin-right: 0;
    }

    .logo img {
        max-width: 180px;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .thread-item {
        flex-direction: column;
        text-align: left;
    }

    .thread-meta {
        width: 100%;
        padding-right: 0;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .content-section {
        padding: 15px;
    }

    .forum-section {
        padding: 20px;
    }

    .thread-item {
        padding: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .header {
        border-bottom: 2px solid #000;
    }

    .content-section {
        border: 2px solid #000;
    }

    .thread-item {
        border-bottom: 2px solid rgba(255,255,255,0.3);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .content-section {
        background: #2d2d2d;
        border-color: #404040;
    }

    .content-section p {
        color: #ccc;
    }
}

/* Performance optimizations */
.header,
.content-section,
.forum-section,
.donation-section {
    contain: layout style;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-5 { margin-bottom: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.bg-primary { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); }
.bg-secondary { background: linear-gradient(135deg, #6c757d 0%, #545b62 100%); }
.bg-success { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.bg-danger { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.bg-warning { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); }
.bg-info { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); }

.text-primary { color: #007bff; }
.text-secondary { color: #6c757d; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }

.rounded { border-radius: 0.375rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-circle { border-radius: 50%; }

.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075); }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15); }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,0.175); }

/* Letters Page Styles */
.filter-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.filter-info {
    margin-top: 1rem;
    color: #6c757d;
    font-style: italic;
}

.page-info-container {
    text-align: center;
    margin: 1rem 0;
}

.page-info-display {
    color: #6c757d;
    font-weight: 500;
}

.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.letter-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.letter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.letter-card.featured {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

.letter-card.featured:hover {
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.3);
}

.card-header {
    padding: 1rem 1rem 0.5rem;
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.featured {
    background: #0066cc;
    color: white;
}

.badge.category {
    background: #6c757d;
    color: white;
    background-image: none; /* Remove any gradients */
}

.badge.category.religious-scam { background: #28a745; color: white; background-image: none; }
.badge.category.art-media-scam { background: #17a2b8; color: white; background-image: none; }
.badge.category.financial-scam { background: #dc3545; color: white; background-image: none; }
.badge.category.educational-scam { background: #ffc107; color: white; background-image: none; }
.badge.category.political-scam { background: #6f42c1; color: white; background-image: none; }
.badge.category.phone-scam { background: #fd7e14; color: white; background-image: none; }
.badge.category.general-scam { background: #6c757d; color: white; background-image: none; }
.badge.category.exposure { background: #e83e8c; color: white; background-image: none; }

.badge.parts {
    background: #495057;
    color: white;
}

.card-content {
    padding: 1rem;
}

.letter-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.letter-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.letter-title a:hover {
    color: #0066cc;
}

.letter-meta {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.letter-description {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.parts-list {
    background: #e9ecef;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.parts-list h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.parts-list ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.parts-list li {
    margin: 0.25rem 0;
    position: relative;
}

.parts-list li::before {
    content: "▶";
    position: absolute;
    left: -1rem;
    color: #0066cc;
    font-size: 0.8rem;
}

.parts-list a {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9rem;
}

.parts-list a:hover {
    text-decoration: underline;
}

.card-footer {
    padding: 1rem;
    background: #f8f9fa;
    text-align: center;
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-btn.active {
    background: #0066cc;
    border-color: #0066cc;
    color: white;
}

.pagination-btn.btn-primary {
    background: #0066cc;
    border-color: #0066cc;
    color: white;
}

.pagination-btn.btn-primary:hover {
    background: #004499;
    border-color: #004499;
}

.pagination-btn.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.pagination-btn.btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .letters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .pagination-container {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}