@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;700&display=swap');

/* CSS Variables for Theme System */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-primary: #007bff;
    --accent-secondary: #28a745;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

/* Dark Theme Colors - Gradient from dark gray to black */
body.theme-dark {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-primary: #64ffda;
    --accent-secondary: #00d4aa;
    --border-color: #404040;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.4);
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Prompt', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
header, footer {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 50%, #404040 100%) !important;
    color: #fff !important;
    padding: 1em;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
nav a {
    color: var(--accent-primary);
    margin: 0 1em;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}
nav a:hover {
    color: var(--accent-secondary);
}
header nav a, nav a {
  color: #fff !important;
  transition: color 0.2s;
}
header nav a:hover, nav a:hover {
  color: #ffeb3b !important; /* หรือ #64b5f6 ฟ้าอ่อน */
}

/* Main Navigation Styling */
.main-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  color: #e0e0e0;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav a:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive Design for Navigation */
@media (max-width: 768px) {
  .main-nav {
    gap: 10px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  
  .main-nav a {
    padding: 10px 20px;
    font-size: 14px;
    text-align: center;
    width: 100%;
    max-width: 200px;
  }
  
  .user-dropdown {
    width: 100%;
    max-width: 200px;
  }
  
  .user-icon {
    justify-content: center;
    width: 100%;
  }
  
  .dropdown-menu {
    right: 50%;
    transform: translateX(50%);
    min-width: 200px;
  }
}
main {
    padding: 2em 1em;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1 0 auto;
}
.hero {
    background: linear-gradient(120deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 18px;
    padding: 2.5em 1.5em 2em 1.5em;
    text-align: center;
    margin-bottom: 2em;
    box-shadow: var(--shadow);
}
.hero-icon {
    width: 80px;
    margin-bottom: 1em;
    filter: drop-shadow(0 4px 8px rgba(100, 255, 218, 0.3));
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.hero h1 {
    font-size: 2.2em;
    margin-bottom: 0.5em;
    color: #ffffff;
}
.subtitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 1.5em;
}
.btn-main {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    padding: 0.8em 2em;
    border: none;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-main:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.about {
    background: var(--bg-tertiary);
    border-radius: 14px;
    padding: 2em 1.5em;
    margin-bottom: 2em;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.about h2 {
    color: var(--accent-primary);
    margin-bottom: 0.7em;
}
.features {
    list-style: none;
    padding: 0;
    margin: 1.2em 0 0 0;
}
.features li {
    margin-bottom: 0.5em;
    font-size: 1.1em;
}
footer {
    font-size: 0.9em;
    background: #1976d2;
    color: #fff;
    border-top: 1px solid #bbdefb;
    flex-shrink: 0;
    width: 100%;
    left: 0;
    right: 0;
    transform: none;
    max-width: unset;
    margin: 0;
    border-radius: 0;
    position: relative;
    bottom: unset;
}
body, a, button, input {
    cursor: pointer;
} 
/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Hero and About sections */
    .hero, .about {
        padding: 1.5em 1em;
        margin-bottom: 1.5em;
    }
    
    .hero h1 {
        font-size: 1.8em;
        line-height: 1.3;
        margin-bottom: 0.8em;
    }
    
    .subtitle {
        font-size: 1em;
        line-height: 1.5;
        margin-bottom: 1.8em;
    }
    
    .hero-icon {
        width: 60px;
        margin-bottom: 1.2em;
    }
    
    .btn-main {
        padding: 0.9em 2.2em;
        font-size: 1em;
        width: auto;
        display: inline-block;
    }
    
    .about h2 {
        font-size: 1.4em;
        line-height: 1.3;
    }
    
    .features li {
        font-size: 1em;
        line-height: 1.5;
        margin-bottom: 0.8em;
    }
    
    /* Articles page responsive */
    .article-container {
        padding: 1em;
    }
    
    .article-header {
        text-align: center;
        margin-bottom: 1.5em;
    }
    
    .article-header h1 {
        font-size: 1.6em;
        line-height: 1.3;
    }
    
    .article-header img {
        width: 100%;
        max-width: 300px;
        height: auto;
        border-radius: 12px;
        margin: 1em auto;
    }
    
    .article-content {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .article-content h3 {
        font-size: 1.2em;
        margin: 1.5em 0 0.8em 0;
    }
    
    .article-content ul, .article-content ol {
        padding-left: 1.2em;
        margin: 0.8em 0;
    }
    
    .article-content li {
        margin-bottom: 0.6em;
        line-height: 1.5;
    }
    
    .article-content p {
        margin-bottom: 1em;
        line-height: 1.6;
    }
    
    .back-button {
        width: 100%;
        text-align: center;
        margin: 1.5em 0;
    }
    
    .back-button a {
        display: inline-block;
        padding: 0.8em 2em;
        font-size: 0.95em;
    }
}
    .hero, .about {
        padding: 1.5em 1em;
        margin-bottom: 1.5em;
    }
    
    .hero h1 {
        font-size: 1.8em;
        line-height: 1.3;
        margin-bottom: 0.8em;
    }
    
    .subtitle {
        font-size: 1em;
        line-height: 1.5;
        margin-bottom: 1.8em;
    }
    
    .hero-icon {
        width: 60px;
        margin-bottom: 1.2em;
    }
    
    .btn-main {
        padding: 0.9em 2.2em;
        font-size: 1em;
        width: auto;
        display: inline-block;
    }
    
    .about h2 {
        font-size: 1.4em;
        line-height: 1.3;
    }
    
    .features li {
        font-size: 1em;
        line-height: 1.5;
        margin-bottom: 0.8em;
    }
    
    /* Articles page responsive */
    .article-container {
        padding: 1em;
    }
    
    .article-header {
        text-align: center;
        margin-bottom: 1.5em;
    }
    
    .article-header h1 {
        font-size: 1.6em;
        line-height: 1.3;
    }
    
    .article-header img {
        width: 100%;
        max-width: 300px;
        height: auto;
        border-radius: 12px;
        margin: 1em auto;
    }
    
    .article-content {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .article-content h3 {
        font-size: 1.2em;
        margin: 1.5em 0 0.8em 0;
    }
    
    .article-content ul, .article-content ol {
        padding-left: 1.2em;
        margin: 0.8em 0;
    }
    
    .article-content li {
        margin-bottom: 0.6em;
        line-height: 1.5;
    }
    
    .article-content p {
        margin-bottom: 1em;
        line-height: 1.6;
    }
    
    .back-button {
        width: 100%;
        text-align: center;
        margin: 1.5em 0;
    }
    
    .back-button a {
        display: inline-block;
        padding: 0.8em 2em;
        font-size: 0.95em;
    }
}

@media (max-width: 600px) {
    .hero, .about {
        padding: 1.2em 0.8em;
        margin-bottom: 1.2em;
    }
    
    .hero h1 {
        font-size: 1.5em;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 0.95em;
        margin-bottom: 1.5em;
    }
    
    .hero-icon {
        width: 50px;
        margin-bottom: 1em;
    }
    
    .btn-main {
        padding: 0.8em 2em;
        font-size: 0.95em;
        width: 100%;
        max-width: 280px;
    }
    
    .about h2 {
        font-size: 1.3em;
    }
    
    .features li {
        font-size: 0.95em;
        margin-bottom: 0.7em;
    }
    
    /* Articles page responsive for small screens */
    .article-header h1 {
        font-size: 1.4em;
    }
    
    .article-content {
        font-size: 0.9em;
    }
    
    .article-content h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .hero, .about {
        padding: 1em 0.6em;
        margin-bottom: 1em;
        border-radius: 12px;
    }
    
    .hero h1 {
        font-size: 1.3em;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 0.9em;
        margin-bottom: 1.3em;
    }
    
    .hero-icon {
        width: 45px;
        margin-bottom: 0.8em;
    }
    
    .btn-main {
        padding: 0.7em 1.8em;
        font-size: 0.9em;
        border-radius: 25px;
    }
    
    .about h2 {
        font-size: 1.2em;
    }
    
    .features li {
        font-size: 0.9em;
        margin-bottom: 0.6em;
    }
    
    /* Articles page responsive for very small screens */
    .article-header h1 {
        font-size: 1.2em;
    }
    
    .article-content {
        font-size: 0.85em;
    }
    
    .article-content h3 {
        font-size: 1em;
    }
}
.threats {
    margin-top: 2em;
}
.threat-list {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}
.threat-card {
    background: #f5faff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(25,118,210,0.08);
    padding: 1.5em 1.2em;
    color: #222831;
    position: relative;
    transition: transform 0.15s;
}
.threat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 24px rgba(100,255,218,0.10);
}
.threat-card h2 {
    color: #1976d2;
    margin-bottom: 0.5em;
    font-size: 1.2em;
}
.threat-date {
    display: block;
    color: #b2becd;
    font-size: 0.95em;
    margin-top: 1em;
    font-style: italic;
}
@media (max-width: 600px) {
    .threat-card {
        padding: 1em 0.5em;
    }
}
.articles {
    margin-top: 2em;
}
.article-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5em;
    margin-top: 2em;
    width: 100%;
}
.article-list.single-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 2em;
}
.article-list.single-column .article-card {
  width: 100% !important;
  min-width: 0 !important;
}
.article-card {
    background: var(--bg-tertiary);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 2.5em 2em 2em 2em;
    color: var(--text-primary);
    position: relative;
    transition: all 0.3s ease;
    border-left: 6px solid var(--accent-secondary);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    min-width: 0;
}
.article-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-left: 6px solid var(--accent-secondary);
}
.article-card h2 {
    color: var(--accent-primary);
    margin-bottom: 1.2em;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1.3;
}
.article-card h3 {
    color: var(--accent-secondary);
    margin: 2em 0 1em 0;
    font-size: 1.15em;
    font-weight: bold;
}
.article-card p {
    line-height: 1.8;
    margin-bottom: 1.5em;
    font-size: 1.08em;
    color: var(--text-secondary);
}
.article-card ul {
    margin-left: 1.5em;
    line-height: 2;
    margin-bottom: 1em;
}
.article-card li {
    margin-bottom: 0.8em;
    font-size: 1.08em;
    color: var(--text-secondary);
    position: relative;
}
.article-card li:before {
    content: "•";
    color: var(--accent-secondary);
    font-weight: bold;
    position: absolute;
    left: -1.2em;
}
@media (max-width: 1200px) {
    main {
        max-width: 98vw;
    }
    .article-list {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}
@media (max-width: 900px) {
    main {
        max-width: 100vw;
        padding: 1em 0.2em;
    }
    .article-list {
        grid-template-columns: 1fr;
        gap: 1.2em;
    }
    .article-card {
        padding: 2em 1em 1.5em 1em;
        min-height: 0;
    }
    .article-card h2 {
        font-size: 1.15em;
    }
}
.password-tool {
    margin-top: 2em;
}
.tool-container {
    max-width: 800px;
    margin: 0 auto;
}
.password-form {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 2.5em 2em;
    margin-bottom: 2em;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-secondary);
}
.password-form label {
    display: block;
    color: #64ffda;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 1em;
}
.password-form input {
    width: 94%;
    display: block;
    margin: 0 auto 1.5em auto;
    padding: 1em;
    border: 2px solid #233554;
    border-radius: 8px;
    background: #0a192f;
    color: #f4f8fb;
    font-size: 1em;
    transition: border-color 0.3s;
}
.password-form input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100,255,218,0.1);
}
.btn-check {
    background: #64ffda;
    color: #0a192f;
    padding: 1em 2em;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-check:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100,255,218,0.3);
}
.result-container {
    background: #f5faff;
    border-radius: 16px;
    padding: 2.5em 2em;
    margin-bottom: 2em;
    box-shadow: 0 4px 16px rgba(25,118,210,0.08);
    border-left: 4px solid #64ffda;
    max-width: 800px;
    margin: 0 auto 2em auto;
    width: 100%;
    box-sizing: border-box;
}
.result-container h3 {
    color: #64ffda;
    margin-bottom: 1.5em;
    font-size: 1.2em;
}
.strength-meter {
    width: 100%;
    height: 20px;
    background: #233554;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1em;
}
.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease-in-out;
    border-radius: 10px;
}
.strength-text {
    color: #f4f8fb;
    font-size: 1.1em;
    margin-bottom: 1em;
}
.feedback {
    color: #e6f3ff;
    line-height: 1.6;
    padding: 1em;
    background: #0a192f;
    border-radius: 8px;
    border-left: 3px solid #64ffda;
}
.tips {
    background: #f5faff;
    border-radius: 16px;
    padding: 2em;
    box-shadow: 0 4px 16px rgba(25,118,210,0.08);
    border-left: 4px solid #64ffda;
}
.tips h3 {
    color: #64ffda;
    margin-bottom: 1.5em;
    font-size: 1.2em;
}
.tips ul {
    margin-left: 1.5em;
    line-height: 1.8;
}
.tips li {
    color: #e6f3ff;
    margin-bottom: 0.8em;
    font-size: 1.05em;
}
@media (max-width: 600px) {
    .password-form, .result-container, .tips {
        padding: 1.5em 1em;
        margin: 0 0.5em 1.5em 0.5em;
    }
    .btn-check {
        width: 100%;
    }
}
.quiz {
    margin-top: 2em;
}
.quiz-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.quiz-start {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 25%, #2d3748 50%, #1a2332 75%, #0f1419 100%) !important;
    border-radius: 16px;
    padding: 3em 2em;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border-left: 4px solid #64ffda;
    position: relative;
    overflow: hidden;
}

.quiz-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.quiz-start > * {
    position: relative;
    z-index: 2;
}
.quiz-start h2 {
    color: #64ffda;
    margin-bottom: 1em;
    font-size: 1.4em;
}
.btn-start {
    background: #64ffda;
    color: #0a192f;
    padding: 1em 2.5em;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.5em;
}
.btn-start:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100,255,218,0.3);
}
.quiz-questions {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 25%, #2d3748 50%, #1a2332 75%, #0f1419 100%) !important;
    border-radius: 16px;
    padding: 3em 2.5em;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border-left: 4px solid #64ffda;
    position: relative;
    overflow: hidden;
}

.quiz-questions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.quiz-questions > * {
    position: relative;
    z-index: 2;
}
.progress-bar {
    width: 100%;
    height: 12px;
    background: #233554;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2em;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64ffda, #00ff88);
    width: 0%;
    transition: width 0.3s ease;
}
.question-counter {
    color: #64ffda;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 2.5em;
    text-align: center;
}
.question-container h3 {
    color: #f4f8fb;
    font-size: 1.4em;
    margin-bottom: 2.5em;
    line-height: 1.5;
    font-weight: bold;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    margin-bottom: 3em;
}
.option {
    display: flex;
    align-items: flex-start;
    padding: 1.5em 2em;
    background: #0a192f;
    border: 2px solid #233554;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.option:hover {
    border-color: #64ffda;
    background: #112240;
    transform: translateY(-2px);
}
.option input[type="radio"] {
    margin-right: 1.5em;
    margin-top: 0.2em;
    transform: scale(1.3);
}
.option-text {
    color: #f4f8fb;
    font-size: 1.1em;
    line-height: 1.6;
    flex: 1;
}
.quiz-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1.5em;
}
.btn-nav, .btn-submit {
    padding: 1em 2em;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-nav {
    background: #233554;
    color: #f4f8fb;
}
.btn-nav:hover {
    background: #2c5364;
    transform: translateY(-2px);
}
.btn-submit {
    background: #64ffda;
    color: #0a192f;
}
.btn-submit:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100,255,218,0.3);
}
.quiz-result {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 25%, #2d3748 50%, #1a2332 75%, #0f1419 100%) !important;
    border-radius: 16px;
    padding: 3em 2.5em;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border-left: 4px solid #64ffda;
    position: relative;
    overflow: hidden;
}

.quiz-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.quiz-result > * {
    position: relative;
    z-index: 2;
}
.quiz-result h2 {
    color: #64ffda;
    margin-bottom: 2.5em;
    font-size: 1.5em;
    font-weight: bold;
}
.score-display {
    margin-bottom: 3em;
}
.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64ffda, #00ff88);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(100,255,218,0.3);
}
.score-circle span {
    color: #0a192f;
    font-size: 2.2em;
    font-weight: bold;
}
.result-message {
    color: #f4f8fb;
    font-size: 1.3em;
    margin-bottom: 3em;
    padding: 1.5em;
    background: #0a192f;
    border-radius: 12px;
    border-left: 4px solid #64ffda;
    line-height: 1.6;
}
.answer-review {
    text-align: left;
    margin-bottom: 3em;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}
.review-item {
    padding: 1.5em 2em 1.5em 3.2em;
    margin-bottom: 0;
    border-radius: 16px;
    border-left: 6px solid;
    line-height: 1.7;
    position: relative;
    background: #182133;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-size: 1.08em;
}
.review-item.correct {
    background: #eafff3;
    border-left-color: #00c97b;
    color: #1a2636;
}
.review-item.incorrect {
    background: #fff0f0;
    border-left-color: #ff4444;
    color: #1a2636;
}
.review-item .icon {
    position: absolute;
    left: 1.1em;
    top: 1.3em;
    font-size: 1.5em;
    font-weight: bold;
}
.review-item strong {
    color: #222e50;
    font-size: 1.08em;
}
.review-item .your-answer {
    display: block;
    margin: 0.5em 0 0.2em 0;
    font-weight: bold;
}
.review-item .correct-answer {
    display: block;
    margin-bottom: 0.2em;
    font-weight: bold;
}
/* --- Quiz Review Icon Spacing --- */
.review-item .icon {
  margin-right: 8px;
  font-size: 1.3em;
  vertical-align: middle;
  display: inline-block;
}
.correct-msg {
  margin-left: 4px;
  font-weight: bold;
  display: inline-block;
}
@media (max-width: 600px) {
    .review-item {
        padding: 1.2em 1em 1.2em 2.5em;
        font-size: 1em;
    }
    .review-item .icon {
        left: 0.5em;
        top: 1em;
        font-size: 1.2em;
    }
}
.btn-restart {
    background: #64ffda;
    color: #0a192f;
    padding: 1.2em 2.5em;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-restart:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100,255,218,0.3);
}
@media (max-width: 600px) {
    .quiz-start, .quiz-questions, .quiz-result {
        padding: 2em 1.5em;
        margin: 0 0.5em;
    }
    .quiz-buttons {
        flex-direction: column;
    }
    .score-circle {
        width: 140px;
        height: 140px;
    }
    .score-circle span {
        font-size: 1.8em;
    }
    .question-container h3 {
        font-size: 1.2em;
    }
    .option-text {
        font-size: 1em;
    }
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4.5em;
    margin-top: 2.5em;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.category-card {
    background: linear-gradient(135deg, #1a2332 0%, #2d3748 25%, #4a5568 50%, #2d3748 75%, #1a2332 100%) !important;
    border: none;
    border-radius: 18px;
    padding: 2.2em 2.5em 1.7em 2.5em;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,2,.6,1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    min-height: 180px;
    min-width: 0;
    border-left: 6px solid #64ffda;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.category-card > * {
    position: relative;
    z-index: 2;
}
.category-card:hover {
    border-left: 6px solid #00ff88;
    background: #233554;
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 32px rgba(100,255,218,0.18);
}
.category-card .category-header {
    display: flex;
    align-items: center;
    gap: 0.7em;
    margin-bottom: 0.7em;
}
.category-card .category-icon {
    font-size: 2em;
    line-height: 1;
    margin-right: 0.1em;
}
.category-card h3 {
    color: #1976d2;
    font-size: 1.35em;
    font-weight: bold;
    margin: 0;
    display: inline-block;
}
.category-card p {
    color: #f4f8fb;
    font-size: 1.13em;
    margin: 0 0 0.7em 0;
    font-weight: bold;
}
.category-desc {
    color: #b2becd;
    font-size: 1em;
    display: block;
    line-height: 1.5;
    margin-top: 0.2em;
}
@media (max-width: 600px) {
    .category-card {
        padding: 1.5em 1em 1.2em 1em;
        min-height: 140px;
    }
    .category-card .category-icon {
        font-size: 1.3em;
    }
}
.category-indicator {
    color: #64ffda;
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 2em;
    text-align: center;
    padding: 0.5em 1em;
    background: #0a192f;
    border-radius: 8px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}
.category-scores {
    margin-bottom: 3em;
}
.category-scores h3 {
    color: #64ffda;
    margin-bottom: 1.5em;
    font-size: 1.3em;
    text-align: center;
}
.category-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
}
.category-score-item {
    background: #0a192f;
    border-radius: 8px;
    padding: 1em 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #64ffda;
}
.category-name {
    color: #f4f8fb;
    font-weight: bold;
}
.category-score {
    color: #64ffda;
    font-weight: bold;
    font-size: 1.1em;
}
/* === About/Contact Page === */
.cyber-title {
    text-align: center;
    font-size: 2.3em;
    color: #64ffda;
    margin-bottom: 1.5em;
    letter-spacing: 1px;
    font-weight: bold;
}
.cyber-title span {
    background: linear-gradient(90deg, #64ffda 30%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.team-grid {
    display: flex;
    gap: 2em;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5em;
}
.team-card {
    background: #f5faff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(25,118,210,0.08);
    padding: 2em 1.5em 1.5em 1.5em;
    text-align: center;
    width: 260px;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
.team-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(100,255,218,0.18);
}
.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1/1;
    display: block;
    margin: 0 auto 1em auto;
    border: 3px solid #64ffda;
    background: #fff;
}
.team-card h2 {
    color: #1976d2;
    margin-bottom: 0.3em;
    font-size: 1.25em;
}
.team-card p {
    color: #e6f3ff;
    margin-bottom: 0.5em;
    font-size: 1.05em;
}
.contact-info {
    color: #b2becd;
    font-size: 0.98em;
    margin-top: 0.2em;
}
.about-contact {
    background: #f5faff;
    border-radius: 14px;
    padding: 1.5em 1em;
    margin: 0 auto 2em auto;
    max-width: 420px;
    box-shadow: 0 2px 12px rgba(25,118,210,0.08);
    text-align: center;
}
.about-contact h2 {
    color: #1976d2;
    margin-bottom: 1em;
}
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-list li {
    margin-bottom: 0.7em;
    font-size: 1.08em;
    color: #e6f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7em;
}
.live-chat-placeholder {
    background: #f5faff;
    border-radius: 12px;
    padding: 1.2em 1em;
    text-align: center;
    color: #222831;
    margin: 0 auto 1.5em auto;
    max-width: 420px;
    box-shadow: 0 2px 10px rgba(25,118,210,0.08);
}
.live-chat-placeholder h3 {
    color: #1976d2;
    margin-bottom: 0.5em;
    font-size: 1.15em;
}
@media (max-width: 700px) {
    .team-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.2em;
    }
    .team-card {
        width: 90%;
        min-width: 220px;
    }
}
.form-container {
    max-width: 400px;
    width: 94vw;
    margin: 2em auto;
    padding: 2em 2em;
    box-sizing: border-box;
    background: #222;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.form-container h1 {
    margin-bottom: 24px;
    color: #fff;
    text-align: center;
}
.form-container label {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-weight: 500;
}
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    margin-bottom: 18px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #222 !important;
    color: #fff;
    font-size: 1em;
    transition: border 0.2s;
}
.form-container input:focus {
    border: 1.5px solid #00ff88;
    outline: none;
}
.form-container button {
    width: 100%;
    padding: 12px;
    background: #00ff88;
    color: #222;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.form-container button:hover {
    background: #00cc6a;
}
.form-container .error {
    color: #ff4444;
    background: #2a0000;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 16px;
    text-align: center;
}
.form-container .success {
    color: #00ff88;
    background: #00331a;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 16px;
    text-align: center;
}
.form-container p {
    text-align: center;
    margin-top: 10px;
}
.form-container a {
    color: #00ff88;
    text-decoration: underline;
    margin-top: 1.5em;
    text-align: center;
    display: block;
}
@media (max-width: 1200px) {
    .quiz-container {
        max-width: 98vw;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}
@media (max-width: 900px) {
    .quiz-container {
        max-width: 100vw;
        padding: 1em 0.2em;
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em;
    margin: 2em 0 1.5em 0;
    justify-content: center;
}
.category-tab {
    background: #112240;
    color: #64ffda;
    border: none;
    border-radius: 8px;
    padding: 0.7em 1.5em;
    font-size: 1.08em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(100,255,218,0.08);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
    outline: none;
    margin-bottom: 0.3em;
}
.category-tab:hover {
    background: #64ffda;
    color: #0a192f;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(100,255,218,0.18);
}
.category-tab.active {
    background: linear-gradient(90deg, #64ffda 30%, #00ff88 100%);
    color: #0a192f;
    box-shadow: 0 4px 16px rgba(100,255,218,0.18);
    border: 2px solid #64ffda;
    transform: scale(1.06);
}
@media (max-width: 600px) {
    .category-tabs {
        gap: 0.3em;
        margin: 1em 0 1em 0;
    }
    .category-tab {
        font-size: 0.98em;
        padding: 0.5em 0.8em;
    }
}
.comment-form, .comment-list, .comment-item {
    width: 100%;
    max-width: none;
    margin: 0 0 2em 0;
    padding: 2em 2.5em;
    box-sizing: border-box;
}

.comment-section-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.comment-form, .comment-item {
    width: 100%;
    box-sizing: border-box;
}

/* Floating Community Button - วงกลมสมบูรณ์ */
.community-fab {
  position: fixed;
  right: 32px;
  bottom: 60px;
  width: 64px;
  height: 64px;
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  font-size: 2em;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
  padding: 0;
}
.community-fab:hover {
  background: #1565c0;
}
.quiz-warning {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #23272f;
  color: #fff;
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 2000;
  min-width: 320px;
  max-width: 90vw;
  text-align: center;
  font-size: 1.1rem;
  border: 1.5px solid #444;
}
.quiz-warning strong {
  display: block;
  margin-bottom: 1.2rem;
  font-size: 1.15em;
  color: #ffcc00;
}
.quiz-warning .btn-login, .quiz-warning .btn-register {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
.quiz-warning .btn-login {
  background: #1976d2;
  color: #fff;
}
.quiz-warning .btn-login:hover {
  background: #1256a0;
}
.quiz-warning .btn-register {
  background: #fff;
  color: #1976d2;
  border: 1.5px solid #1976d2;
}
.quiz-warning .btn-register:hover {
  background: #1976d2;
  color: #fff;
}
/* --- ปรับตำแหน่งปุ่ม Live Chat ไม่ให้ทับ Community --- */
#liveChatBtn {
  position: fixed !important;
  left: 32px !important;
  bottom: 60px !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  background: #64ffda !important;
  color: #0a192f !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 1.7em !important;
  padding: 0 !important;
  text-decoration: none !important;
  transition: background 0.2s !important;
}

/* Responsive: ถ้าจอเล็กให้ขยับขึ้นน้อยลง */
@media (max-width: 600px) {
  .community-fab {
    right: 16px;
    bottom: 40px;
    width: 52px;
    height: 52px;
    font-size: 1.5em;
  }
  #liveChatBtn {
    left: 16px;
    bottom: 40px;
    width: 52px;
    height: 52px;
    font-size: 1.5em;
  }
}
/* ปุ่ม Community และ Live Chat ใช้ style เดียวกัน */
.community-fab, #liveChatBtn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  border: none !important;
  cursor: pointer !important;
  z-index: 9999 !important;
  position: fixed;
  padding: 0 !important;
}
.community-fab .icon-label, #liveChatBtn .icon-label {
  font-size: 0.8em !important;
  color: #fff !important;
  margin-top: 4px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  text-align: center !important;
}
.community-fab i, #liveChatBtn i {
  font-size: 1.2em !important;
}

/* ปุ่ม Community (ขวา) */
.community-fab {
  position: fixed;
  right: 32px;
  bottom: 60px;
  width: 64px;
  height: 64px;
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.7em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 9999;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  padding: 0;
}
.community-fab:hover {
  background: #1565c0;
}
.community-fab i {
  color: #fff;
  font-size: 1.7em !important;
  margin: 0;
  padding: 0;
  display: block;
}
.community-fab .icon-label {
  font-size: 0.8em !important;
  color: #fff !important;
  margin-top: 2px !important;
  line-height: 1 !important;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 2px #222831;
  letter-spacing: 0.2px;
}

/* ปุ่ม Live Chat (ซ้าย) */
#liveChatBtn {
  position: fixed;
  left: 32px;
  bottom: 60px;
  z-index: 9999;
  background: #64ffda;
  color: #0a192f;
  border: none;
  border-radius: 50%;
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.7em !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
#liveChatBtn:hover {
  background: #1de9b6;
}
#liveChatBtn i {
  color: #0a192f !important;
  font-size: 1.7em !important;
  margin: 0;
  padding: 0;
  display: block;
}
#liveChatBtn .icon-label {
  position: static !important;
  margin-top: 8px !important;
  font-size: 0.9em !important;
  color: #fff !important;
  font-weight: 700 !important;
  z-index: auto !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  text-align: center !important;
}

@media (max-width: 600px) {
  .community-fab, #liveChatBtn {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.2em !important;
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
  .community-fab .icon-label, #liveChatBtn .icon-label {
    font-size: 0.7em !important;
  }
}

.admin-panel-btn {
    position: fixed;
    bottom: 32px;
    right: 100px;
    background: #64ffda;
    color: #0a192f;
    padding: 1em 1.5em;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 16px rgba(100,255,218,0.15);
    z-index: 9999;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.7em;
    transition: background 0.2s, color 0.2s;
}
.admin-panel-btn:hover {
    background: #fff;
    color: #0a192f;
}
.admin-panel-btn i {
    font-size: 1.2em;
}

.live-chat-modal {
  display: none;
  position: fixed;
  z-index: 12000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(10,25,47,0.85);
}
.live-chat-modal-content {
  background: #132033;
  margin: 10% auto;
  padding: 1.5em;
  border-radius: 12px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(100,255,218,0.18);
  position: relative;
  border: 1px solid #233554;
}
.live-chat-modal-close {
  color: #64ffda;
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.live-chat-modal-close:hover {
  color: #ff4444;
}
#liveChatBox {
  margin-top: 1.5em;
  display: block !important;
  visibility: visible !important;
}

#chatStatus {
  display: block !important;
  visibility: visible !important;
}

#chatMessagesUser {
  display: block !important;
  visibility: visible !important;
  min-height: 100px !important;
}

#chatFormUser {
  display: flex !important;
  visibility: visible !important;
}

#chatInputUser {
  display: block !important;
  visibility: visible !important;
} 
@media (max-width: 600px) {
  .live-chat-modal-content {
    margin: 5% auto;
    width: 95%;
    max-width: 350px;
    padding: 1em;
  }
  
  #chatMessagesUser {
    height: 250px !important;
  }
  
  #chatInputUser {
    font-size: 1em !important;
  }
  
  .chat-msg {
    font-size: 0.9em !important;
  }
}

/* Live Chat Message Styles */
.chat-msg {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-msg.me {
  background: #1e3a8a;
  color: #ffffff;
  margin-left: auto;
  text-align: right;
  border: 1px solid #3b82f6;
}

.chat-msg.admin {
  background: #374151;
  color: #ffffff;
  margin-right: auto;
  border: 1px solid #6b7280;
}

.chat-name {
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 2px;
  display: block;
}

.chat-time {
  font-size: 0.75em;
  opacity: 1;
  margin-top: 2px;
  color: #9ca3af;
  font-weight: 500;
} 
:root {
  --main-bg: #222831;
  --card-bg: #393e46;
  --accent: #00adb5;
  --accent2: #1976d2;
  --font-main: #fff;
  --font-accent: #00adb5;
}

body {
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 25%, #2d3748 50%, #1a2332 75%, #0f1419 100%) !important;
  color: #fff;
  transition: all 0.3s ease;
}

/* Light Theme Styles */
body.theme-light {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%) !important;
  color: #212529;
}

body.theme-light header, 
body.theme-light footer {
  background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #004085 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 24px rgba(0,123,255,0.3);
}

body.theme-light .hero {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%) !important;
  color: #007bff !important;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* แก้ไขข้อความต้อนรับในธีมสว่างให้เป็นสีฟ้า */
body.theme-light .hero h1 {
  color: #007bff !important;
}

/* แก้ไขไอคอนในธีมสว่างให้มองเห็นชัดเจน */
body.theme-light .hero-icon {
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

body.theme-light .about,
body.theme-light .article-card,
body.theme-light .team-card,
body.theme-light .category-card,
body.theme-light .password-form,
body.theme-light .result-container,
body.theme-light .tips,
body.theme-light .quiz-start,
body.theme-light .quiz-questions,
body.theme-light .quiz-result,
body.theme-light .about-contact,
body.theme-light .live-chat-placeholder {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%) !important;
  color: #212529 !important;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

/* ปรับสีเฉพาะข้อความ "คำถามที่ X จาก Y" ในธีมสว่าง */
body.theme-light .quiz-questions .question-counter {
  color: #1a1a1a !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* จัดให้ข้อความในธีมสว่างอยู่ตรงกลาง */
body.theme-light .quiz-questions .question-counter,
body.theme-light .quiz-questions .category-indicator,
body.theme-light .quiz-questions h3 {
  text-align: center !important;
}

/* สำหรับ articles.php และ other content cards (dark theme) */
body:not(.theme-light) .article-card,
body:not(.theme-light) .team-card,
body:not(.theme-light) .category-card,
body:not(.theme-light) .password-form,
body:not(.theme-light) .result-container,
body:not(.theme-light) .tips,
body:not(.theme-light) .quiz-start,
body:not(.theme-light) .quiz-questions,
body:not(.theme-light) .quiz-result,
body:not(.theme-light) .about-contact,
body:not(.theme-light) .live-chat-placeholder {
  background: linear-gradient(90deg, #0a192f 0%, #112240 50%, #233554 100%) !important;
  color: #f4f8fb !important;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  border: 3px solid #64ffda;
  position: relative;
  overflow: hidden;
}

/* ปรับปรุงการ์ดบทความในธีมมืด */
body:not(.theme-light) .articles-grid .article-card {
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%) !important;
  border: 3px solid #64ffda !important;
  color: #f4f8fb !important;
}

/* เพิ่มกรอบฟ้าเฉพาะหน้า articles.php (ธีมสว่าง) */
body.theme-light .article-card {
  border: 3px solid #007bff;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

/* จัดเรียงการ์ดบทความแบบ Grid (แถวละ 3) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3em;
  padding: 2.5em;
  max-width: 1200px;
  margin: 0 auto;
}

.articles-grid .article-card {
  min-width: 320px;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.articles-grid .article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0,123,255,0.15);
}

/* ปรับปรุงการ์ดบทความให้สวยงาม */
.articles-grid .article-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 1.5em;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 3px solid #007bff;
}

.articles-grid .article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #64ffda);
}

.articles-grid .article-card h3 {
  font-size: 1.4em;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1em;
  line-height: 1.3;
}

.articles-grid .article-card p {
  font-size: 1em;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 1.5em;
}

.articles-grid .read-more-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 0.8em 2em;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.articles-grid .read-more-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,123,255,0.3);
}

/* Responsive design */
@media (max-width: 1100px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5em;
    padding: 2em;
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5em;
    padding: 1em;
  }
  
  .articles-grid .article-card {
    min-width: 280px;
    max-width: 100%;
  }
}

/* จัดองค์ประกอบหัวข้อและคำอธิบายในธีมมืด */
body:not(.theme-light) .article-card h2,
body:not(.theme-light) .article-card h3,
body:not(.theme-light) .team-card h3,
body:not(.theme-light) .password-form h3,
body:not(.theme-light) .result-container h3,
body:not(.theme-light) .tips h3,
body:not(.theme-light) .quiz-start h3,
body:not(.theme-light) .quiz-questions h3,
body:not(.theme-light) .quiz-result h3,
body:not(.theme-light) .about-contact h3 {
  color: #64ffda !important;
  font-weight: 700 !important;
  font-size: 1.5em !important;
  text-align: center !important;
  margin-bottom: 1em !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

body:not(.theme-light) .article-card p,
body:not(.theme-light) .team-card p,
body:not(.theme-light) .password-form p,
body:not(.theme-light) .result-container p,
body:not(.theme-light) .tips p,
body:not(.theme-light) .quiz-start p,
body:not(.theme-light) .quiz-questions p,
body:not(.theme-light) .quiz-result p,
body:not(.theme-light) .about-contact p {
  color: #b2becd !important;
  font-size: 1.1em !important;
  line-height: 1.6 !important;
  text-align: center !important;
  font-weight: 500 !important;
}

/* จัดปุ่ม "อ่านต่อ" ให้อยู่ตรงกลางทั้งสองธีม */
body.theme-light .read-more-btn,
body:not(.theme-light) .read-more-btn {
  display: block !important;
  margin: 0 auto !important;
  text-align: center !important;
  width: fit-content !important;
  padding: 0.8em 2em !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}





/* แก้ไข quiz banner ในธีมสว่าง */
body.theme-light .quiz-banner {
  background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #004085 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 24px rgba(0,123,255,0.3);
}

body.theme-light .quiz-banner::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* แก้ไข quiz cards ในธีมสว่าง */
body.theme-light .quiz-start::before,
body.theme-light .quiz-questions::before,
body.theme-light .quiz-result::before {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 86, 179, 0.05) 100%);
}

/* แก้ไข article banner ในธีมสว่าง */
body.theme-light .article-banner {
  background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #004085 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 24px rgba(0,123,255,0.3);
}

body.theme-light .article-banner::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* แก้ไข category cards ในธีมสว่าง */
body.theme-light .category-card {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%) !important;
  color: #212529 !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  border: 3px solid #007bff;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}



/* เพิ่มกรอบสีสวยงามให้การ์ดในธีมสว่าง */
body.theme-light .category-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #e3f2fd;
  border-radius: 18px;
  pointer-events: none;
  z-index: 1;
}

/* เพิ่มเอฟเฟกต์ hover สำหรับธีมสว่าง */
body.theme-light .category-card:hover {
  border-color: #0056b3;
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,123,255,0.2);
}

body.theme-light .category-card:hover::after {
  border-color: #bbdefb;
}

/* เพิ่มเอฟเฟกต์ hover สำหรับการ์ดอื่นๆ ในธีมสว่าง */
body.theme-light .article-card:hover,
body.theme-light .team-card:hover,
body.theme-light .password-form:hover,
body.theme-light .result-container:hover,
body.theme-light .tips:hover,
body.theme-light .quiz-start:hover,
body.theme-light .quiz-questions:hover,
body.theme-light .quiz-result:hover,
body.theme-light .about-contact:hover,
body.theme-light .live-chat-placeholder:hover {
  border-color: #0056b3 !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 32px rgba(0,123,255,0.2) !important;
}



body.theme-light .category-card::before {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 86, 179, 0.05) 100%);
}

/* ปรับปรุงองค์ประกอบเนื้อหาในธีมสว่าง */
body.theme-light .category-card .category-title {
  color: #0056b3 !important;
  font-weight: 700 !important;
  font-size: 1.5em !important;
  margin-bottom: 0.8em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* แก้ไขไอคอนให้อยู่ตรงกลาง */
body.theme-light .category-card .category-icon {
  text-align: center !important;
  display: block !important;
  margin: 0 auto 0.5em auto !important;
  font-size: 2.5em !important;
}

body.theme-light .category-card .category-desc {
  color: #495057 !important;
  font-size: 1.1em !important;
  line-height: 1.6 !important;
  margin-bottom: 1.2em !important;
  text-align: center !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.theme-light .category-card .category-count {
  color: #6c757d !important;
  font-size: 0.95em !important;
  font-weight: 600 !important;
  text-align: center !important;
  background: #e3f2fd !important;
  padding: 0.5em 1em !important;
  border-radius: 20px !important;
  border: 1px solid #bbdefb !important;
  display: inline-block !important;
  margin: 0 auto !important;
}

/* ปรับปรุงการ์ดในธีมมืดให้เหมือนธีมสว่าง */
body:not(.theme-light) .category-card {
  border: 3px solid #64ffda !important;
  border-radius: 18px !important;
  position: relative !important;
  overflow: hidden !important;
}

/* เพิ่มกรอบสีสวยงามให้การ์ดในธีมมืด */
body:not(.theme-light) .category-card::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border: 2px solid #00d4aa !important;
  border-radius: 18px !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* เพิ่มเอฟเฟกต์ hover สำหรับธีมมืด */
body:not(.theme-light) .category-card:hover {
  border-color: #00ff88 !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 32px rgba(100,255,218,0.2) !important;
}

body:not(.theme-light) .category-card:hover::after {
  border-color: #64ffda !important;
}

/* ปรับปรุงองค์ประกอบเนื้อหาในธีมมืด - เหมือนธีมสว่าง */
body:not(.theme-light) .category-card .category-title {
  color: #64ffda !important;
  font-weight: 700 !important;
  font-size: 1.5em !important;
  margin-bottom: 0.8em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* แก้ไขไอคอนให้อยู่ตรงกลางในธีมมืด */
body:not(.theme-light) .category-card .category-icon {
  text-align: center !important;
  display: block !important;
  margin: 0 auto 0.5em auto !important;
  font-size: 2.5em !important;
}

body:not(.theme-light) .category-card .category-desc {
  color: #b2becd !important;
  font-size: 1.1em !important;
  line-height: 1.6 !important;
  margin-bottom: 1.2em !important;
  text-align: center !important;
  font-weight: 500 !important;
}

body:not(.theme-light) .category-card .category-count {
  color: #64ffda !important;
  font-size: 0.95em !important;
  font-weight: 600 !important;
  text-align: center !important;
  background: rgba(100, 255, 218, 0.1) !important;
  padding: 0.5em 1em !important;
  border-radius: 20px !important;
  border: 1px solid #00d4aa !important;
  display: inline-block !important;
  margin: 0 auto !important;
}

body.theme-light .about h2, 
body.theme-light .article-card h2, 
body.theme-light .category-card h3, 
body.theme-light .team-card h2, 
body.theme-light .quiz-start h2, 
body.theme-light .quiz-result h2, 
body.theme-light .about-contact h2, 
body.theme-light .live-chat-placeholder h3 {
  color: #0056b3 !important;
  font-weight: 700 !important;
  font-size: 1.4em !important;
  margin-bottom: 0.5em !important;
  text-align: center !important;
}

body.theme-light .article-card p, 
body.theme-light .about p, 
body.theme-light .team-card p, 
body.theme-light .category-card p, 
body.theme-light .password-form p, 
body.theme-light .result-container p, 
body.theme-light .tips p, 
body.theme-light .quiz-start p, 
body.theme-light .quiz-result p, 
body.theme-light .about-contact p, 
body.theme-light .live-chat-placeholder p,
body.theme-light .article-card ul, 
body.theme-light .about ul, 
body.theme-light .team-card ul, 
body.theme-light .category-card ul, 
body.theme-light .password-form ul, 
body.theme-light .result-container ul, 
body.theme-light .tips ul, 
body.theme-light .quiz-start ul, 
body.theme-light .quiz-questions ul, 
body.theme-light .quiz-result ul, 
body.theme-light .about-contact ul, 
body.theme-light .live-chat-placeholder ul,
body.theme-light .article-card li, 
body.theme-light .about li, 
body.theme-light .team-card li, 
body.theme-light .category-card li, 
body.theme-light .password-form li, 
body.theme-light .result-container li, 
body.theme-light .tips li, 
body.theme-light .quiz-start li, 
body.theme-light .quiz-result li, 
body.theme-light .about-contact li, 
body.theme-light .live-chat-placeholder li {
  color: #495057 !important;
}

/* แก้ไขสีคำถามใน quiz ให้เข้มขึ้นในธีมสว่าง */
body.theme-light .question-container h3 {
  color: #212529 !important;
  font-weight: 600;
}

body.theme-light .btn-main, 
body.theme-light .btn, 
body.theme-light button, 
body.theme-light input[type=submit], 
body.theme-light .quiz-btn {
  background: #007bff !important;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-weight: 600;
  transition: background 0.2s;
}

body.theme-light .btn-main:hover, 
body.theme-light .btn:hover, 
body.theme-light button:hover, 
body.theme-light input[type=submit]:hover, 
body.theme-light .quiz-btn:hover {
  background: #0056b3 !important;
  color: #fff !important;
}

/* แก้ไขหน้า profile.php ในธีมสว่าง */
body.theme-light .form-container {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%) !important;
  color: #212529 !important;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  border: 1px solid #dee2e6;
}

body.theme-light .form-container h1 {
  color: #007bff !important;
}

body.theme-light .form-container p {
  color: #495057 !important;
}

body.theme-light .form-container strong {
  color: #212529 !important;
}

body.theme-light .form-container .btn {
  background: #007bff !important;
  color: #fff !important;
}

body.theme-light .form-container .btn:hover {
  background: #0056b3 !important;
  color: #fff !important;
}

/* แก้ไขหน้า register.php ในธีมสว่าง */
body.theme-light .form-container label {
  color: #212529 !important;
  font-weight: bold;
}

body.theme-light .form-container input[type="text"],
body.theme-light .form-container input[type="email"],
body.theme-light .form-container input[type="password"] {
  background: #ffffff !important;
  color: #212529 !important;
  border: 1px solid #dee2e6 !important;
}

body.theme-light .form-container input[type="text"]:focus,
body.theme-light .form-container input[type="email"]:focus,
body.theme-light .form-container input[type="password"]:focus {
  border-color: #007bff !important;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25) !important;
}

body.theme-light .form-container small {
  color: #6c757d !important;
}

body.theme-light .form-container .password-tips {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%) !important;
  color: #212529 !important;
  border: 1px solid #dee2e6 !important;
}

body.theme-light .form-container .password-tips b {
  color: #007bff !important;
}

header, footer {
  background: linear-gradient(135deg, #1e293b 0%, #334155 25%, #475569 50%, #334155 75%, #1e293b 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}

.hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 25%, #475569 50%, #334155 75%, #1e293b 100%) !important;
  color: #64ffda !important;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
  pointer-events: none;
  border-radius: 18px;
}

.about,
.article-card,
.team-card,
.category-card,
.password-form,
.result-container,
.tips,
.quiz-start,
.quiz-questions,
.quiz-result,
.about-contact,
.live-chat-placeholder {
  background: linear-gradient(135deg, #1e293b 0%, #334155 25%, #475569 50%, #334155 75%, #1e293b 100%) !important;
  color: #fff !important;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.about::before,
.article-card::before,
.team-card::before,
.category-card::before,
.password-form::before,
.result-container::before,
.tips::before,
.quiz-start::before,
.quiz-questions::before,
.quiz-result::before,
.about-contact::before,
.live-chat-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
  pointer-events: none;
  border-radius: 16px;
}

/* Dark theme headings */
body:not(.theme-light) .about h2, 
body:not(.theme-light) .article-card h2, 
body:not(.theme-light) .category-card h3, 
body:not(.theme-light) .team-card h2, 
body:not(.theme-light) .quiz-start h2, 
body:not(.theme-light) .quiz-result h2, 
body:not(.theme-light) .about-contact h2, 
body:not(.theme-light) .live-chat-placeholder h3 {
  color: #ffffff !important;
}

.article-card p, .about p, .team-card p, .category-card p, .password-form p, .result-container p, .tips p, .quiz-start p, .quiz-questions p, .quiz-result p, .about-contact p, .live-chat-placeholder p,
.article-card ul, .about ul, .team-card ul, .category-card ul, .password-form ul, .result-container ul, .tips ul, .quiz-start ul, .quiz-questions ul, .quiz-result ul, .about-contact ul, .live-chat-placeholder ul,
.article-card li, .about li, .team-card li, .category-card li, .password-form li, .result-container li, .tips li, .quiz-start li, .quiz-questions li, .quiz-result li, .about-contact li, .live-chat-placeholder li {
  color: #e6f3ff !important;
}

.btn-main, .btn, button, input[type=submit], .quiz-btn {
  background: linear-gradient(135deg, #64ffda 0%, #00d4aa 100%) !important;
  color: #0a192f !important;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(100, 255, 218, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-main::before, .btn::before, button::before, input[type=submit]::before, .quiz-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-main:hover, .btn:hover, button:hover, input[type=submit]:hover, .quiz-btn:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(25, 118, 210, 0.4);
}

.btn-main:hover::before, .btn:hover::before, button:hover::before, input[type=submit]:hover::before, .quiz-btn:hover::before {
  left: 100%;
} 
/* Like/Dislike Box */
.like-dislike-box {
  display: flex;
  gap: 10px;
  margin: 10px 0 20px 0;
  align-items: center;
}
.like-btn, .dislike-btn {
  background: var(--button-bg, #222);
  color: var(--button-text, #fff);
  border: none;
  border-radius: 5px;
  padding: 6px 16px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.like-btn:hover {
  background: #2ecc40;
  color: #fff;
}
.dislike-btn:hover {
  background: #e74c3c;
  color: #fff;
}
.like-btn.active {
  background: #27ae60;
}
.dislike-btn.active {
  background: #c0392b;
}
.like-count, .dislike-count {
  font-weight: bold;
} 
/* Toast แจ้งเตือน */
.custom-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #222;
  color: #fff;
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 1.1em;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 9999;
}
.custom-toast.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
} 

.article-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5em;
}

.article-card {
  min-height: unset;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(25,118,210,0.13);
  background: #f5faff;
}

.article-banner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 25%, #2d3748 50%, #1a2332 75%, #0f1419 100%) !important;
  border-radius: 18px;
  padding: 3em 2em;
  margin-bottom: 2em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.article-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

.article-banner > * {
  position: relative;
  z-index: 2;
}
.banner-img {
  width: 220px;
  height: auto;
  margin-right: 2em;
}
.banner-content h1 {
  color: #fff;
  font-size: 2.2em;
  margin-bottom: 0.5em;
}
.banner-content p {
  color: #e6f3ff;
  font-size: 1.1em;
}

.article-banner-img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  transition: transform 0.3s ease;
}

.article-banner-img:hover {
  transform: scale(1.02);
}

.article-banner-content {
  padding: 0.8em 1em 1em 1em;
  /* flex: 1; */
  /* display: flex; */
  /* flex-direction: column; */
  /* justify-content: flex-start; */
}

.article-card h2 {
  font-size: 1.1em;
  margin-bottom: 0.7em;
}

.article-card p {
  font-size: 0.98em;
  margin-bottom: 1em;
  color: var(--text-primary);
}

.read-more-btn {
  display: inline-block;
  margin-top: 0.5em;
  font-size: 0.95em;
  padding: 8px 20px;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  background: transparent;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  line-height: 1.2;
  vertical-align: middle;
}

.read-more-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  text-decoration: none;
}

.article-card {
  max-height: 280px;
  overflow: hidden;
}

.article-banner-content p {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
  max-height: 1.2em;
  width: 90%;
}

@media (max-width: 1100px) {
  .article-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .article-list { grid-template-columns: 1fr; }
  .article-banner {
    flex-direction: column;
    padding: 2em 1em;
    text-align: center;
    min-height: 150px;
  }
  .banner-img {
    margin: 0 0 1em 0;
    width: 120px;
  }
  .article-banner-img { height: 90px; }
} 
.quiz-banner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 25%, #2d3748 50%, #1a2332 75%, #0f1419 100%) !important;
  border-radius: 18px;
  padding: 2em 2em;
  margin-bottom: 2em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.quiz-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

.quiz-banner > * {
  position: relative;
  z-index: 2;
}
.quiz-banner .banner-img {
  width: 200px;
  height: auto;
  margin-right: 2em;
}
.quiz-banner .banner-content h1 {
  color: #fff;
  font-size: 2em;
  margin-bottom: 0.5em;
}
.quiz-banner .banner-content p {
  color: #e6f3ff;
  font-size: 1.1em;
}
@media (max-width: 700px) {
  .quiz-banner {
    flex-direction: column;
    padding: 1em 0.5em;
    text-align: center;
  }
  .quiz-banner .banner-img {
    margin: 0 0 1em 0;
    width: 110px;
  }
}

/* User Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.user-icon:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.user-icon i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 10px 0;
    margin-top: 10px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #667eea;
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 10px;
}

.dropdown-menu li a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(5px);
}

.dropdown-menu li a i {
    width: 16px;
    text-align: center;
}

/* Floating Action Menu */
.floating-action-menu {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    /* เพิ่ม padding เพื่อสร้าง buffer zone */
    padding: 20px;
    margin: -20px;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bg-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 1001;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
    /* เพิ่ม padding เพื่อให้เมาส์ไม่หลุดออกจากพื้นที่ */
    padding: 10px;
    margin: -10px;
}

/* เปลี่ยนจากการใช้ hover เป็น active class */
.floating-action-menu.active .fab-menu {
    display: flex;
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fabSlideIn 0.3s ease forwards;
}

.floating-action-menu.active .fab-item {
    opacity: 1;
    transform: translateY(0);
}

.fab-item:nth-child(1) { animation-delay: 0.1s; }
.fab-item:nth-child(2) { animation-delay: 0.2s; }
.fab-item:nth-child(3) { animation-delay: 0.3s; }

.fab-item:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.fab-chat {
    background: linear-gradient(135deg, #64ffda, #00bcd4);
}

.fab-community {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
}

.fab-theme {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #333;
}

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

/* Hide old individual buttons */
.theme-toggle,
.community-fab,
#liveChatBtn {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .floating-action-menu {
        bottom: 16px;
        right: 16px;
        padding: 16px;
        margin: -16px;
    }
    
    .fab-main {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
    
    .fab-item {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }
    
    .fab-menu {
        bottom: 66px;
        gap: 12px;
        padding: 8px;
        margin: -8px;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: var(--shadow-hover);
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
} 

/* Hero Banner for Individual Article Pages */
.topic-hero-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.topic-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(100, 255, 218, 0.1) 0%, rgba(0, 212, 170, 0.1) 100%);
    pointer-events: none;
}

.hero-image {
    position: relative;
    z-index: 2;
    margin-right: 30px;
}

.hero-banner-img {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.hero-banner-img:hover {
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.hero-title {
    color: white;
    font-size: 3rem;
    margin: 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-tagline {
    color: #e74c3c;
    font-size: 1.3rem;
    margin: 10px 0 0 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.article-content {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

/* Responsive Design for Hero Banner */
@media (max-width: 768px) {
    .topic-hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .hero-image {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .hero-banner-img {
        width: 100px;
        height: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .topic-hero-banner {
        padding: 25px 15px;
        min-height: 180px;
    }
    
    .hero-banner-img {
        width: 80px;
        height: 80px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
}

/* Article Icon Replacement */
.article-icon-replacement {
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.article-icon-replacement:hover {
    transform: scale(1.05);
}

.article-icon-animated {
    font-size: 3em;
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Special animation for Phishing hook */
.article-icon-animated:contains('🎣') {
    animation: fishingHook 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }
    50% { 
        transform: scale(1.1); 
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    }
    100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }
}

@keyframes fishingHook {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Article Sources Styles */
.article-sources {
    margin-top: 2em;
    padding: 1.5em;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    box-shadow: var(--shadow);
}

.article-sources h3 {
    color: var(--text-primary);
    margin-bottom: 1em;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.source-link {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.8em 1em;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: 8px;
    text-decoration: none;
    color: var(--accent-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.source-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--accent-secondary);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
}

.source-link i {
    font-size: 0.9em;
    opacity: 0.8;
}

.source-text {
    padding: 0.8em 1em;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: 8px;
    color: var(--text-secondary);
    font-style: italic;
    border: 1px solid var(--border-color);
}

/* Dark theme adjustments for sources */
body.theme-dark .article-sources {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    border-left-color: var(--accent-primary);
}

body.theme-dark .source-link {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-color: #404040;
}

body.theme-dark .source-link:hover {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

body.theme-dark .source-text {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-color: #404040;
}

/* Responsive design for sources */
@media (max-width: 768px) {
    .article-sources {
        padding: 1em;
        margin-top: 1.5em;
    }
    
    .article-sources h3 {
        font-size: 1.1em;
    }
    
    .source-link, .source-text {
        padding: 0.6em 0.8em;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .article-sources {
        padding: 0.8em;
        margin-top: 1em;
    }
    
    .article-sources h3 {
        font-size: 1em;
    }
    
    .source-link, .source-text {
        padding: 0.5em 0.7em;
        font-size: 0.85em;
    }
}

/* Quiz Action Section Styles */
.quiz-action-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 18px;
    padding: 2.5em 2em;
    margin: 2em 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.quiz-action-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(100, 255, 218, 0.1) 0%, 
        rgba(0, 212, 170, 0.1) 50%, 
        rgba(100, 255, 218, 0.1) 100%);
    pointer-events: none;
}

.quiz-action-container {
    position: relative;
    z-index: 1;
}

.quiz-action-section h3 {
    font-size: 1.8em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    font-weight: 700;
}

.quiz-action-section p {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 2em;
    line-height: 1.6;
}

.quiz-action-buttons {
    display: flex;
    gap: 1.5em;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 1em 2em;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.quiz-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
}

.quiz-btn:hover::before {
    left: 100%;
}

.quiz-btn.primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.quiz-btn.primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.quiz-btn.secondary {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--border-color) 100%);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-btn.secondary:hover {
    background: linear-gradient(135deg, var(--border-color) 0%, var(--text-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.quiz-btn i {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.quiz-btn:hover i {
    transform: scale(1.1);
}

/* Dark theme adjustments */
body.theme-dark .quiz-action-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
}

body.theme-dark .quiz-btn.secondary {
    background: linear-gradient(135deg, #404040 0%, #555555 100%);
    color: #ffffff;
    border-color: #555555;
}

body.theme-dark .quiz-btn.secondary:hover {
    background: linear-gradient(135deg, #555555 0%, #666666 100%);
}

/* Responsive design */
@media (max-width: 768px) {
    .quiz-action-section {
        padding: 2em 1.5em;
        margin: 1.5em 0;
    }
    
    .quiz-action-section h3 {
        font-size: 1.5em;
    }
    
    .quiz-action-section p {
        font-size: 1em;
    }
    
    .quiz-action-buttons {
        flex-direction: column;
        gap: 1em;
    }
    
    .quiz-btn {
        width: 100%;
        justify-content: center;
        padding: 1.2em 2em;
    }
}

@media (max-width: 480px) {
    .quiz-action-section {
        padding: 1.5em 1em;
    }
    
    .quiz-action-section h3 {
        font-size: 1.3em;
    }
    
    .quiz-btn {
        font-size: 1em;
        padding: 1em 1.5em;
    }
}

/* Learning and Encouragement Styles */
.learning-note {
    color: #ff9800;
    font-style: italic;
    font-size: 0.9em;
    margin-top: 0.5em;
    background: rgba(255, 152, 0, 0.1);
    padding: 0.3em 0.6em;
    border-radius: 4px;
    border-left: 3px solid #ff9800;
}

.result-message {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    padding: 1.5em;
    margin: 1em 0;
    text-align: center;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-primary);
}

.result-message strong {
    color: var(--accent-primary);
}

.encouragement-high {
    color: #4caf50;
    font-weight: bold;
}

.encouragement-medium {
    color: #ff9800;
    font-weight: bold;
}

.encouragement-low {
    color: #f44336;
    font-weight: bold;
}

/* Dark theme adjustments for learning elements */
body.theme-dark .learning-note {
    background: rgba(255, 152, 0, 0.2);
    border-left-color: #ff9800;
}

body.theme-dark .result-message {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    border-left-color: var(--accent-primary);
}

/* Responsive design for learning elements */
@media (max-width: 768px) {
    .result-message {
        padding: 1em;
        margin: 0.8em 0;
    }
    
    .learning-note {
        font-size: 0.85em;
        padding: 0.2em 0.5em;
    }
}

/* Light theme adjustments for quiz results */
body.theme-light .result-message {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    border-left: 4px solid #007bff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

body.theme-light .result-message strong {
    color: #007bff;
}

body.theme-light .review-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.theme-light .review-item.correct {
    background: #f8fff9;
    border-left-color: #28a745;
    color: #155724;
    border: 1px solid #d4edda;
}

body.theme-light .review-item.incorrect {
    background: #fff8f8;
    border-left-color: #dc3545;
    color: #721c24;
    border: 1px solid #f8d7da;
}

body.theme-light .review-item strong {
    color: #495057;
}

body.theme-light .btn-restart {
    background: #007bff;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

body.theme-light .btn-restart:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Light theme for learning encouragement section */
body.theme-light .learning-encouragement {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 1.5em;
    margin: 1em 0;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

body.theme-light .encouragement-message {
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 1em;
    text-align: center;
}

body.theme-light .learning-topics {
    color: #495057;
}

body.theme-light .learning-topics h4 {
    color: #007bff;
    font-size: 1.2em;
    margin-bottom: 0.8em;
}

body.theme-light .learning-topics ul {
    list-style: none;
    padding: 0;
}

body.theme-light .learning-topics li {
    background: #e3f2fd;
    margin: 0.5em 0;
    padding: 0.8em 1em;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    color: #1565c0;
    font-weight: 500;
}

body.theme-light .learning-topics li:hover {
    background: #bbdefb;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

@media (max-width: 600px) {
    .review-item {
        padding: 1.2em 1em 1.2em 2.5em;
        font-size: 1em;
    }
    .review-item .icon {
        left: 0.5em;
        top: 1em;
        font-size: 1.2em;
    }
}

/* เพิ่ม CSS สำหรับการเข้าถึง (Accessibility) */
/* ปรับขนาดตัวอักษรในบทความให้เหมาะสมสำหรับผู้ที่มีสายตาไม่ดีและผู้สูงอายุ */

/* ฟีเจอร์ปรับขนาดตัวอักษร */
.font-size-controls {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(26, 38, 55, 0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.font-size-controls h4 {
    color: #64ffda;
    margin: 0 0 10px 0;
    font-size: 0.9em;
    text-align: center;
}

.font-size-btn {
    background: linear-gradient(135deg, #64ffda, #00d4aa);
    color: #0a192f;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 2px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.font-size-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.4);
}

.font-size-btn.active {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
}

/* ขนาดตัวอักษรสำหรับการเข้าถึง */
.accessibility-large .article-content {
    font-size: 1.3em !important;
    line-height: 1.8 !important;
}

.accessibility-large .article-content h3 {
    font-size: 1.6em !important;
    margin: 1.8em 0 1em 0;
}

.accessibility-large .article-content p {
    font-size: 1.3em !important;
    line-height: 1.8 !important;
    margin-bottom: 1.2em;
}

.accessibility-large .article-content li {
    font-size: 1.25em !important;
    line-height: 1.7 !important;
    margin-bottom: 0.8em;
}

.accessibility-extra-large .article-content {
    font-size: 1.5em !important;
    line-height: 2.0 !important;
}

.accessibility-extra-large .article-content h3 {
    font-size: 1.8em !important;
    margin: 2em 0 1.2em 0;
}

.accessibility-extra-large .article-content p {
    font-size: 1.5em !important;
    line-height: 2.0 !important;
    margin-bottom: 1.5em;
}

.accessibility-extra-large .article-content li {
    font-size: 1.4em !important;
    line-height: 1.8 !important;
    margin-bottom: 1em;
}

/* ปรับปรุงขนาดตัวอักษรพื้นฐานในบทความ */
.article-content {
    font-size: 1.15em; /* เพิ่มขนาดจากเดิม */
    line-height: 1.7;
    color: var(--text-primary);
}

.article-content h3 {
    font-size: 1.45em; /* เพิ่มขนาดหัวข้อ */
    margin: 1.6em 0 0.9em 0;
    color: var(--accent-primary);
    font-weight: 600;
}

.article-content p {
    font-size: 1.15em; /* เพิ่มขนาดข้อความ */
    line-height: 1.7;
    margin-bottom: 1.1em;
    color: var(--text-primary);
}

.article-content li {
    font-size: 1.1em; /* เพิ่มขนาดรายการ */
    line-height: 1.6;
    margin-bottom: 0.7em;
    color: var(--text-primary);
}

.article-content ul, .article-content ol {
    padding-left: 1.3em;
    margin: 1em 0;
}

.article-content strong, .article-content b {
    font-weight: 600;
    color: var(--accent-secondary);
}

.article-content em, .article-content i {
    font-style: italic;
    color: var(--text-secondary);
}

/* ปรับปรุงการแสดงผลสำหรับหน้าจอขนาดต่างๆ */
@media (max-width: 768px) {
    .article-content {
        font-size: 1.1em;
        line-height: 1.6;
    }
    
    .article-content h3 {
        font-size: 1.35em;
    }
    
    .article-content p {
        font-size: 1.1em;
        line-height: 1.6;
    }
    
    .article-content li {
        font-size: 1.05em;
        line-height: 1.5;
    }
}

@media (max-width: 600px) {
    .article-content {
        font-size: 1.05em;
        line-height: 1.6;
    }
    
    .article-content h3 {
        font-size: 1.3em;
    }
    
    .article-content p {
        font-size: 1.05em;
        line-height: 1.6;
    }
    
    .article-content li {
        font-size: 1.0em;
        line-height: 1.5;
    }
    
    .font-size-controls {
        position: fixed;
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .article-content {
        font-size: 1.0em;
        line-height: 1.5;
    }
    
    .article-content h3 {
        font-size: 1.2em;
    }
    
    .article-content p {
        font-size: 1.0em;
        line-height: 1.5;
    }
    
    .article-content li {
        font-size: 0.95em;
        line-height: 1.4;
    }
}

