/* kfbeta16 — home (from index.php) */
.top-posts-tabs-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1e1e1e; 
    color: #e0e0e0; 
    margin-bottom: 20px;
}

.top-posts-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #2c2c2c; 
    border-bottom: 1px solid #444;
}

.top-posts-nav li {
    flex: 1;
    margin: 0;
}

.top-posts-nav a {
    display: block;
    padding: 12px 15px;
    text-align: center;
    text-decoration: none;
    color: #a9a9a9; 
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}


.top-posts-nav a.active {
    color: #ffffff; 
    background-color: #1e1e1e; 
    border-bottom-color: #3a96e0; 
}

.top-posts-nav a:not(.active):hover {
    color: #ffffff;
    background-color: #3f3f3f; 
}


.top-posts-content {
    padding: 15px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}


.top-posts-content ol.top-posts-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    counter-reset: top-posts-counter;
}

.top-posts-content ol.top-posts-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #3a3a3a; 
    font-size: 15px;
}

.top-posts-content ol.top-posts-list li:last-child {
    border-bottom: none;
}

.top-posts-content ol.top-posts-list li::before {
    counter-increment: top-posts-counter;
    content: counter(top-posts-counter);
    
    font-size: 14px;
    font-weight: bold;
    color: #1e1e1e; 
    background-color: #777; 
    
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    margin-right: 15px;
}


.top-posts-content ol.top-posts-list li:nth-child(1)::before {
    background-color: #FFD700; /* Gold */
    color: #333;
}

.top-posts-content ol.top-posts-list li:nth-child(2)::before {
    background-color: #C0C0C0; /* Silver */
    color: #333;
}

.top-posts-content ol.top-posts-list li:nth-child(3)::before {
    background-color: #CD7F32; /* Bronze */
    color: #333;
}

.top-posts-content ol.top-posts-list li a {
    text-decoration: none;
    color: #dcdcdc; 
    line-height: 1.4;
}

.top-posts-content ol.top-posts-list li a:hover {
    color: #3a96e0; 
}
    
.ext-json-section {
    background-color: #202020;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 5px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
.ext-json-section h2 {
    color: #ffffff;
    border-bottom: 2px solid #32373c;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}
.ext-json-error { color: #777; }
.ext-json-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
    .ext-json-grid { grid-template-columns: repeat(4, 1fr); }
}
.ext-json-item {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ext-json-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}
.ext-json-item a { text-decoration: none; }
.ext-json-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
}
.ext-json-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ext-json-noti {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #5bb7fe;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 2;
}
.ext-json-info { padding: 12px; }
.ext-json-name {
    font-size: 0.8rem;
    color: #eee;
    margin: 0;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ext-json-footer { text-align: center; margin-top: 25px; }
.ext-json-button {
    display: inline-block;
    padding: 10px 50px;
    background-color: #4caf50;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}
.ext-json-button:hover { background-color: #333; }

/* === Skeleton === */
.ext-json-skeleton {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}
.ext-json-skeleton-thumb {
    aspect-ratio: 16 / 9;
    background-color: #333;
    position: relative;
    overflow: hidden;
}
.ext-json-skeleton-title {
    height: 13px;
    background-color: #333;
    border-radius: 4px;
    margin: 12px 12px 8px;
    position: relative;
    overflow: hidden;
}
.ext-json-skeleton-title.short {
    width: 60%;
    margin-top: 6px;
}

/* Shimmer sweep */
.ext-json-skeleton-thumb::after,
.ext-json-skeleton-title::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.07) 50%,
        transparent 100%
    );
    animation: ext-skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes ext-skeleton-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Daily update box */
.daily-update-box {
    display: flex;
    width: fit-content;
    margin: 5px auto;
    align-items: center;
    justify-content: center;
    background-color: #2a2a2a;
    border: 1px solid #0073aa;
    padding: 8px 20px;
    border-radius: 25px;
    font-family: sans-serif;
    font-size: 0.95rem;
    color: #e0e0e0;
}
.daily-update-box .update-icon { margin-right: 8px; font-size: 1.2em; }
.daily-update-box .update-label { margin-right: 5px; color: #bbb; }
.daily-update-box .update-number { font-weight: bold; color: #61dafb; font-size: 1.1em; }
#daily-update-widget {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 8px 0;
}

#daily-update-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: transparent;
    border: 1.5px solid #22d3ee;
    border-radius: 999px;
    cursor: default;
    user-select: none;
    position: relative;
    min-width: 90px;
    justify-content: center;
}

/* Skeleton */
#daily-update-btn.is-loading {
    border-color: #2a3a3a;
    overflow: hidden;
}

#daily-update-btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #1a2a2a 25%,
        #22d3ee18 50%,
        #1a2a2a 75%
    );
    background-size: 200% 100%;
    animation: wpuc-shimmer 1.4s infinite;
}

@keyframes wpuc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#daily-update-btn.is-loading .wpuc-today,
#daily-update-btn.is-loading .wpuc-plus,
#daily-update-btn.is-loading .wpuc-num {
    opacity: 0;
}

.wpuc-today {
    font-size: 13px;
    font-weight: 600;
    color: #22d3ee;
    letter-spacing: .02em;
}

.wpuc-plus {
    font-size: 13px;
    color: #ffffff;
    opacity: 0.7;
}

.wpuc-num {
    font-size: 14px;
    font-weight: 700;
    color: #22d3ee;
    min-width: 20px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}
#broadcast-schedule-container {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
}
.schedule-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #444;
}
.schedule-nav li {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    cursor: pointer;
    background-color: #202020;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 600;
    border-right: 1px solid #444;
}
.schedule-nav li:last-child { border-right: none; }
.schedule-nav li:hover { background-color: #3f3f3f; }
.schedule-nav li.active { background-color: #444; color: #fff; }
.schedule-nav li[data-type="new"] { color: #5bb7fe; }
.schedule-nav li[data-type="new"].active { color: #fff; }

.schedule-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) {
    .schedule-grid { grid-template-columns: repeat(4, 1fr); }
}
.schedule-grid-item {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.schedule-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}
.schedule-grid-item a { text-decoration: none; }
.schedule-grid-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    background-color: #1a1a1a;
}
.schedule-grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.schedule-grid-noti {
    position: absolute;
    top: 6px;
    left: 6px;
    background-color: #5bb7fe;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}
.schedule-grid-name {
    font-size: 0.78rem;
    color: #eee;
    margin: 0;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px;
}

/* Skeleton grid */
.sk-grid-item {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}
.sk-grid-thumb {
    aspect-ratio: 16/9;
    background-color: #3a3a3a;
    position: relative;
    overflow: hidden;
}
.sk-grid-line {
    height: 10px;
    background-color: #3a3a3a;
    border-radius: 4px;
    margin: 10px;
    position: relative;
    overflow: hidden;
}
.sk-grid-line.short { width: 50%; }

.sk-grid-thumb::after,
.sk-grid-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.07) 50%, transparent 100%);
    animation: sched-shimmer 1.4s infinite;
}
@keyframes sched-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.schedule-nav li.today-dot { position: relative; }
.schedule-nav li.today-dot::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #4caf50;
}
.schedule-nav li.today-dot.active::after { background-color: #fff; }
