/**
 * JoinNow PH TNT Styles
 * All classes prefixed with pg48- to avoid conflicts
 */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 10px base for easy rem calculations */
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: #FFEFD5;
    background-color: #273746;
    overflow-x: hidden;
}

/* CSS Variables for Theme Colors */
:root {
    --pg48-primary: #273746;
    --pg48-secondary: #FFDEAD;
    --pg48-accent: #FFEFD5;
    --pg48-dark: #1a252f;
    --pg48-light: #f5f5f5;
    --pg48-text: #FFEFD5;
    --pg48-text-dark: #273746;
    --pg48-border: rgba(255, 222, 173, 0.3);
    --pg48-shadow: rgba(0, 0, 0, 0.3);
    --pg48-gradient: linear-gradient(135deg, #273746 0%, #1a252f 100%);
}

/* Utility Classes */
.pg48-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.pg48-wrapper {
    min-height: 100vh;
    padding-bottom: 8rem; /* Space for bottom nav on mobile */
}

.pg48-grid {
    display: grid;
    gap: 1rem;
}

.pg48-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pg48-text-center {
    text-align: center;
}

.pg48-text-left {
    text-align: left;
}

.pg48-text-right {
    text-align: right;
}

.pg48-hidden {
    display: none;
}

.pg48-visible {
    display: block;
}

/* Typography */
.pg48-h1 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--pg48-accent);
}

.pg48-h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: var(--pg48-secondary);
}

.pg48-h3 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    color: var(--pg48-accent);
}

.pg48-p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--pg48-text);
}

.pg48-small {
    font-size: 1.2rem;
    color: rgba(255, 239, 213, 0.8);
}

/* Header Styles */
.pg48-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--pg48-gradient);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pg48-border);
    padding: 1rem 0;
}

.pg48-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.pg48-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--pg48-accent);
}

.pg48-logo img {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.5rem;
}

.pg48-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pg48-accent);
}

.pg48-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg48-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 4.4rem;
    touch-action: manipulation;
}

.pg48-btn-primary {
    background: var(--pg48-secondary);
    color: var(--pg48-text-dark);
    box-shadow: 0 2px 8px var(--pg48-shadow);
}

.pg48-btn-primary:hover {
    background: #ffda8f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--pg48-shadow);
}

.pg48-btn-secondary {
    background: transparent;
    color: var(--pg48-accent);
    border: 2px solid var(--pg48-accent);
}

.pg48-btn-secondary:hover {
    background: var(--pg48-accent);
    color: var(--pg48-text-dark);
}

.pg48-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--pg48-accent);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 4.4rem;
    min-height: 4.4rem;
}

/* Navigation Menu */
.pg48-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--pg48-gradient);
    backdrop-filter: blur(20px);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.pg48-nav.active {
    right: 0;
}

.pg48-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pg48-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pg48-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pg48-border);
}

.pg48-nav-close {
    background: none;
    border: none;
    color: var(--pg48-accent);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 4.4rem;
    min-height: 4.4rem;
}

.pg48-nav-list {
    list-style: none;
}

.pg48-nav-item {
    margin-bottom: 0.5rem;
}

.pg48-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--pg48-text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    font-weight: 500;
    min-height: 4.4rem;
}

.pg48-nav-link:hover {
    background: rgba(255, 222, 173, 0.1);
    color: var(--pg48-secondary);
    transform: translateX(0.5rem);
}

.pg48-nav-icon {
    margin-right: 1rem;
    font-size: 1.8rem;
    width: 2.4rem;
    text-align: center;
}

/* Main Content */
.pg48-main {
    padding-top: 7rem; /* Space for fixed header */
    min-height: calc(100vh - 7rem);
}

.pg48-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.pg48-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg48-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.pg48-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 0.3rem;
    background: var(--pg48-secondary);
    border-radius: 0.2rem;
}

/* Carousel Styles */
.pg48-carousel {
    position: relative;
    width: 100%;
    height: 25rem;
    overflow: hidden;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--pg48-shadow);
}

.pg48-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.pg48-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.pg48-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pg48-carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(39, 55, 70, 0.9));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.pg48-carousel-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pg48-carousel-text {
    font-size: 1.2rem;
    opacity: 0.9;
}

.pg48-carousel-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.pg48-carousel-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg48-carousel-indicator.active {
    background: var(--pg48-secondary);
    transform: scale(1.2);
}

.pg48-carousel-prev,
.pg48-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pg48-carousel-prev:hover,
.pg48-carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.pg48-carousel-prev {
    left: 1rem;
}

.pg48-carousel-next {
    right: 1rem;
}

/* Game Grid Styles */
.pg48-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg48-game-card {
    background: var(--pg48-gradient);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--pg48-border);
    text-decoration: none;
    color: inherit;
}

.pg48-game-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 8px 25px var(--pg48-shadow);
    border-color: var(--pg48-secondary);
}

.pg48-game-image {
    width: 100%;
    height: 6rem;
    object-fit: contain;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
}

.pg48-game-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pg48-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6rem;
}

/* Content Module Styles */
.pg48-content-module {
    background: var(--pg48-gradient);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--pg48-border);
    box-shadow: 0 2px 10px var(--pg48-shadow);
}

.pg48-content-module h2 {
    color: var(--pg48-secondary);
    margin-bottom: 1rem;
}

.pg48-content-module h3 {
    color: var(--pg48-accent);
    margin-bottom: 0.8rem;
}

.pg48-content-module p {
    margin-bottom: 1rem;
}

.pg48-content-module ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.pg48-content-module li {
    margin-bottom: 0.5rem;
    color: var(--pg48-text);
}

/* Promotional Link Styles */
.pg48-promo-link {
    color: var(--pg48-secondary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pg48-promo-link:hover {
    color: #ffda8f;
}

.pg48-promo-btn {
    background: linear-gradient(135deg, var(--pg48-secondary) 0%, #ffda8f 100%);
    color: var(--pg48-text-dark);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 2.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 222, 173, 0.3);
    margin: 1rem 0;
}

.pg48-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 222, 173, 0.4);
}

/* Bottom Navigation */
.pg48-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--pg48-gradient);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--pg48-border);
    z-index: 1000;
    padding: 0.5rem 0;
    height: 6rem;
}

.pg48-bottom-nav-list {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pg48-bottom-nav-item {
    flex: 1;
    text-align: center;
}

.pg48-bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 239, 213, 0.7);
    padding: 0.5rem;
    min-height: 5rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.pg48-bottom-nav-link:hover {
    color: var(--pg48-secondary);
    background: rgba(255, 222, 173, 0.1);
}

.pg48-bottom-nav-item.active .pg48-bottom-nav-link {
    color: var(--pg48-secondary);
    background: rgba(255, 222, 173, 0.2);
}

.pg48-bottom-nav-icon {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}

.pg48-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
}

/* Footer Styles */
.pg48-footer {
    background: var(--pg48-dark);
    border-top: 1px solid var(--pg48-border);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.pg48-footer-content {
    margin-bottom: 2rem;
}

.pg48-footer-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: rgba(255, 239, 213, 0.8);
    margin-bottom: 1.5rem;
}

.pg48-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg48-footer-link {
    color: var(--pg48-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.pg48-footer-link:hover {
    background: rgba(255, 222, 173, 0.1);
    color: #ffda8f;
}

.pg48-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.pg48-partner {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: grayscale(0.3);
}

.pg48-partner:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

.pg48-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 239, 213, 0.6);
    padding-top: 2rem;
    border-top: 1px solid var(--pg48-border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pg48-menu-toggle {
        display: block;
    }

    .pg48-header-actions .pg48-btn {
        padding: 0.6rem 1.2rem;
        font-size: 1.3rem;
    }

    .pg48-wrapper {
        padding-bottom: 8rem;
    }

    .pg48-bottom-nav {
        display: block;
    }

    .pg48-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
        gap: 0.8rem;
    }

    .pg48-carousel {
        height: 20rem;
    }

    .pg48-carousel-title {
        font-size: 1.6rem;
    }

    .pg48-carousel-text {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) {
    .pg48-bottom-nav {
        display: none;
    }

    .pg48-nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        right: 0;
    }

    .pg48-nav-list {
        display: flex;
        gap: 0.5rem;
    }

    .pg48-nav-link {
        padding: 0.8rem 1.2rem;
        font-size: 1.4rem;
        min-height: auto;
    }

    .pg48-nav-close,
    .pg48-nav-overlay {
        display: none;
    }

    .pg48-container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

/* Animation Classes */
.pg48-fade-in {
    animation: pg48FadeIn 0.5s ease-in-out;
}

.pg48-slide-up {
    animation: pg48SlideUp 0.5s ease-out;
}

.pg48-scale-in {
    animation: pg48ScaleIn 0.3s ease-out;
}

@keyframes pg48FadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pg48SlideUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pg48ScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading States */
.pg48-loading {
    position: relative;
    pointer-events: none;
}

.pg48-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 2px solid var(--pg48-border);
    border-top: 2px solid var(--pg48-secondary);
    border-radius: 50%;
    animation: pg48Spin 1s linear infinite;
}

@keyframes pg48Spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}