* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background: linear-gradient(180deg, #2e1a6b 0%, #5b3fbf 100%);
    color: #f0eaff;
}

body.dark-mode .navbar {
    background: linear-gradient(135deg, #3a225f 0%, #5b3fbf 100%);
}

body.dark-mode main {
    background: linear-gradient(180deg, rgba(46,26,107,0.6), rgba(91,63,191,0.6));
    color: #f0eaff;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, rgba(58,34,95,0.9) 0%, rgba(91,63,191,0.9) 100%);
}

body.dark-mode .toc-card {
    background: rgba(48,24,72,0.6);
    border-left-color: #b894ff;
}

body.dark-mode .tool-card,
body.dark-mode .threat-card,
body.dark-mode .info-box {
    background: rgba(48,24,72,0.6);
    color: #f0eaff;
}

body.dark-mode .contact-form-section {
    background: rgba(48,24,72,0.6);
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode footer {
    background: #1a1a1a;
}

/* Classic dark variant overrides (black background) */
body.dark-mode[data-theme="classic"] {
    background-color: #0f0f11;
    color: #e6e6e6;
}

body.dark-mode[data-theme="classic"] .navbar {
    background: linear-gradient(135deg, #0b0b0d 0%, #202024 100%);
}

body.dark-mode[data-theme="classic"] main {
    background: #121212;
    color: #e6e6e6;
}

body.dark-mode[data-theme="classic"] .hero {
    background: linear-gradient(135deg, #141418 0%, #26262a 100%);
}

body.dark-mode[data-theme="classic"] .toc-card,
body.dark-mode[data-theme="classic"] .tool-card,
body.dark-mode[data-theme="classic"] .threat-card,
body.dark-mode[data-theme="classic"] .info-box,
body.dark-mode[data-theme="classic"] .resource-card {
    background: #1b1b1b;
    color: #e6e6e6;
    border-left-color: #667eea;
}

body.dark-mode[data-theme="classic"] .contact-form-section {
    background: #1b1b1b;
}

body.dark-mode[data-theme="classic"] .form-group input,
body.dark-mode[data-theme="classic"] .form-group textarea {
    background: #0f0f11;
    color: #e6e6e6;
    border-color: #333;
}

body.dark-mode[data-theme="classic"] footer {
    background: #0b0b0d;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s, transform 0.2s;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
main {
    background: white;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

/* Article Header */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #667eea;
}

.article-header h1 {
    font-size: 2.2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Home Section */
.home-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.home-section > p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #555;
}

/* Table of Contents Grid */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.toc-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
}

.toc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.toc-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.toc-card h3 {
    margin-bottom: 0.5rem;
}

.toc-card a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.toc-card a:hover {
    text-decoration: underline;
}

.toc-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Info Section */
.info-section {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
}

.info-section h2 {
    color: #764ba2;
    margin-bottom: 1rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.content-section h3 {
    color: #764ba2;
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.content-section h4 {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: #555;
}

.content-section p {
    margin-bottom: 1rem;
    color: #555;
    text-align: justify;
}

/* Tools Container */
.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tool-card h4 {
    color: #667eea;
    margin-bottom: 0.8rem;
}

.tool-card p {
    color: #666;
    font-size: 0.95rem;
    text-align: justify;
}

/* Definitions */
.definitions {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.definitions dl {
    margin: 0;
}

.definitions dt {
    color: #667eea;
    font-weight: bold;
    margin-top: 1rem;
}

.definitions dt:first-child {
    margin-top: 0;
}

.definitions dd {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #555;
}

/* Conclusion Section */
.conclusion-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.conclusion-section p {
    font-size: 1.05rem;
    color: #333;
}

/* Threat Cards */
.threat-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.threat-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.threat-details {
    display: grid;
    gap: 1rem;
}

.threat-section {
    padding: 0.8rem 0;
}

.threat-section h4 {
    color: #764ba2;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.threat-section p {
    color: #555;
    font-size: 0.95rem;
    text-align: justify;
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.contact-form-section {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.contact-form-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info h2 {
    color: #667eea;
}

.info-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 0.8rem;
}

.info-box p {
    color: #555;
    font-size: 0.95rem;
}

.info-box a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* Navigation Buttons */
.navigation {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    transition: background-color 0.3s;
}

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

.footer-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.footer-section p, 
.footer-section a {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.8;
    text-decoration: none;
}

.footer-section a:hover {
    color: #667eea;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #555;
    color: #999;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    transition: background 0.3s, transform 0.2s;
}

.social-links a:hover {
    background: #764ba2;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }

    .tools-container {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    main {
        padding: 1rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

#scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.toc-card, .threat-card, .tool-card {
    animation: fadeIn 0.5s ease;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.resource-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.resource-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.resource-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.resource-card a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.resource-card a:hover {
    color: #764ba2;
    text-decoration: underline;
}

body.dark-mode .resource-card {
    background: #333;
    color: #e0e0e0;
}

body.dark-mode .resource-card p {
    color: #ccc;
}
/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 3rem 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
    animation: slideIn 0.5s ease;
}

body.dark-mode .faq-item {
    background: rgba(50, 50, 50, 0.7);
    border-color: rgba(102, 126, 234, 0.2);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

body.dark-mode .faq-question {
    color: #e0e0e0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.faq-question:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateX(5px);
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: #667eea;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.faq-answer p {
    padding: 1rem 0;
    color: #555;
    line-height: 1.8;
}

body.dark-mode .faq-answer p {
    color: #bbb;
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

/* ===== GLASSMORPHISM ENHANCEMENT ===== */
.toc-card, .threat-card, .tool-card, .resource-card, .faq-item {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .toc-card,
body.dark-mode .threat-card,
body.dark-mode .tool-card,
body.dark-mode .resource-card {
    border-color: rgba(102, 126, 234, 0.2);
}

/* ===== ADVANCED ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
}

.toc-card:hover {
    animation: glow 2s ease infinite;
    transform: translateY(-8px) scale(1.02);
}

.tool-card:hover,
.threat-card:hover {
    animation: glow 2s ease infinite;
}

/* ===== INTERSECTION OBSERVER ANIMATIONS ===== */
.fade-in-on-scroll {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.slide-in-on-scroll {
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

.dark-mode-toggle,
.lang-toggle,
.theme-variant-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    margin: 0 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    position: relative;
}

.dark-mode-toggle:hover,
.lang-toggle:hover,
.theme-variant-toggle:hover {
    transform: rotate(20deg) scale(1.2);
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.5));
}

/* Tooltip on hover */
.dark-mode-toggle[title]:hover::after,
.lang-toggle[title]:hover::after,
.theme-variant-toggle[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.dark-mode-toggle[title]:hover::before,
.lang-toggle[title]:hover::before,
.theme-variant-toggle[title]:hover::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    pointer-events: none;
}

body.dark-mode .dark-mode-toggle[title]:hover::after,
body.dark-mode .lang-toggle[title]:hover::after,
body.dark-mode .theme-variant-toggle[title]:hover::after {
    background: rgba(102, 126, 234, 0.9);
}

body.dark-mode .dark-mode-toggle[title]:hover::before,
body.dark-mode .lang-toggle[title]:hover::before,
body.dark-mode .theme-variant-toggle[title]:hover::before {
    border-top-color: rgba(102, 126, 234, 0.9);
}

/* ===== HERO SMALL ===== */
.hero-small {
    padding: 2rem 0;
    min-height: 250px;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }

    .faq-answer p {
        padding: 0.75rem 0;
    }

    .dark-mode-toggle,
    .lang-toggle {
        font-size: 1rem;
        margin: 0 0.25rem;
    }
}

@media print {
    nav, footer, .scroll-to-top, .dark-mode-toggle, .lang-toggle {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .toc-card, .threat-card, .tool-card, .resource-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}