/* ==========================================
   OliveParty Hub - Mobile Gaming Style
   ========================================== */

#home-container {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

/* === TOP BAR === */
.home-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(26, 36, 26, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(62, 82, 62, 0.25);
}

.login-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #9BD62C;
    color: #1A241A;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s;
    -webkit-tap-highlight-color: transparent;
}

.login-pill:active {
    transform: scale(0.93);
}

/* === HERO === */
.home-hero {
    text-align: center;
    padding: 0.5rem 1.25rem 0;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: -40px;
    background: radial-gradient(
        ellipse at 50% 40%,
        rgba(155, 214, 44, 0.07) 0%,
        transparent 65%
    );
    pointer-events: none;
}

.home-hero-img {
    width: 88%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    border-radius: 1.5rem;
    position: relative;
}

.home-greeting {
    font-size: 1.05rem;
    font-weight: 600;
    color: #A3BFA3;
    margin-top: 0.25rem;
}

.home-greeting .current-username {
    color: #9BD62C;
    font-weight: 700;
}

/* === MODE CARDS (image-backed buttons) === */
.mode-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    border: 2px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    width: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    background: #222E22;
}

.mode-card:active {
    transform: scale(0.95);
}

/* The illustration image */
.mode-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.mode-card:active .mode-card-img {
    transform: scale(1.05);
}

/* Gradient overlay sitting on top of the image */
.mode-card-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mode-solo-overlay {
    background: linear-gradient(to top, rgba(109, 40, 217, 0.92) 0%, rgba(139, 92, 246, 0.45) 50%, rgba(139, 92, 246, 0.08) 100%);
}

.mode-online-overlay {
    background: linear-gradient(to top, rgba(37, 99, 235, 0.92) 0%, rgba(6, 182, 212, 0.4) 50%, rgba(6, 182, 212, 0.08) 100%);
}

.mode-salon-overlay {
    background: linear-gradient(to top, rgba(234, 88, 12, 0.9) 0%, rgba(245, 158, 11, 0.35) 50%, rgba(245, 158, 11, 0.05) 100%);
}

/* Content layer (text over the overlay) */
.mode-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    z-index: 2;
    text-align: left;
}

/* Badge pill (icon + title) */
.mode-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.mode-card-badge i {
    font-size: 0.75rem;
}

.mode-card-sub {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 0.3rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    padding-left: 0.15rem;
}

/* Solo specific */
.mode-card.mode-solo {
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.25);
}

/* Online specific */
.mode-card.mode-online {
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.25);
}

/* Salon - full width, horizontal layout */
.mode-card.mode-salon {
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.2);
}

.mode-card.mode-salon .mode-card-img {
    height: 110px;
    object-position: center 30%;
}

.mode-salon-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mode-salon-badge {
    font-size: 0.85rem;
}

/* === SECTIONS === */
.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.home-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #F0FFF4;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.home-section-link {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6E8A6E;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.home-section-link:active {
    color: #9BD62C;
}

/* === CAROUSEL (horizontal scroll) === */
.carousel {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* === GAME MINI CARDS === */
.game-mini {
    flex-shrink: 0;
    width: 130px;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #222E22;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.2s;
    scroll-snap-align: start;
}

.game-mini:active {
    transform: scale(0.95);
}

.game-mini:hover {
    border-color: #9BD62C;
}

.game-mini-cover {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.game-mini-info {
    padding: 0.45rem 0.55rem;
}

.game-mini-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #F0FFF4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-mini-players {
    font-size: 0.58rem;
    color: #6E8A6E;
    margin-top: 1px;
}

/* === NEWS CARDS (vertical, for carousel) === */
.news-card {
    flex-shrink: 0;
    width: 200px;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #222E22;
    border: 1px solid #2B3A2B;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.2s;
    scroll-snap-align: start;
}

.news-card:active {
    transform: scale(0.96);
}

.news-card:hover {
    border-color: #9BD62C;
}

/* === FADE IN === */
.fade-in {
    animation: homeSlideUp 0.35s ease-out;
}

@keyframes homeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SCROLLBAR (vertical) === */
#home-container::-webkit-scrollbar {
    width: 3px;
}

#home-container::-webkit-scrollbar-track {
    background: transparent;
}

#home-container::-webkit-scrollbar-thumb {
    background: #2B3A2B;
    border-radius: 2px;
}

/* === DESKTOP === */
@media (min-width: 768px) {
    #home-container {
        max-width: 480px;
        margin: 0 auto;
    }

    .mode-card-img {
        height: 180px;
    }

    .mode-card.mode-salon .mode-card-img {
        height: 130px;
    }

    .mode-card-badge {
        font-size: 0.9rem;
        padding: 0.35rem 0.75rem;
    }

    .game-mini {
        width: 150px;
    }

    .game-mini-cover {
        height: 105px;
    }

    .news-card {
        width: 230px;
    }
}
