/* --- ชุดสี (Theme) --- */
:root {
    --bg-main: #120a1f;
    --bg-card: #1d1133;
    --bg-card-hover: #261742;
    --text-main: #ffffff;
    --text-secondary: #c4b0e2;
    --accent-color: #a56eff;
    --border-color: #341f56;
    --grid-line: rgba(165, 110, 255, 0.05);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Kanit', sans-serif;
    min-height: 100vh;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
}

.main-container {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 40px;
}

/* --- Banner --- */
.banner-wrapper {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(165, 110, 255, 0.2);
}
.banner-img { width: 100%; height: auto; display: block; }

/* --- Header Info --- */
.header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding: 0 10px;
}
.header-left { flex: 1; text-align: left; }
.header-right { flex: 1; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(165, 110, 255, 0.3);
}
.text-accent { color: var(--accent-color); }

.about-section h3 {
    font-size: 1rem; color: var(--text-secondary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px;
}
.about-section p {
    font-size: 1.1rem; line-height: 1.6; color: var(--text-secondary); max-width: 500px;
}

.status-indicator {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-secondary); font-size: 0.9rem;
}

.dot {
    width: 10px; 
    height: 10px; 
    background-color: #555; 
    border-radius: 50%; 
    transition: all 0.3s ease;
}

.dot.normal {
    background-color: #28a745; 
    box-shadow: 0 0 10px #28a745;
}

.dot.warning {
    background-color: #ffc107; 
    box-shadow: 0 0 10px #ffc107;
}

.dot.critical {
    background-color: #dc3545; 
    box-shadow: 0 0 10px #dc3545;
}

/* --- Language Button Style --- */
.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.lang-btn:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* --- Grid Cards --- */
.content-area {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    background-color: var(--bg-card-hover);
    box-shadow: 0 5px 15px rgba(165, 110, 255, 0.1);
}

/* สไตล์สำหรับรูปภาพสี่เหลี่ยม */
.card-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

/* สไตล์สำหรับ FontAwesome Icon */
.card-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    font-size: 3rem;
    color: var(--accent-color);
}

.card-content h3 { font-size: 1.2rem; margin-bottom: 5px; }
.highlight { color: var(--accent-color); font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.description { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .header-info { flex-direction: column; gap: 30px; }
    .header-right { text-align: left; align-items: flex-start; }
    .content-area { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.5rem; }
}

.status-indicator {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 2px;
    color: var(--text-secondary); 
    font-size: 0.9rem;
}

.status-link {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 15px;
    opacity: 0.5;
    transition: all 0.3s ease;
    border-bottom: 1px dotted transparent;
    display: inline-block;
}

.status-link:hover {
    opacity: 1;
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* --- Social Icons (Header) --- */
.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px; /* เว้นระยะห่างจากสถานะ */
}

.social-icons a {
    color: var(--text-secondary);
    font-size: 1.6rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05); /* พื้นหลังจางๆ */
    border: 1px solid var(--border-color);
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--text-main);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(165, 110, 255, 0.4);
    transform: translateY(-3px);
}

/* --- Footer --- */
.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Floating Stats Widget --- */
.stats-floating-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    
    display: flex;
    align-items: center;
    gap: 10px;
    
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    user-select: none;
    animation: fadeInUp 0.5s ease-out;
}

.divider { color: rgba(255, 255, 255, 0.3); font-size: 12px; }

/* Stat Item General */
.stat-item {
    display: flex;
    align-items: center;
    cursor: default;
    transition: all 0.3s ease;
}

.stat-item i { margin-right: 6px; }

/* --- Like Button Specific --- */
.like-item {
    cursor: pointer; /* เมาส์เป็นรูปนิ้วกดได้ */
}

.like-item:hover {
    transform: scale(1.1); /* ขยายเล็กน้อยเมื่อชี้ */
}

/* สถานะ Active (เมื่อกด Like แล้ว) */
.like-item.active {
    color: #ff4757; /* สีแดง */
}

.like-item.active i {
    animation: heartBeat 0.3s forwards; /* อนิเมชันหัวใจเต้น */
}

/* --- View Item Specific (Animation เดิม) --- */
.view-item .hover-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.4s ease-in-out;
}

.view-item:hover .hover-text {
    max-width: 60px;
    opacity: 1;
    margin-right: 5px;
}

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

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Mobile */
@media (max-width: 600px) {
    .stats-floating-widget { bottom: 10px; left: 10px; padding: 6px 12px; font-size: 12px; }
}