/* ============================================================
   August Custom Channel — Frontend Styles
   Native dark theme matching AugustCS2 homepage
   Color Palette: Dark Navy #0b0e17, Crimson #E63946, Ice Blue #4CC9F0
   ============================================================ */

/* --- Container --- */
.acc-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(var(--acc-cols, 3), 1fr);
}

/* --- Responsive columns --- */
@media (max-width: 1024px) {
    .acc-grid { grid-template-columns: repeat(var(--acc-cols-tablet, 2), 1fr); }
}

@media (max-width: 600px) {
    .acc-grid { grid-template-columns: repeat(var(--acc-cols-mobile, 1), 1fr); }
}

/* --- Video Card --- */
.acc-card {
    position: relative;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 201, 240, 0.1);
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: accFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.acc-card:nth-child(1) { animation-delay: 0.05s; }
.acc-card:nth-child(2) { animation-delay: 0.12s; }
.acc-card:nth-child(3) { animation-delay: 0.19s; }
.acc-card:nth-child(4) { animation-delay: 0.26s; }
.acc-card:nth-child(5) { animation-delay: 0.33s; }
.acc-card:nth-child(6) { animation-delay: 0.40s; }
.acc-card:nth-child(7) { animation-delay: 0.47s; }
.acc-card:nth-child(8) { animation-delay: 0.54s; }
.acc-card:nth-child(9) { animation-delay: 0.61s; }
.acc-card:nth-child(10) { animation-delay: 0.68s; }
.acc-card:nth-child(11) { animation-delay: 0.75s; }
.acc-card:nth-child(12) { animation-delay: 0.82s; }

@keyframes accFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient accent bar on top */
.acc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(135deg, #E63946, #4CC9F0);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.acc-card:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(76, 201, 240, 0.3);
    transform: translateY(-6px);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(76, 201, 240, 0.15);
}

.acc-card:hover::before { opacity: 1; }

/* --- Thumbnail --- */
.acc-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.acc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.acc-card:hover .acc-thumb img {
    transform: scale(1.08);
}

/* Dark gradient overlay on thumbnail bottom */
.acc-thumb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(11, 14, 23, 0.7), transparent);
    pointer-events: none;
    z-index: 1;
}

/* --- Play Icon Overlay --- */
.acc-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 56px; height: 56px;
    background: rgba(230, 57, 70, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.4);
}

.acc-play-icon svg {
    width: 22px; height: 22px;
    fill: #fff;
    margin-left: 3px;
}

.acc-card:hover .acc-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* --- Duration Badge --- */
.acc-duration {
    position: absolute;
    bottom: 8px; right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #F8F9FA;
    padding: 2px 7px;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 2;
}

/* --- Card Meta --- */
.acc-meta {
    padding: 14px 16px 16px;
}

.acc-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #F8F9FA;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.acc-title.lines-1 { -webkit-line-clamp: 1; }
.acc-title.lines-2 { -webkit-line-clamp: 2; }
.acc-title.lines-3 { -webkit-line-clamp: 3; }
.acc-title.lines-full { -webkit-line-clamp: unset; }

.acc-card:hover .acc-title {
    color: #4CC9F0;
}

.acc-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.acc-info span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.acc-info svg {
    width: 13px; height: 13px;
    fill: currentColor;
    opacity: 0.7;
}

/* --- Load More Button --- */
.acc-load-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.acc-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 36px;
    background: transparent;
    color: #F8F9FA;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(76, 201, 240, 0.4);
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.acc-load-more:hover {
    background: rgba(76, 201, 240, 0.1);
    border-color: #4CC9F0;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(76, 201, 240, 0.2);
}

.acc-load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.acc-load-more .acc-spinner {
    display: none;
    width: 14px; height: 14px;
    border: 2px solid rgba(76, 201, 240, 0.3);
    border-top-color: #4CC9F0;
    border-radius: 50%;
    animation: accSpin 0.6s linear infinite;
}

.acc-load-more.loading .acc-spinner { display: block; }
.acc-load-more.loading .acc-load-text { display: none; }

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

/* --- Lightbox --- */
.acc-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.acc-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.acc-lightbox-inner {
    position: relative;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(76, 201, 240, 0.2);
    box-shadow: 0 0 80px rgba(76, 201, 240, 0.1);
}

.acc-lightbox-inner iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.acc-lightbox-close {
    position: absolute;
    top: -40px; right: 0;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(230, 57, 70, 0.8);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    transition: all 0.3s ease;
}

.acc-lightbox-close:hover {
    background: #E63946;
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

/* --- List Layout --- */
.acc-grid.acc-layout-list {
    grid-template-columns: 1fr;
    gap: 12px;
}

.acc-layout-list .acc-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.acc-layout-list .acc-thumb {
    aspect-ratio: 16 / 9;
}

.acc-layout-list .acc-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px;
}

.acc-layout-list .acc-title {
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .acc-layout-list .acc-card {
        grid-template-columns: 1fr;
    }
}

/* --- Error State --- */
.acc-error {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.acc-error svg {
    width: 48px; height: 48px;
    fill: #374151;
    margin-bottom: 12px;
}

/* --- No results --- */
.acc-no-videos {
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
    font-family: 'Montserrat', sans-serif;
}
