/* css/phantichAI.css */

/* --- BIẾN TOÀN CỤC (VARIABLES) --- */
:root {
    --font-primary: 'Readex Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --color-background: #f9fafb;
    --color-surface: #ffffff;
    --color-text-primary: #111827;
    --color-text-secondary: #6b7280;
    --color-border: #e5e7eb;
    --color-hanzi: #d94848;
    --color-accent: #3b82f6;
    --color-accent-light: rgba(59, 130, 246, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
    --color-background: #111827;
    --color-surface: #1f2937;
    --color-text-primary: #f9fafb;
    --color-text-secondary: #9ca3af;
    --color-border: #374151;
}

#phantichai-result-container {
    animation: fadeIn 0.5s var(--transition);
}

.phantich-ai-wrapper {
    max-width: 768px;
    margin: 1rem auto 2rem auto;
    padding: 2rem;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.hanzi-char {
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--color-hanzi);
    text-align: center;
    margin-bottom: 0.25rem;
}

.hanzi-meaning {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.result-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    gap: 1rem;
}

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

.result-item .label {
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
}

.result-item .value {
    color: var(--color-text-secondary);
}

.spinner {
    margin: 2.5rem auto;
    border: 4px solid var(--color-border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--color-accent);
    animation: spin 1s linear infinite;
}

.loading {
    color: var(--color-text-secondary);
    text-align: center;
    padding: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* File: css/phuthuy-style.css */

/* --- HIỆU ỨNG KHI BẬT CHẾ ĐỘ PHÙ THỦY HÁN TỰ --- */

/* Thêm một lớp (class) vào body khi checkbox được tick */
body.phuthuy-mode #searchForm {
  /* Thay đổi viền của thanh tìm kiếm */
  border: 1px solid #ffc400; /* Màu xanh ngọc */
  
  /* Thêm hiệu ứng tỏa sáng (glow) */
  box-shadow: 0 0 100px rgb(255, 252, 53);
  
  /* Hiệu ứng chuyển động mượt mà */
  transition: all 0.4s ease-in-out;
}

/* Tùy chỉnh cho giao diện tối (dark theme) */
body.dark-theme.phuthuy-mode #searchForm {
  border: 1px solid #4c00ff; /* Màu xanh ngọc */
  box-shadow: 0 0 100px rgb(77, 53, 255);
}

/* Thay đổi màu chữ của label "Phù thủy Hán Tự" khi được chọn */
#phantichAiCheckbox:checked + label {
    color: #3f14ff; /* Màu xanh dương */
    font-weight: bold;
}

body.dark-theme #phantichAiCheckbox:checked + label {
    color: #3f14ff; /* Màu xanh neon */
}

body.phuthuy-mode #searchForm:hover{
  border: 1px solid #ffc400; 
box-shadow: 0 0 50px rgb(255, 252, 53);
  
  /* Hiệu ứng chuyển động mượt mà */
  transition: all 0.3s ease-in-out;}

  body.dark-theme.phuthuy-mode #searchForm:hover{
  
   border: 1px solid #4c00ff; /* Màu xanh ngọc */
  box-shadow: 0 0 50px rgb(77, 53, 255);
  
  transition: all 0.3s ease-in-out;}

body.phuthuy-mode #cards-placeholder,
body.phuthuy-mode #pagination-controls, body.phuthuy-mode #displayed-image, body.phuthuy-mode .horizontal-center-wrapper, body.phuthuy-mode .comment-section-container, body.phuthuy-mode .about-title, body.phuthuy-mode .menu, body.phuthuy-mode .site-footer.modern-footer,  body.phuthuy-mode .labelansach{
filter:opacity(20%);
transition: all 0.3s ease-in-out;
}
.phuthuy-mode .HSK{display: none;}


.phuthuy-mode #hideUnfocusedCheckbox{display: none;}

  @media (max-width: 800px) {


    /* Thêm vào cuối file: css/phuthuy-style.css */

/* --- GIẢI QUYẾT XUNG ĐỘT TRÊN DI ĐỘNG --- */

/* Khi chế độ Phù Thủy được bật, bắt buộc ẩn khu vực sách và phân trang */
body.phuthuy-mode #cards-placeholder,
body.phuthuy-mode #pagination-controls {
    display: none !important; /* !important để đảm bảo quy tắc này được ưu tiên cao nhất */
}

  
}