@font-face {
    font-family: 'Di7';
    src: url('../fonts/digital-7.ttf');
    font-display: swap;
}
@font-face {
    font-family: 'Di7Mono';
    src: url('../fonts/Digital7Mono.ttf');
    font-display: swap;
}
@font-face {
    font-family: 'Di';
    src: url('../fonts/clockicons.ttf');
    font-display: swap;
}

@font-face {
    font-family: RBold;
    src: url('../fonts/Roboto-Bold.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: RMedium;
    src: url('../fonts/Roboto-Medium.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: RRegular;
    src: url('../fonts/Roboto-Regular.ttf') format('truetype');
    font-display: swap;
}
:root {
    --primary-color: #027353;
    --text-color: #fff;
    --hover-color: #ffff00;
    --bg-color: #f9f9f9;
    --footer-bg: #222;
    --footer-text: #ddd;

    /* Màu văn bản */
    --text-light: #555;
    --text-muted: #888;

    /* Màu nền */
    --bg-light: #f9f9f9;
    --bg-dark: #121212;

    /* Màu viền */
    --border-color: #ddd;

    /* Màu nhấn phụ (secondary) nếu cần */
    --secondary-color: #00c2a8;
    --secondary-hover: #009c87;

    /* Màu dùng cho link */
    --link-color: var(--primary-color);
    --link-hover: var(--primary-hover);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    *font-family: 'Segoe UI', sans-serif;
    font-family:RRegular;
    background-color: var(--bg-color);
    color: #333;
}
.pas{padding:5px}
.pam{padding:10px}
.pal{padding:20px}
.pts{padding-top:5px}
.ptm{padding-top:10px !important;}
.pt5{padding-top:50px}
.ptl{padding-top:20px}
.prs{padding-right:5px}
.prm{padding-right:10px}
.prl{padding-right:20px}
.pbs{padding-bottom:5px}
.pbm{padding-bottom:10px}
.pbl{padding-bottom:20px}
.pls{padding-left:5px}
.plm{padding-left:10px}
.pll{padding-left:20px}
.phs{padding-left:5px;padding-right:5px}
.phm{padding-left:10px;padding-right:10px}
.phl{padding-left:20px;padding-right:20px}
.pvs{padding-top:5px;padding-bottom:5px}
.pvm{padding-top:10px;padding-bottom:10px}
.pvl{padding-top:20px;padding-bottom:20px}
.mas{margin:5px}
.mam{margin:10px}
.mal{margin:20px}
.mts{margin-top:5px}
.mtm{margin-top:10px}
.mt15{margin-top:15px}
.mt30{margin-top:30px}
.mtl{margin-top:20px !important}
.mrs{margin-right:5px}
.mrm{margin-right:10px}
.mrl{margin-right:20px}
.mbs{margin-bottom:5px}
.mbm{margin-bottom:10px}
.mb15{margin-bottom:15px}
.mb30{margin-bottom:30px}
.mbl{margin-bottom:20px}
.mls{margin-left:5px}
.mlm{margin-left:10px}
.mll{margin-left:20px}
.mhs{margin-left:5px;margin-right:5px}
.mhm{margin-left:10px;margin-right:10px}
.mhl{margin-left:20px;margin-right:20px}
.mvs{margin-top:5px;margin-bottom:5px}
.mvm{margin-top:10px;margin-bottom:10px}
.mvl{margin-top:20px;margin-bottom:20px}
.fss{font-size:9px}
.fsm{font-size:11px}
.fsl{font-size:13px}
.fsxl{font-size:16px}
.fsxxl{font-size:18px}
.fwn{font-weight:normal}
.fwb{font-family:RBold}
.fca{color:#DD4B39}
.fcb{color:#333}
.fcg{color:gray}
.fcw{color:White}
.bcw{background-color:#fff}
.fcgb{color:#414B56}
.w1{width:100px}
.w2{width:200px}
.w3{width:300px}
.w4{width:400px}
.w5{width:500px}
.w6{width:600px}
.w7{width:700px}
.w8{width:800px}
.w9{width:900px}
.w12{width:120px}
.w15{width:150px}
.w25{width:250px}
.w35{width:350px}
.w45{width:450px}
.w55{width:550px}
.w65{width:650px}
.w75{width:750px}
.h10{height:10px}
.h20{height:20px}
.h30{height:30px}
.h40{height:40px}
.h50{height:50px}
.h60{height:60px}
.h70{height:70px}
.h80{height:80px}
.h90{height:90px}
.h100{height:100px}
.h200{height:200px}
.h300{height:300px}
.h150{height:150px}
.h250{height:250px}
.h350{height:350px}
.br1{border-radius:1px !important;}
.br2{border-radius:2px !important;}
.br3{border-radius:3px !important;}
.br4{border-radius:4px !important;}
.br5{border-radius:5px !important;}
.br6{border-radius:6px !important;}
.br7{border-radius:7px !important;}
.br8{border-radius:8px !important;}
.br9{border-radius:9px !important;}
.br10{border-radius:10px !important;}
.c{clear: both;}
h2, h3, h4, b, strong{
    font-family: RBold;
}
h2, h3, h4, b, strong{
    font-weight: normal;
}
.s-logo a {
    color: #fff !important;
    display: block;
    line-height: 35px;
    font-family: RBold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: normal;
    text-shadow: 1px 1px 1px #004992, 0 0 25px #ffff00, 0 0 1px #ffff00;
}
.s-logo ._sss {
    font-size: 14px;
    text-transform: lowercase;
    text-shadow: none;
    font-family: 'RRegular';
}

body.menu-open {
    overflow: hidden;
}

header {
    background-color:#3098FF;
    height: 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.menu-container{
    position: relative;    /* tạo stacking context rõ ràng */
    z-index: 10;
    overflow: visible;     /* đảm bảo dropdown tràn ra được */
}
.menu-container .submenu {
    z-index: 9999999;          /* bạn đã có, giữ nguyên hoặc tăng lên */
}
.menu-container .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.menu-container .menu-item {
    position: relative;
}
.menu-container .menu .menu-item a {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease;
}
.menu-container .menu .menu-item a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}
.menu-container .menu .menu-item a i {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}
.menu-container .menu-item:hover a i {
    transform: rotate(180deg);
}
.menu-container .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 1px 0;
    z-index: 999;
}
.menu-container .submenu li {
    list-style: none;
}
.menu-container .submenu li a {
    display: block;
    padding: 10px 15px !important;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}
.menu-container .submenu li a:hover {
    background: #3098FF !important;
    color: #fff !important;
    border-radius: 3px !important;
}
.menu-container .menu-item:hover .submenu {
    display: block;
}

/* Danh sách menu cha */
.main-menu .menu {
    list-style: none;
    margin: 20px 10px;
    padding: 0;
    display: flex;
    justify-content: space-between;
}

/* Mục menu cha */
.main-menu .menu-item {
    position: relative;
    flex: 1 1 50%;              /* mỗi khối chiếm 50% */
    margin: 0 10px;
}

/* Link menu cha */
.main-menu .menu-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #267ACC;
    border-radius: 5px 5px 0 0;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-family: RBold;
}

/* Icon mũi tên */
.main-menu .menu-item > a i {
    margin-left: 6px;
    font-size: 12px;
}

/* Submenu (luôn xổ) */
.main-menu .submenu {
    display: block;  /* luôn hiển thị */
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 0 0 5px 5px;
    *box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Item trong submenu */
.main-menu .submenu li {
    margin: 0;
}

/* Link submenu */
.main-menu .submenu li a {
    display: block;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.main-menu .submenu li a:hover {
    background: #f0f0f0;
}

.tools{
    margin-left: 20px;
    padding-right: 30px;
    display: flex;
    gap:10px;
    width: auto;
    align-items:center
}
h1{
    font-size: 28px;
    color: #000;
    text-transform: uppercase;
    font-weight: normal;
    font-family: RBold;
}
.breadcrumb {
    font-size: 14px;
    color: #6c757d;
    padding: 15px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap:8px
}
.breadcrumb a {
    color: #3098ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #ff8800;
}

.breadcrumb span {
    color: #212529;
}

.breadcrumb a::after,
.breadcrumb span::after {
    content: "›";
    margin: 0 0 0 8px;
    color: #adb5bd;
}

.breadcrumb span::after, ._last::after {
    content: "" !important;
}


.menu-container {
    display: flex;
    align-items: center;
    *overflow: hidden;
    position: relative;
    flex: 1;
    justify-content: flex-end;
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    *overflow: hidden;
    white-space: nowrap;
    color: #A4CFFF;
    font-size: 12px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    flex-shrink: 0;
    font-size: 16px;
}

nav a:hover {
    color: var(--hover-color);
}

nav a.active {
    *text-decoration: underline;
    *text-underline-position:under;
    color: var(--hover-color);
    font-family: RBold;
}

#nav_mobile {
    background: #61B0FF; /* Màu nền menu */
    width: 100vw; /* Chiều rộng menu */
    height: auto; /* Chiều cao tự động */
    overflow-y: auto; /* Ẩn nội dung ngoài chiều cao */
    position: fixed; /* Đặt menu cố định */
    z-index: 10000000; /* Đảm bảo menu nằm trên các phần tử khác */
    top: 45px; /* Khoảng cách từ trên cùng */
    display: none; /* Ẩn menu ban đầu */
    opacity: 0.5; /* Đặt độ mờ ban đầu là 0 */
    transition: opacity 0.3s ease, height 0.3s ease; /* Hiệu ứng mờ dần và chiều cao */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Đổ bóng cho menu */
    padding-left: 0;
}

#nav_mobile.show {
    display: block; /* Hiện menu */
    opacity: 1; /* Đặt độ mờ thành 1 khi hiển thị */
}

#nav_mobile a {
    color: #222;
    font-size: 16px;
    display: block;
    line-height: 30px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #B8DDFF;
    text-decoration: none;
    transition: background 0.3s;
}

#nav_mobile a:hover {
    background: #006BD7; /* Màu nền khi di chuột qua */
    color: #FFF;
}

#nav_mobile a.icon_arrowleft {
    background: #ff6600; /* Màu nền cho mục đặc biệt */
    font-size: 18px; /* Kích thước chữ lớn hơn cho mục đặc biệt */
    font-family: 'RBold'; /* Phông chữ đặc biệt cho mục */
    border-bottom: 1px solid #027353; /* Đường viền dưới */
}

.menu-toggle {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 14px;
    cursor: pointer;
    position: absolute;
    right: 25px;
    z-index: 1100;
}

.menu-toggle div {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
}

.menu-toggle div:nth-child(1) { top: 0; }
.menu-toggle div:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle div:nth-child(3) { bottom: 0; }

.menu-toggle.active div:nth-child(1) {
    top: 40%;
    transform: rotate(45deg);
}
.menu-toggle.active div:nth-child(2) { opacity: 0; }
.menu-toggle.active div:nth-child(3) {
    bottom: 40%;
    transform: rotate(-45deg);
}

.language-selector {
    position: relative;
    user-select: none;
}

.lang-btn {
    color: #fff;
    *border: 1px solid #ddd;
    border-color: rgb(255,255,255,0.3);
    background-color: rgba(255,255,255,0.2);
    padding:7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lang-btn label{
    cursor: pointer;
}
.lang-list {
    position: absolute;
    top: 80%;
    left: 0;
    background: #FFF;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    min-width: 200px;
    max-height: 400px;
    z-index: 2947483647;
    animation: fadeDropdown 0.3s ease forwards;
    scroll-behavior: smooth;
    padding-left: 0;
}
.lang-list li {
    cursor: pointer;
    transition: background 0.2s ease;
    list-style: none;
}
.lang-list li:hover {
    background: #DCEEFF;
}
#current-lang i{
    font-style: normal;
    text-transform: uppercase;
    font-family: RBold;
}

/* ===== Thêm style cho link trong danh sách ngôn ngữ ===== */
.lang-list li a {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    color: #222;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    transition: color 0.2s ease;
}

.lang-list li a:hover {
    color: #3098ff;
}

/* Trạng thái đang chọn */
.lang-list li a.active {
    font-family: RBold;
    background: #DCEEFF;
}

/* Mã ngôn ngữ (EN, VI, JP,...) */
.lang-list .lang-code {
    text-transform: uppercase;
    font-family: RBold;
    color: #3098ff;
    font-size: 0.85rem;
}

#nav_mobile .language-selector {
    position: relative;
    margin: 20px;
}

#nav_mobile .language-toggle {
    background-color: #f3f4f6;
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#nav_mobile .language-toggle .arrow {
    font-size: 12px;
}

#nav_mobile .language-item {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background:rgb(255,255,255,0.2);
    *box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 12px 12px 60px 12px;
    z-index: 999;
    width: 96vw;
    flex-wrap: wrap;
    gap: 10px;
}
#nav_mobile .language-item.show {
    display: flex;
}

#nav_mobile .language-selector.show .language-item {
    display: flex;
}

#nav_mobile .language-item div {
    flex: 0 0 auto;
}

#nav_mobile .language-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #f9f9f9;
    border-radius: 6px;
    background-color: #f9f9f9;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    width: 180px;
    transition: background 0.2s ease;
}

#nav_mobile .language-item a:hover {
    background-color: #e5e7eb;
    color: #000;
}

#nav_mobile .language-item a.active {
    background-color: #ffffcc;
    color: #000 !important;
    font-family: RBold;
    border: 1px solid #ffcc00;
}

#nav_mobile .lang-code {
    font-family: RBold;
    font-size: 12px;
    background: #eee;
    padding: 0px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.related-links {
    background: linear-gradient(135deg,#f0f4f8,#ffffff);
    padding: 10px 15px;
    margin-top: 20px;
    border-left: 4px solid #3098FF;
}
.related-links p, .related-links li {
    margin: 5px 0;
}
.related-links a {
    color: #3098FF;
    text-decoration: underline;
}
.related-links a:hover {
    text-decoration: none;
}
ul.none_style{
    list-style: none;
    margin-left: -20px;
}

.copy-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 100%;
}
.copy-box label {
    font-size: 16px;
    display: block;
    margin-bottom: 6px;
}

.copy-box input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #999;
}
.copy-box input[type="button"] {
    background: linear-gradient(135deg, #3098FF, #1E80E0);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
.copy-box input[type="button"]:hover {
    background: linear-gradient(135deg, #267fe7, #176ac2);
    transform: translateY(-1px);
}
.app-nav-dock {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 20px;
    padding: 6px 8px;
    z-index: 1001;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    transition: .3s;
}

.nav-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
    font-size: 13px;
    min-width: 52px;
}

.nav-dock-item:hover,
.nav-dock-item.active {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.nav-dock-item span.fas {
    font-size: 18px;
}

/* Label dưới icon */
.nav-dock-item-label {
    font-size: 12px;
    margin-top: 5px;
}

/* Mobile: chỉ để icon */
@media (max-width: 600px) {
    .nav-dock-item-label {
        display: none;
    }
    .nav-dock-item {
        padding: 10px;
        min-width: auto;
    }
}
/* 🌙 Dark mode */
body.dark-mode .app-nav-dock {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

body.dark-mode .nav-dock-item {
    color: #aaa;
}

body.dark-mode .nav-dock-item:hover,
body.dark-mode .nav-dock-item.active {
    background: rgba(0, 123, 255, 0.15);
    color: #4da8ff;
}

.cfooter {
    padding: 0 0px 15px 0px;
    color: #f0f0f0;
    font-size: 14px;
    margin: 0 auto;
    border-top: 0;
}
.blmobile{
    display: none;
}

/*.cfooter > div {
    flex: 1 1 0;
    text-align: center;
    padding: 10px;
}*/

.cfooter .cpright, .cfooter .txt_slogan{
    color: #AAA;
    margin: 5px 0;
}
.cfooter .ft_content a {
    display: inline-block;
    margin: 0 8px;
    font-size: 18px;
    color: #f0f0f0;
    transition: color 0.3s;
}

.cfooter .ft_content a:hover {
    color: #1da1f2;
}

/* Middle content */
.cfooter .ft_content .txt_logo {
    font-family: RBold;
    font-size: 16px;
    color: #DFDFDF;
    text-decoration: none;
}

.cfooter .ft_content p {
    margin: 4px 0;
    color: #CCC;
    font-size: 13px;
}

/* Language selector */
.cfooter .language-selector {
    position: relative;
    text-align: right;
    padding-right: 0;
}

.cfooter .language-selector .popover-button {
    background-color: #444;
    border: 1px solid #444;
    padding: 6px 10px;
    border-radius: 6px;
    color: #f0f0f0;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cfooter .language-selector .lang-code, .language-popup-overlay .lang-code {
    font-family: RRegular;
    text-transform: uppercase;
    background: RGBA(153, 153, 153, 0.5);
    padding: 2px 6px;
    border-radius: 3px;
    color: #FFF;
    display: inline-block;
    width: 30px;
    text-align: center;
    margin-right: 3px;
}
.cfooter .language-selector .lang-link{
    display: inline-flex !important;
    width: 100%;
    justify-content: left;
    align-items: center;
    gap: 6px; /* Khoảng cách giữa các phần tử */
    text-decoration: none;
    color: #333; /* tuỳ chỉnh */
}
.lang-link img {
    height: 20px; /* tuỳ chỉnh theo thiết kế */
    width: auto;
    display: block;
}

.cfooter .language-selector .popover-content {
    display: none;
    position: absolute;
    bottom: 110%;
    right: 0;
    background: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    min-width: 140px;
    z-index: 999999;
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #666 #f0f0f0;
}
.cfooter .language-selector .popover-content::-webkit-scrollbar {
    width: 8px; /* Chiều rộng thanh cuộn */
}

.cfooter .language-selector .popover-content::-webkit-scrollbar-track {
    background: #f0f0f0; /* Màu nền của thanh cuộn */
}

.cfooter .language-selector .popover-content::-webkit-scrollbar-thumb {
    background-color: #4a90e2; /* Màu của thanh cuộn */
    border-radius: 10px; /* Bo góc thanh cuộn */
}

.cfooter .language-selector .popover-content::-webkit-scrollbar-thumb:hover {
    background-color: #357ab8; /* Màu khi hover */
}

.cfooter .language-selector .popover-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cfooter .language-selector .popover-content li a {
    display: block;
    padding: 8px 16px;
    color: #000;
    text-align: left;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.cfooter .language-selector .popover-content li a:hover, .cfooter .language-selector .popover-content li a.active {
    background-color: #ccc;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left {
    flex: 1 1 0px;
    text-align: left;
}

.footer-left p:first-child {
    margin-top: 0;
    margin-bottom: 5px;
}
.footer-left .txt_logo {
    font-size: 22px;
    color: #DFDFDF;
    text-decoration: none;
}

.footer-left .txt_logo:hover {
    color: #3098ff;
}

.footer-left .cpright {
    margin: 10px 0;
    font-size: 13px;
    color: #aaa;
}

.footer-right.fanpage {
    margin-top: 10px;
}

/* RIGHT BLOCK */
.footer-right {
    flex: 2 1 300px;
    text-align: right;
}

.list-menu {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 20px;
}

.list-menu a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.list-menu a:hover {
    color: #3098ff;
}

.legal {
    font-size: 13px;
    text-align: right;
}

.legal span {
    font-family: RBold;
    margin-bottom: 6px;
    color: #CCC;
}

.legal a {
    color: #ccc;
    margin-left: 12px;
    text-decoration: none;
    transition: color 0.3s;
}

.legal a:hover {
    color: #3098ff;
}


.footer-desc {
    margin-bottom: 12px;
    margin-top: 20px;
    color: #AAA;
}

.footer-desc a {
    margin-right: 3px;
    text-decoration: none;
    color: #3098FF;
}
.footer-desc a:hover {
    color: #ffff99;
}
.footer-desc label{
    margin-right: 3px;
}
.footer-desc a:last-child{
    margin-right: 0;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}


.theme-toggle {
    color: var(--text-color);
    cursor: pointer;
    font-size: 18px;
    margin-left: 1rem;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.2);
}

.more-toggle {
    width: 22px;
    height: 14px;
    cursor: pointer;
    margin-left: 1rem;
    position: relative;
    z-index: 1001;
    display: none;
}

.more-toggle div {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.more-toggle div:nth-child(1) { top: 0; }
.more-toggle div:nth-child(2) { top: 50%; transform: translateY(-50%); }
.more-toggle div:nth-child(3) { bottom: 0; }

.more-toggle.active div:nth-child(1) {
    top: 40%;
    transform: rotate(45deg);
}
.more-toggle.active div:nth-child(2) { opacity: 0; }
.more-toggle.active div:nth-child(3) {
    bottom: 40%;
    transform: rotate(-45deg);
}

.more-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-color);
    color: #000;
    z-index: 999;
    transition: opacity 0.3s ease;
}

.more-popup nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.main-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0 0 2rem 0;
}

.main-wrapper .side {
    flex: 1;
    background: transparent; /* có thể dùng màu test nếu cần */
}

.main-wrapper .main-content {
    width: 100%;
    max-width: 1024px;
    box-sizing: border-box;
}

span.flatpickr-weekday{
    background: #f6f6f6;
    color: #333;
    padding: 7px 0;
}
.block-online-clock{
    position: relative;
    *width: calc(100% - 350px);
    *float: left;
}
.setting-box {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    display: grid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

#tab-menu {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0px;
    *border-bottom: 1px solid #ccc;
    gap: 10px;
    scrollbar-width: none;
}

#tab-menu::-webkit-scrollbar {
    display: none;
}

.tab-button {
    flex: 0 0 auto;
    padding: 12px 18px;
    background: #eee;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #e9e9e9;
    color: #000;
}
.tab-button.active {
    background: #3098FF;
    color: white;
}

.tab-button i {
    font-size: 16px;
}

.tab-content {
    display: none;
    padding: 20px;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    background-repeat: no-repeat;       /* Không lặp ảnh */
    background-size: cover;           /* Hiển thị vừa đủ ảnh */
    background-position: center center; /* Căn giữa ảnh */
    overflow: hidden;                   /* Ẩn phần tràn nếu ảnh quá to */
}
.tab-summary{
    display: none;
}
.tab-summary a, .summary a{
    text-decoration: none;
    *text-underline-position:under;
    color: #08c;
    font-family: RBold;
}

.tab-content.active, .tab-summary.active {
    display: block;
    animation: slideIn 0.4s ease;
    *border-top: 1px solid #CCC;
    margin-top: 30px;
}

.box_main{
    display: block;
    gap: 20px;
    align-items: stretch;
    justify-content: space-between;
    height: 100%;
}
.box_main .col_right .section h2{
    margin-top: 0;
}
.box_main .col_right .section:first-child{
    margin-top: 0;
}
.box_main .col_right{
    flex: 0 0 28%;
    min-width: 260px;
    display: flex;
    flex-direction: column;
}
.box_main .col_left .modern-time-picker{
    margin: 0;
}
.box_main .col_left{
    flex: 0 0 70%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.box-control {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.box-control a {
    flex-grow: 1;
    min-width: 110px;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: block;
    text-align: center;
    transition: background-color 0.3s ease;
    color: #FFF !important;
    text-decoration: none !important;
}
.box-control .pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: rgba(0, 136, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse-animation 2s ease-out infinite;
    pointer-events: none;
}
.box-control .btn-primary {
    background: linear-gradient(135deg, #ff0000, #ee0000);
    line-height: 26px;
    text-transform: uppercase;
    font-size: 16px;
    text-shadow: 1px 1px 1px #A20000, 1px -1px 1px #A20000, -1px 1px 1px #A20000, -1px -1px 1px #A20000;
    font-family: 'RBold';
}
.box-control .btn-explode {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
@keyframes pulse-animation {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.7;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.2;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}


.box-content-detail .tools-section .tools-intro {
    font-size: 1rem;
    margin-bottom: 24px;
    color: #333;
    line-height: 1.6;
}

.box-content-detail .tools-section .tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.box-content-detail .tools-section .tool-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.box-content-detail .tools-section .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #f9f9ff;
}

.box-content-detail .tools-section .tool-card .tool-icon {
    font-size: 32px;
    color: #3098FF;
    margin-bottom: 5px;
}

.box-content-detail .tools-section .tool-card h3 {
    font-size: 1.2rem;
    color: #3098FF;
    margin-bottom: 8px;
}

.box-content-detail .tools-section .tool-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.box-content-detail .section-title {
    font-size: 24px;
    margin: 30px 0 20px 0;
    color: #333;
}

.box-content-detail .why-choose-grid {
    display: grid;
    gap: 15px;
    margin: 0 auto;
    grid-template-columns: repeat(4, 1fr);
}

.box-content-detail .why-item {
    background: white;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.box-content-detail .why-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.box-content-detail .why-icon {
    font-size: 24px;
    color: #555;
    margin-bottom: 15px;
    display: inline-block;
    margin-right: 5px;
}

.box-content-detail .why-title {
    font-size: 1.2em;
    font-family: RBold;
    margin-bottom: 10px;
    color: #222;
    display: inline-block;
}

.box-content-detail .why-desc {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
}
.detail-content{
    color: #555;
    margin-top: 30px;
}
.detail-content h2, .detail-content h3, .detail-content h4{
    margin-bottom: 10px;
    color: #111;
}
.detail-content p{
    margin-top: 10px;
}
.detail-content ul, .detail-paragraphs ul, .detail-content ol, .detail-paragraphs ol{
    line-height: 26px;
    margin-top: 10px;
}



/**
ĐỒNG HỒ*/
svg.clock_kim{
    width: 320px;
    height: 320px;
}

.clock_kim .tick {
    stroke: #CCC;
    stroke-width: 1;
    stroke-linecap: round;
}

.clock_kim .tick.major {
    stroke-width: 2;
    stroke-linecap: round;
}

.clock_kim .number {
    fill: #000;
    font-size: 16px;
    text-anchor: middle;
    dominant-baseline: central;
}

.clock_kim .hand {
    stroke-linecap: round;
}

.clock_kim .hour-hand {
    stroke: #111;
    stroke-width: 8;
    stroke-linecap: round;
    filter:drop-shadow(2px 0px 4px rgba(0, 0, 0, 0.2))
}

.clock_kim .minute-hand {
    stroke: #222;
    stroke-width: 8;
    stroke-linecap: round;
    filter:drop-shadow(2px 0px 4px rgba(0, 0, 0, 0.2))
}

.clock_kim .second-hand {
    stroke: red;
    stroke-width: 3;
    stroke-linecap: round;
    filter:drop-shadow(1px 0px 2px rgba(0, 0, 0, 0.2))
}

.clock_kim .center-dot {
    fill: #333;
}

.clock_kim .clock-face {
    *stroke: #333;
    *stroke-width: 3;
    fill: #FFF;
    filter:drop-shadow(0 5px 5px rgba(0, 0, 0, 0.1))
}

/* Đảm bảo input, div không tràn khi cha có padding */
.count-days-form *, .add-date-form *, .subtract-date-form * {
    box-sizing: border-box;
}

/* Tổng thể form */
.count-days-form {
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* Giữa các form-control nên có spacing đều */
.count-days-form .form-control {
    margin-bottom: 20px;
}

/* Label */
.count-days-form .label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    margin-bottom: 6px;
}

.count-days-form .label-text {
    font-size: 15px;
}

.count-days-form .label-text-alt, .add-date-form .label-text-alt , .subtract-date-form .label-text-alt {
    font-size: 14px;
    *color: #007BFF;
    color: #28a745;
    cursor: pointer;
    text-decoration: underline;
}

/* Input */
.count-days-form .input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.count-days-form .input:read-only {
    background-color: #f0f0f0;
    *cursor: not-allowed;
}

/* Checkbox */
.count-days-form .checkbox {
    width: 20px;
    height: 20px;
    *accent-color: #007BFF;
    accent-color: #28a745;
    cursor: pointer;
}

/* Button */
.count-days-form .btn, .add-date-form .btn , .subtract-date-form .btn {
    width: 100%;
    *background-color: #007BFF;
    background-color: #D20000;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.count-days-form .btn:hover, .add-date-form .btn:hover , .subtract-date-form .btn:hover {
    *background-color: #0056b3;
    background-color: #A20000;
}

/* Stats Result */
.count-days-form .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px;
    margin-top: 10px;
    border-radius: 10px;
    background-color: #f3f6f9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.count-days-form .stat {
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.count-days-form .stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.count-days-form .stat-value {
    font-size: 22px;
    color: #333;
    font-family: RBold;
}

/* Tổng thể form */
.add-date-form, .subtract-date-form {
    padding: 20px;
    background-color: #fefefe;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Form control */
.add-date-form .form-control, .subtract-date-form .form-control {
    margin-bottom: 18px;
}

/* Label */
.add-date-form .label, .subtract-date-form .label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.add-date-form .label-text, .subtract-date-form .label-text {
    font-size: 15px;
    color: #222;
}

/* Input fields */
.add-date-form .input, .subtract-date-form .input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.add-date-form .input:read-only, .subtract-date-form .input:read-only {
    background-color: #f0f0f0;
    *cursor: not-allowed;
}

/* Grid nhóm input số */
.add-date-form .grid, .subtract-date-form .grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(1, 1fr); /* Mặc định mobile: 1 cột */
}
@media (min-width: 640px) {
    /* Tablet trở lên: 2 cột */
    .add-date-form .grid, .subtract-date-form .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    /* Desktop: 4 cột */
    .add-date-form .grid, .subtract-date-form .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Kết quả */
.add-date-form #add-result, .subtract-date-form #subtract-result {
    margin-top: 20px;
}

.add-date-form .alert, .subtract-date-form .alert {
    padding: 16px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
}
strong{
    font-weight: normal;
    font-family: RBold;
}
.add-date-form .font-bold, .subtract-date-form .font-bold {
    color: #0c4b33;
    margin-left: 6px;
    font-family: RBold;
}



/* Tùy chỉnh giao diện Flatpickr */
.flatpickr-calendar {
    border-radius: 8px; /* Góc tròn cho calendar */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Đổ bóng cho calendar */
}

.flatpickr-input {
    cursor: pointer; /* Thêm con trỏ khi hover vào input */
}

#color-picker, #digit-bg-picker, #digit-text-picker, #bg-image-picker{
    margin: 5px 0 25px 0;
}

#color-picker strong, #digit-bg-picker strong, #digit-text-picker strong, #bg-image-picker strong {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

.color-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.color-option {
    width: 50px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #FFF;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    transition: border-color 0.3s;
}

.color-option:hover {
    border-color: #666;
}

/*Nên clock*/
.color-option[data-color="#ffffff"] { background-color: #ffffff; }
.color-option[data-color="#fff8dc"] { background-color: #fff8dc; }
.color-option[data-color="#d0f0c0"] { background-color: #d0f0c0; }
.color-option[data-color="#d6eaff"] { background-color: #d6eaff; }
.color-option[data-color="#ffe0e9"] { background-color: #ffe0e9; }
.color-option[data-color="#fff1b5"] { background-color: #fff1b5; }
.color-option[data-color="#e6e6fa"] { background-color: #e6e6fa; }
.color-option[data-color="#e0fff4"] { background-color: #e0fff4; }
.color-option[data-color="#ffe5b4"] { background-color: #ffe5b4; }
.color-option[data-color="#f2f2f2"] { background-color: #f2f2f2; }


/* Nền số */
.color-option[data-bg="#000000"] { background-color: #000000; }
.color-option[data-bg="#b71c1c"] { background-color: #b71c1c; }
.color-option[data-bg="#0d47a1"] { background-color: #0d47a1; }
.color-option[data-bg="#4a148c"] { background-color: #4a148c; }
.color-option[data-bg="#1b5e20"] { background-color: #1b5e20; }
.color-option[data-bg="#e65100"] { background-color: #e65100; }
.color-option[data-bg="#4e342e"] { background-color: #4e342e; }
.color-option[data-bg="#263238"] { background-color: #263238; }
.color-option[data-bg="#37474f"] { background-color: #37474f; }
.color-option[data-bg="#33691e"] { background-color: #33691e; }

/* Chữ số */
.color-option[data-text="#ffffff"] { background-color: #ffffff; }
.color-option[data-text="#ffecb3"] { background-color: #ffecb3; }
.color-option[data-text="#c3f8ff"] { background-color: #c3f8ff; }
.color-option[data-text="#ffd6e0"] { background-color: #ffd6e0; }
.color-option[data-text="#d7f5d7"] { background-color: #d7f5d7; }
.color-option[data-text="#d6eaff"] { background-color: #d6eaff; }
.color-option[data-text="#ffe0e9"] { background-color: #ffe0e9; }
.color-option[data-text="#fff1b5"] { background-color: #fff1b5; }
.color-option[data-text="#e6e6fa"] { background-color: #e6e6fa; }
.color-option[data-text="#e0fff4"] { background-color: #e0fff4; }

.color-option.active {
    border: 3px solid #2196f3;
    box-shadow: 0 0 5px #2196f3;
    position: relative;
}

.color-option.active::after {
    content: '✓';
    color: #2196f3;
    position: absolute;
    right: 15px;
    bottom: 3px;
    font-size: 16px;
}
.reset-color {
    margin-top: 10px;
    padding: 6px 10px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.reset-color:hover {
    background-color: #ddd;
}
h2.swal2-title{
    font-weight: normal;
    color: #222;
}

.bg-image-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.bg-image-option {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 1s ease-in-out, border 0.3s, transform 0.2s; /* hiệu ứng mượt */
}
.bg-image-option.loaded {
    opacity: 1; /* khi ảnh load xong thì hiện dần */
}

.bg-image-option:hover {
    transform: scale(1.03);
}

.bg-image-option.active {
    border-color: #007bff;
}
.bg-image-option.active::after {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    font-size: 24px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border:3px solid #FFF
}
.upload-btn {
    display: inline-block;
    padding: 10px 12px;
    background-color: #DD0000;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid #fff;
    margin-top: 12px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.upload-btn:hover {
    background-color: #CC0000;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.3);
}

.upload-note {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}
.uploaded-image-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}
@media (max-width: 600px) {
    .uploaded-image-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
.uploaded-image-box {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ccc;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: border 0.3s, transform 0.2s;
}
.uploaded-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cắt phần thừa, giữ tỷ lệ ảnh */
    display: block;
}
.uploaded-image-actions {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    display: flex;
    justify-content: space-between;
    gap: 4px;
}
.uploaded-image-actions button {
    font-size: 12px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    line-height: 22px;
    width: 50px;
    margin: 0 auto;
}
.uploaded-image-actions button:hover {
    background: rgba(0,0,0,0.7);
}

.uploaded-image-box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}


.uploaded-image-box.active::after {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    font-size: 24px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border:3px solid #FFF
}

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



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

.share-box {
    *background: #f0f4ff;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.share-box-title {
    display: block;
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

.share-box-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.share-box .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 18px;
    transition: transform 0.2s ease, opacity 0.3s;
}

.share-box .share-btn:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.share-btn.facebook   { background: #1877F2; }
.share-btn.twitter    { background: #000000; } /* X (Twitter) mới */
.share-btn.reddit     { background: #FF4500; }
.share-btn.whatsapp   { background: #25D366; }
.share-btn.linkedin   { background: #0077B5; }
.share-btn.email      { background: #555; }

.icon-fb { background-image: url('../images/facebook.svg'); }
.icon-tw { background-image: url('../images/x.svg'); }
.icon-zalo { background-image: url('../images/zalo.svg'); }
.icon-li { background-image: url('../images/linkedin.svg'); }
.icon-tg { background-image: url('../images/telegram.svg'); }


.fanpage {
    display: flex;
    align-items: center;
    gap: 0px;
    font-size: 14px;
    padding-left: 0 !important;
}

.fanpage a {
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    text-decoration: none;
    transition: background 0.3s;
    background: #999;
    border-radius: 14px;
    font-size: 14px;
    margin-top: 6px;
    margin-right: 10px;
}
.fanpage a:hover{
    background: #FFF;
}
.fanpage .icon {
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 30px;
    text-align: center;
}
footer nav {
    justify-content: center;
    display: block;
    flex-wrap: wrap;
    gap: 1rem;
    background: none;
}
footer .txt_logo {
    font-family: RBold;
    text-decoration: none;
    text-transform: uppercase;
    color: #FFF;
    font-size: 20px;
}
footer nav a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 14px;
}
footer nav a:hover {
    color: var(--hover-color);
}
.half-circle-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 50%;
    background: linear-gradient(to right, #0074E8 50%, white 50%);
    border: 2px solid #FFF; /* Tùy chọn viền */
}

.digit-flip .clock-container {
    max-width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
    color: #000;
}

.digit-flip .clock-zoom-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-in-out;
    transform-origin: center center;
}

.digit-flip .clock-line {
    display: flex;
    *flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    width: 90%;
    box-sizing: border-box;
}

.digit-flip .digit-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 90px;
    max-width: 300px;
    font-family: RBold;
}

#digital .digit-flip .digit {
    font-family: Di7Mono !important;
    font-size: 150px !important;
    letter-spacing: 5px;
}

.digit-flip .digit {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #222;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    font-size: 100px;
    padding: 0 15px;
    text-shadow: 3px 1px 1px #000;
}

#digital .digit {
    padding-top: 20px !important;
    background: #ff9900;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
#digital .digit::before {
    display: none !important;
}
.digit-flip .digit::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #444;
    transform: translateY(-1px);
    z-index: 5;
}

.digit-flip .label {
    margin-top: 8px;
    font-size: 18px;
    color: #111;
    text-shadow: 1px 1px 1px #FFF;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.digit-flip .digit-inner {
    transition: transform 0.5s ease-in-out;
}

.digit-flip .digit-number {
    height: 200px;
    line-height: 200px;
    font-size: 120px;
    letter-spacing: 5px;
}

.digit-flip .ampm-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1 1 90px;
    max-width: 120px;
    margin-top: 0;
}

.digit-flip .ampm {
    font-size: 22px;
    color: #fff;
    background: #666;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 54px;
    font-family: RMedium;
    opacity: 0.7;
}

.digit-flip .ampm-label {
    margin-top: 8px;
    font-size: 18px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.digit-flip .date-text {
    font-size: 22px;
    color: #111;
    margin-top: 30px;
    text-align: center;
    text-shadow: 1px 1px 1px #FFF;
}
.digit-flip .date-text {
    padding: 0 50px;
}

.toggle-container {
    margin-top: 30px;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    *justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    margin-left: 15px;
}

.checkbox-label input {
    display: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #888;
    border-radius: 4px;
    position: relative;
    background-color: #fff;
    transition: all 0.2s;
}

.checkbox-label input:checked + .custom-checkbox {
    background-color: #444;
    border-color: #444;
}

.checkbox-label input:checked + .custom-checkbox::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    top: 0px;
    left: 5px;
    transform: rotate(45deg);
}

.digit-flip .checkbox-label input:focus + .custom-checkbox {
    box-shadow: 0 0 0 4px rgba(72, 105, 180, 0.5);
}
.digit-flip{
    position: relative;
}
.w-full{
    position: relative;
}
.w-full .zoom-controls {
    position: absolute;
    top: 90px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.w-full .zoom-controls button {
    background-color: #999;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    opacity: 0.5;
}

.w-full .zoom-controls button:hover:enabled, .w-full #fullscreenBtn:hover {
    opacity: 0.8;
}

.w-full .zoom-controls button:disabled {
    background-color: #aaa;
}

.w-full #fullscreenBtn {
    background-color: #999;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    opacity: 0.5;
}

.digit-flip #fullscreenBtn i {
    color: #fff;
}

.w-full .fullscreen-mode-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
}
.fullscreen-mode {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    overflow: auto !important;
    display: flex !important;
    justify-content: center !important; /* căn giữa theo chiều ngang */
    align-items: center !important;     /* căn giữa theo chiều dọc */
    margin-top: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}
.fullscreen-mode .tab-content{
    margin:  0 !important;
    width: 100% !important;
    height: 100vh !important;
}


/* STOPWATCH */
.stopwatch-app {
    position: relative;
}
.fullscreen-toggle {
    position: absolute;
    top: -10px;
    right: 24px;
    z-index: 100;
}

#fullscreen-btn {
    background: #CCC;
    color: white;
    border: none;
    padding: 7px 10px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#fullscreen-btn:hover {
    background: #999;
}
.stopwatch-app .container {
    margin: auto;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #000;
}
.stopwatch-app .time-display {
    font-family: 'Di7Mono';
    font-feature-settings: 'tnum';
    font-size: 160px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    background: #f3f3f3;
    padding: 20px 5px;
    border-radius: 5px;
}
.stopwatch-app .time-display #time-main{
    *width: 60%;
}
#lap-time-remaining{
    font-family: RMedium;
    font-size: 24px;
    vertical-align: sub;
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #00cc99;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.stopwatch-app .hundredths {
    font-size: 80px;
    vertical-align: bottom;
    display: inline-block;
}
.stopwatch-app .buttons {
    display: grid;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    grid-template-columns: repeat(6, 1fr);
}
.stopwatch-app .button {
    padding: 13px 10px;
    border: none;
    border-radius: 22px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.stopwatch-app .button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.stopwatch-app .button.start{
    background: linear-gradient(135deg, #2196F3, #1976D2);
}
.stopwatch-app .button.continue {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}
.stopwatch-app .button.pause {
    background: linear-gradient(135deg, #E53935, #C62828);
}
.stopwatch-app .button.reset {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}
.stopwatch-app .button.lap {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}
.stopwatch-app .button.clear {
    background: linear-gradient(135deg, #E53935, #C62828);
}
.stopwatch-app .button.hide-s, .stopwatch-app .button.hide-h {
    background: #999;
}
.export-buttons button._exp{
    background: linear-gradient(135deg, #2196F3, #1976D2);
}
.stopwatch-app table, .clockcm table {
    width: 100%;
    border-collapse: collapse;
}
.stopwatch-app th, .stopwatch-app td, .clockcm th, .clockcm td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    font-weight: normal;
}

.stopwatch-app h3 {
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 40px;
}
.stopwatch-app td, .clockcm td {
    font-family: RRegular;
    color: #666;
}
.stopwatch-app th, .clockcm th {
    background: #f0f0f0;
    font-family: RMedium;
}

.stopwatch-app .export-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.stopwatch-app.fullscreen-mode .container {
    max-width: 100%;
    padding: 20px;
    text-align: center;
}

.stopwatch-app.fullscreen-mode h3,
.stopwatch-app.fullscreen-mode table,
.stopwatch-app.fullscreen-mode .export-buttons,
.stopwatch-app.fullscreen-mode .buttons button:not(.start):not(.pause):not(.lap):not(.reset):not(.hide-h):not(.hide-s):not(.continue) {
    display: none !important;
}

.stopwatch-app.fullscreen-mode .time-display {
    justify-content: center;
}

.stopwatch-app.fullscreen-mode .buttons {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}
.no-data{
    font-size: 14px; color: #999;
    text-align:center; font-style:italic;
}
/* STOPWATCH */
.hide{display: none;}
#btn-scroll-top {
    position: fixed;
    right: 30px;
    z-index: 999;
    background: rgba(48, 152, 255, 0.7);
    color: white;
    border: none;
    outline: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8) rotate(-20deg);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* tránh click khi ẩn */
}

#btn-scroll-top.show {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
}

#btn-scroll-top:hover {
    background: #1e7cd8;
    transform: scale(1.05) rotate(0deg);
}
#btn-scroll-top{bottom: 200px;}

.iconlight, .setting-icon{
    color: #0074E8;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
    font-size: 14px;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 22px;
}
.noti-icon{
    font-size: 22px;
    line-height: 24px;
    height: 24px;
    color: #fff;
    cursor: pointer;
    text-align: center;
}
.sleep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    cursor: pointer;
    transition: opacity 0.5s ease;
}
.language-popup-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.language-popup-overlay .language-popup-box {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.language-popup-overlay .language-popup-box h2 {
    font-size: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.language-popup-overlay .language-list {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 16px;
}

.language-popup-overlay .language-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-popup-overlay .language-list a {
    display: flex;
    align-items: center;
    padding:10px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.language-popup-overlay .language-list a:hover {
    background: #f0f0f0;
    text-decoration: none !important;
}

.language-popup-overlay .language-list img {
    width: 20px;
    margin-right: 8px;
}

.language-popup-overlay .continue-btn {
    text-align: center;
}

.language-popup-overlay #continue-english {
    display: inline-block;
    background: #3098FF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s;
}

.language-popup-overlay #continue-english:hover {
    background: #2479d6;
}

.language-popup-overlay .language-list::-webkit-scrollbar {
    width: 6px;
}
.language-popup-overlay .language-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.language-popup-overlay .language-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.language-popup-overlay .lang-code{
    font-size: 14px;
    margin-right: 5px;
}

#popup-common, .popup-all{
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
#popup-common .popup-wrapper, .popup-all .popup-wrapper {
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#popup-common .popup-header, .popup-all .popup-header {
    background: #3098FF;
    color: #fff;
    padding: 12px 16px;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#popup-common .popup-header ._close, .popup-all .popup-header ._close {
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s ease;
}

#popup-common .popup-header ._close:hover, .popup-all .popup-header ._close:hover {
    transform: rotate(90deg);
}
#popup-common .popup-content, .popup-all .popup-content-all {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}


#popup-common #loading, .popup-all #loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}
#popup-common, .popup-all {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#popup-common.active, .popup-all.active {
    opacity: 1;
    visibility: visible;
}

#popup-common.active .popup-wrapper, .popup-all.active .popup-wrapper {
    transform: scale(1);
}

#popup-common.show, .popup-all.show {
    opacity: 1;
}
.w_content_pp {
    padding: 5px 20px 20px 20px;
    border-radius: 8px;
    *box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-top: 0px;
    font-size: 15px;
    line-height: 1.6;
}

.w_content_pp h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
}

.about-section {
    margin-bottom: 40px;
}

.about-title {
    font-size: 24px;
    margin-bottom: 12px;
    color: #333;
    border-left: 4px solid #3098ff;
    padding-left: 12px;
}
.box-content-detail a {
    color: #3098ff;
    text-decoration: none;
    transition: color 0.2s;
}
.box-content-detail a:hover {
    color: #1a6ed8;
    text-decoration: underline;
    text-underline-position:under;
}
.faq-box {
    margin: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}
.faq-item {
    overflow: hidden;
    border-bottom: 1px solid #eee;
}
.faq-question {
    padding: 15px 20px;
    cursor: pointer;
    position: relative;
    font-family: RBold;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
}
.faq-question.active::after {
    content: '-';

}
.faq-question::after, .faq-question.active::after{
    font-family: RRegular;
    font-size: 20px;
}
.faq-question.active{
    background: #ffffee;
    color: #000;
}
.faq-answer {
    padding: 0 20px 15px 20px;
    display: none;
    background: #ffffee;
}

#btn-faq {
    position: fixed;
    right: 30px;
    bottom: 260px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.7); /* màu xanh tùy chỉnh */
    color: #666;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 20px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
}
#btn-faq:hover {
    background-color: #0056b3;
    color: #fff;
}
#popup-faq {
    display: none; /* ẩn ban đầu */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.popup-faq-content {
    background-color: #fff;
    margin: 10px auto;
    padding: 10px 20px;
    border-radius: 10px;
    width: 94%;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.popup-faq-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-family: RBold;
    cursor: pointer;
}

.popup-faq-close:hover {
    color: black;
}

.my-swal-popup {
    z-index: 100000 !important;
}


/*dark mode============================================*/
body.dark-mode{
    background-color: #010101;
    color: #CCC;
}
body.dark-mode .share-box{
    background: #666;
}
body.dark-mode .faq-box{
    background-color: #333;
    color: #CCC;
}
body.dark-mode .faq-item.active .faq-answer, body.dark-mode .detail-content, body.dark-mode .detail-content h2, body.dark-mode .detail-content h3, body.dark-mode .detail-content h4, body.dark-mode .breadcrumb span{
    color: #999;
}
body.dark-mode .detail-content h2,  body.dark-mode .detail-content h3, body.dark-mode .detail-content h4{
    color: #eee;
}
body.dark-mode .tab-summary h2, body.dark-mode .tab-summary h3, body.dark-mode .related-links strong{
    color: #fff;
}

body.dark-mode #nav_mobile .language-item{
    background: #444;
}
body.dark-mode .s-logo a {
    text-shadow: 1px 1px 1px #000,0 0 25px #000,0 0 1px #000;
}
body.dark-mode #nav_mobile a{
    background: #333;
    border-bottom: 1px solid #111;
    color: #ccc;
}
body.dark-mode header,body.dark-mode #nav_mobile {
    background-color: #222;
}

body.dark-mode .half-circle-icon {
    background: linear-gradient(to right, #000 50%, white 50%);
}
body.dark-mode .box-content-detail .tools-section .tool-card, body.dark-mode .box-content-detail .why-item {
    background: #333;
}
body.dark-mode .box-content-detail .tools-section .tool-card p, body.dark-mode .box-content-detail .why-title, body.dark-mode .box-content-detail .why-desc, body.dark-mode .section-title{
    color: #CCC;
}
body.dark-mode .tab-button {
    color: #fff;
    background: #333;
}
body.dark-mode .tab-button.active {
    background: #CCC;
    color: #000;
}
body.dark-mode h1, body.dark-mode nav a, body.dark-mode .count-days-form .label, body.dark-mode .label-text , body.dark-mode .toggle-container {
    color: #ddd;
}

body.dark-mode nav a.active,
body.dark-mode nav a:hover {
    color: #ffff00;
}


body.dark-mode .tab-content,
body.dark-mode .count-days-form,
body.dark-mode .add-date-form,
body.dark-mode .subtract-date-form {
    background-color: #1e1e1e;
    color: #eee;
    border-color: #444;
}

body.dark-mode .input,
body.dark-mode .count-days-form .input:read-only {
    background-color: #2c2c2c !important;
    color: #fff;
    border-color: #555;
}

body.dark-mode .digit-flip .clock-container,
body.dark-mode .digit-flip .clock-line,
/*body.dark-mode .digit-flip .label,
body.dark-mode .digit-flip .ampm-label,
body.dark-mode .digit-flip .date-text,*/
body.dark-mode .digit-flip .toggle-container {
    color: #eee;
}

body.dark-mode #digital .digit{
    background: #ffcc00;
}
body.dark-mode .digit-flip .digit {
    background: #ccc;
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

body.dark-mode .digit-flip .digit::before{
    background: #999;
}

body.dark-mode .iconlight, body.dark-mode .setting-icon, body.dark-mode .noti-icon{
    color: #333;
}
body.dark-mode .digit-flip .ampm {
    background: #eee;
    color: #222;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

body.dark-mode .digit-flip .custom-checkbox {
    background-color: #222;
    border-color: #aaa;
}

body.dark-mode .digit-flip .checkbox-label input:checked + .custom-checkbox {
    background-color: #eee;
    border-color: #eee;
}
body.dark-mode .copy-box, body.dark-mode .copy-box input[type="text"]{
    background: #999;
    color: #FFF;
}
body.dark-mode .copy-box input[type="button"]{
    background: #222;
}

body.dark-mode .digit-flip .checkbox-label input:checked + .custom-checkbox::after {
    border-color: #222;
}

body.dark-mode .digit-flip .zoom-controls button,
body.dark-mode .digit-flip #fullscreenBtn {
    background-color: #eee;
    color: #000;
}

body.dark-mode .digit-flip #fullscreenBtn i {
    color: #000;
}

body.dark-mode .digit-flip .fullscreen-mode {
    background: #121212;
    color: #eee;
}

/*ĐỒNG HỒ KIM*/
body.dark-mode .clock_kim .tick {
    stroke: #ccc;
}
body.dark-mode .clock_kim .number {
    dominant-baseline: central;
}
body.dark-mode .clock_kim .second-hand {
    stroke: red;
}

body.dark-mode .stopwatch-app .container .time-display, body.dark-mode .stopwatch-app td, body.dark-mode .stopwatch-app h3{
    color: #FFF;
}
body.dark-mode #fullscreen-btn {
    background: #777;
}
body.dark-mode .stopwatch-app .time-display{
    background: #444;
}
body.dark-mode .stopwatch-app .container, body.dark-mode .holiday-box{
    background: #333;
}
body.dark-mode .stopwatch-app th{
    background: #444;
    color: #FFF;
}
body.dark-mode .stopwatch-app th, body.dark-mode .stopwatch-app td{
    border: 1px solid #666;
}
.dark-mode .faq-question.active, .dark-mode .faq-answer{
    background: #999;
    color: #FFF;
}
.dark-mode .holiday-item, .events-item{
    background: #dfdfdf !important;
}
.dark-mode a.year-button{
    background: #111;
    color: #fff !important;
}
.dark-mode .settings-box h3, .dark-mode .holiday-green, .dark-mode .holiday-yellow{
    color: #FFF !important;
}
.dark-mode .related-links, .dark-mode .action-box{
    background: #333 !important;
}
body.sleep-mode {
    overflow: hidden !important; /* Ẩn scroll */
}
.iconlight:hover, .setting-icon:hover, .half-circle-icon:hover{
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: #C20000;
}
.noti-icon:hover{
    color: #ffff00;
}
.menu-toggle:hover div{
    background: #ffff00;
}

#popup-setting {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
#popup-setting .popup-wrapper {
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#popup-setting .popup-header {
    background: #3098FF;
    color: #fff;
    padding: 12px 16px;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#popup-setting .popup-content {
    padding: 20px;
}

#popup-setting .popup-header ._close {
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s ease;
}

#popup-setting .popup-header ._close:hover {
    transform: rotate(90deg);
}
#popup-setting .popup-content {
    padding: 20px;
}


#popup-setting #loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}
#popup-setting {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#popup-setting.active {
    opacity: 1;
    visibility: visible;
}

#popup-setting .popup-wrapper {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#popup-setting.active .popup-wrapper {
    transform: scale(1);
}

#popup-setting.show {
    opacity: 1;
}
.form-group.options {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group.options .field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.form-group.options .field:last-child {
    border-bottom: none;
}

.form-group.options label {
    font-weight: 500;
    color: #333;
}

.switch-button {
    position: relative;
    display: inline-block;
    width: 60px; /* rộng hơn để đủ chỗ ON/OFF */
    height: 26px;
}

.switch-button input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-button label {
    display: block;
    height: 100%;
    width: 100%;
    cursor: pointer;
}

.switch-button span {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: background-color 0.4s;
}

.switch-button span:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s;
}

.switch-button input:checked + span {
    background-color: #4caf50;
}

.switch-button input:checked + span:before {
    transform: translateX(32px);
}

/* ON/OFF text */
.switch-button span:after {
    /*content: "OFF";*/
    position: absolute;
    right: 8px;
    top: 4px;
    font-size: 10px;
    color: #fff;
    font-family: RBold;
    transition: content 0.4s;
}

.switch-button input:checked + span:after {
    /*content: "ON";*/
    left: 8px;
    right: auto;
}

.action-box .switch {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.action-box .switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin-right: 10px;
}

.action-box .slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 34px;
    margin-right: 5px;
    transition: 0.4s;
}

.action-box .slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

.action-box .switch input:checked + .slider {
    background-color: #4CAF50;
}

.action-box .switch input:checked + .slider::before {
    transform: translateX(20px);
}
.panel-colors .btn-digit-color {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border 0.3s, transform 0.2s;
}

.panel-colors .btn-digit-color:hover {
    transform: scale(1.1);
}

.panel-colors .btn-digit-color.active {
    border: 3px solid #000;
    box-shadow: 0 0 0 2px #fff inset;
}

.btn.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn.btn-primary:hover {
    background-color: #125ea4;
}



/*MOBILE */
@media (max-width: 640px) {
    header, .main-wrapper{
        padding: 0 15px;
    }
    #nav_mobile .language-item{
        padding-bottom: 120px;
    }
    #nav_mobile .language-item a {
        width: auto;
    }
    #current-lang i{
        font-family: RRegular;
    }
    #current-lang label{
        display: none;
    }
    .box_main .col_left{
        width: 100%;
    }
    .tab-button {
        font-size: 14px;
        padding: 10px;
    }
    .digit-flip .clock-line {
        flex-wrap: wrap;
        gap: 10px;
    }
    .digit-flip .clock-container{
        padding: 0 5px;
    }
    .digit-flip .ampm-wrapper {
        width: 100%;
        margin-top: 10px;
    }
    .digit-flip .ampm {
        margin-top: 0;
    }
    .w-full .zoom-controls{
        top: 75px;
        right: 10px;
        flex-direction:row;
    }
    .w-full .zoom-controls #zoomInBtn, .w-full .zoom-controls #zoomOutBtn{
        display: none;
    }
    .toggle-container strong{
        display: none;
    }
    .digit-flip .digit{
        padding: 0 10px;
        height: 140px;
        border-radius: 10px;
    }
    #digital .digit, .digit-flip .digit{
        font-size: 60px;
        padding: 0px;
    }
    #digital .digit-flip .digit{
        font-size: 80px !important;
    }
    #digital .digit{
        padding-top: 20px !important;
    }
    .digit-flip .digit-number {
        height: 140px;
        line-height: 140px;
        font-size: 60px;
    }
    .color-list {
        grid-template-columns: repeat(5, 1fr);
        overflow-x: auto;
        gap:10px;
        *height: 38px;
    }
    .bg-image-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .bg-image-option.active::after {
        width: 30px;
        height: 30px;
    }
    .digit-flip .digit{
        line-height: 100px;
    }
    .stopwatch-app .time-display {
        font-size: 70px;
        margin-top: 20px;
        padding: 10px 0;
        gap:0
    }
    .stopwatch-app .hundredths {
        font-size: 34px;
    }
    .stopwatch-app .button {
        flex: 1 1 45%;
        font-size: 14px;
    }
    .stopwatch-app .container{
        padding: 10px;
    }
    .fullscreen-toggle {
        top: -35px;
        right: 0;
    }
    .share-box{
        margin-bottom: 20px;
    }
    .nav-dock-item span.fas{
        font-size: 22px;
    }
    #btn-scroll-top{bottom: 75px;}
    #btn-faq {
        bottom: 140px;
    }
    ul.none_style{
        margin-left: -30px;
    }

}
.fullscreen-mode .fullscreen-toggle {
    top: 10px;
    right: 10px;
}

@media (max-width: 768px) {
    h1{
        font-size: 22px;
    }
    .menu-toggle {
        display: flex;
        right: 15px;
    }
    .menu-container {
        flex-direction: column;
        align-items: flex-start;
    }
    header nav {
        flex-direction: column;
        background: var(--primary-color);
        width: 100%;
        display: none;
    }
    .main-menu .menu {
        flex-direction: column; /* xuống hàng dọc */
        margin: 10px;
    }
    #nav_mobile .language-selector{
        margin: 10px;
    }
    .main-menu .menu-item {
        flex: 1 1 100%;         /* chiếm full width */
        margin: 5px 0;
    }
    .main-menu .submenu {
        box-shadow: none;
        border-radius: 0;
    }
    .tools{
        padding-right: 45px;
        gap:15px
    }
    nav.show {
        display: flex;
    }
    .more-toggle {
        *display: block;
    }
    .show_mobile{
        position: absolute;
        z-index: 10;
        left: 0;
        width: 100%;
        top: 45px;
        padding: 10px 0;
        background: #027353;
    }
    .show_mobile nav{
        gap:0
    }
    .show_mobile a{
        display: inline-block;
        border-bottom: 1px solid green;
        padding: 10px 15px;
        width: 100%;
    }
    .upload-btn {
        padding: 10px 5px;
        font-size: 18px;
    }
    .box_main{
        flex-direction: column;
    }
    .stopwatch-app .buttons{
        grid-template-columns: repeat(2, 1fr);
    }
    footer{
        padding: 20px 10px 60px 10px;
    }
    .blmobile{
        display: flex;
        flex-wrap: wrap;
        gap:5px
    }
    .setting-box {
        display: block;
    }
    .box-content-detail .why-choose-grid, .box-content-detail .tools-section .tool-grid{
        display: block;
    }
    .box-content-detail .tools-section .tool-card, .box-content-detail .why-item{
        margin-bottom: 10px;
    }
    footer nav a {
        flex: 1 1 calc(50% - 8px); /* 2 items mỗi hàng, trừ gap */
        font-size: 14px;
        padding: 6px 10px;
        text-align: left;
    }
    .faq-question::after{
        right: 10px;
    }
    .popup-faq-content {
        max-width: 100%;
    }
    .w_content_pp{
        padding: 5px 10px 10px 10px;
    }
    .fullscreen-mode .digit-flip {
        width: 98%;
    }
    .cfooter {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    .cfooter .language-selector {
        text-align: center;
        margin-top: 10px;
    }
    .footer-right.fanpage {
        justify-content: center;
        text-align: center;
        display: flex;
        gap: 12px;
        margin-top: 15px;
    }
    .list-menu {
        justify-content: center;
        text-align: center;
    }
    .legal, .footer-left{
        text-align: center;
    }
    .legal span{
        display: inline-block;
    }
    .copy-box label{display: none;}
    .share-box{padding: 10px 3px;}
    .share-box-content{gap:8px}
    .footer-right {
        text-align: center;
    }
}

@media (max-width: 1200px) {
    .setting-box, .block-online-clock{
        float: none;
        width: 100%;
        margin-left: 0;
    }
}
@media (min-width: 1024px) and (max-width: 1200px) {
    #digital .digit-flip .digit{
        font-size: 130px !important;
        line-height: 170px;
    }
    .digit-flip .digit-number{
        font-size: 90px !important;
    }
}
@media (max-width: 1024px) {
    .main-wrapper .side {
        display: none;
    }

    .main-wrapper .main-content {
        margin: 0 auto;
        width: 100%;
    }
    .setting-box{
        margin-top: 20px;
    }
}
