/**
 * Nustar Online App - Core Stylesheet
 * Version: 1.0.0
 * Prefix: s3d4-
 * Color Palette: #FFB6C1, #F0F0F0, #0C0C0C, #36454F, #EE82EE, #BA55D3
 * Description: Mobile-first responsive design for Philippine gaming platform
 */

/* CSS Reset and Base Styles */
:root {
    --s3d4-primary: #BA55D3;
    --s3d4-secondary: #EE82EE;
    --s3d4-accent: #FFB6C1;
    --s3d4-bg-dark: #0C0C0C;
    --s3d4-bg-light: #F0F0F0;
    --s3d4-text-dark: #36454F;
    --s3d4-text-light: #F0F0F0;
    --s3d4-gradient: linear-gradient(135deg, #BA55D3 0%, #EE82EE 50%, #FFB6C1 100%);
    --s3d4-shadow: 0 4px 15px rgba(186, 85, 211, 0.3);
    font-size: 62.5%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--s3d4-bg-dark);
    color: var(--s3d4-text-light);
    line-height: 1.5rem;
    font-size: 1.6rem;
    min-height: 100vh;
}

/* Container */
.s3d4-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.s3d4-wrapper {
    padding: 2rem 0;
}

/* Header Styles */
.s3d4-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(12, 12, 12, 0.98) 0%, rgba(12, 12, 12, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.s3d4-header.s3d4-scrolled {
    box-shadow: var(--s3d4-shadow);
}

.s3d4-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.s3d4-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.s3d4-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.s3d4-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--s3d4-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.s3d4-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.s3d4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-height: 44px;
    min-width: 44px;
}

.s3d4-btn-primary {
    background: var(--s3d4-gradient);
    color: #fff;
    box-shadow: var(--s3d4-shadow);
}

.s3d4-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(186, 85, 211, 0.4);
}

.s3d4-btn-secondary {
    background: transparent;
    color: var(--s3d4-accent);
    border: 2px solid var(--s3d4-accent);
}

.s3d4-btn-secondary:hover {
    background: var(--s3d4-accent);
    color: var(--s3d4-bg-dark);
}

.s3d4-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.s3d4-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--s3d4-text-light);
    transition: all 0.3s ease;
}

.s3d4-menu-toggle.s3d4-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.s3d4-menu-toggle.s3d4-active span:nth-child(2) {
    opacity: 0;
}

.s3d4-menu-toggle.s3d4-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Desktop Navigation */
.s3d4-desktop-nav {
    display: none;
}

.s3d4-desktop-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.s3d4-desktop-nav a {
    color: var(--s3d4-text-light);
    text-decoration: none;
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.s3d4-desktop-nav a:hover {
    color: var(--s3d4-accent);
}

/* Mobile Menu */
.s3d4-menu-toggle {
    display: flex;
}

#s3d4-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--s3d4-bg-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 8rem 2rem 2rem;
    overflow-y: auto;
}

#s3d4-mobile-menu.s3d4-active {
    right: 0;
}

#s3d4-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#s3d4-menu-overlay.s3d4-active {
    opacity: 1;
    visibility: visible;
}

.s3d4-mobile-nav ul {
    list-style: none;
}

.s3d4-mobile-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.s3d4-mobile-nav a {
    display: block;
    padding: 1.5rem 1rem;
    color: var(--s3d4-text-light);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.s3d4-mobile-nav a:hover {
    color: var(--s3d4-accent);
    padding-left: 1.5rem;
}

/* Main Content */
main {
    padding-top: 70px;
}

@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

/* Carousel/Slider */
.s3d4-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 1rem;
    margin: 1.5rem 0;
}

.s3d4-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.s3d4-slide.s3d4-active {
    opacity: 1;
}

.s3d4-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Titles */
.s3d4-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--s3d4-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Game Grid */
.s3d4-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.s3d4-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.s3d4-game-item:hover {
    transform: scale(1.05);
}

.s3d4-game-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.s3d4-game-name {
    font-size: 1.1rem;
    color: var(--s3d4-text-light);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Category Section */
.s3d4-category-section {
    margin-bottom: 3rem;
}

.s3d4-category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--s3d4-accent);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Info Cards */
.s3d4-info-card {
    background: linear-gradient(145deg, rgba(54, 69, 79, 0.3) 0%, rgba(12, 12, 12, 0.5) 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(238, 130, 238, 0.2);
}

.s3d4-info-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--s3d4-accent);
}

.s3d4-info-card p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--s3d4-text-light);
}

/* Promotional Link Styles */
.s3d4-promo-link {
    color: var(--s3d4-secondary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.s3d4-promo-link:hover {
    color: var(--s3d4-accent);
}

/* Footer */
.s3d4-footer {
    background: rgba(12, 12, 12, 0.95);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(238, 130, 238, 0.2);
}

.s3d4-footer-content {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.s3d4-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.s3d4-footer-links a {
    color: var(--s3d4-text-light);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.s3d4-footer-links a:hover {
    color: var(--s3d4-accent);
}

.s3d4-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.s3d4-partners img {
    width: 50px;
    height: 30px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.s3d4-partners img:hover {
    opacity: 1;
}

.s3d4-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Bottom Navigation */
.s3d4-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(12, 12, 12, 0.98) 0%, rgba(12, 12, 12, 1) 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid rgba(238, 130, 238, 0.3);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

.s3d4-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.s3d4-nav-item:hover {
    transform: scale(1.1);
}

.s3d4-nav-item .material-icons,
.s3d4-nav-item ion-icon {
    font-size: 26px;
    color: var(--s3d4-text-light);
    transition: color 0.3s ease;
}

.s3d4-nav-item:hover .material-icons,
.s3d4-nav-item:hover ion-icon {
    color: var(--s3d4-accent);
}

.s3d4-nav-item span {
    font-size: 11px;
    color: var(--s3d4-text-light);
    margin-top: 4px;
    transition: color 0.3s ease;
}

.s3d4-nav-item:hover span {
    color: var(--s3d4-accent);
}

.s3d4-nav-item.s3d4-active .material-icons,
.s3d4-nav-item.s3d4-active ion-icon {
    color: var(--s3d4-secondary);
}

.s3d4-nav-item.s3d4-active span {
    color: var(--s3d4-secondary);
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .s3d4-bottom-nav {
        display: none;
    }

    .s3d4-menu-toggle {
        display: none;
    }

    .s3d4-desktop-nav {
        display: block;
    }

    .s3d4-container {
        max-width: 1200px;
    }

    .s3d4-game-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .s3d4-footer-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Utility Classes */
.s3d4-text-center {
    text-align: center;
}

.s3d4-mb-1 {
    margin-bottom: 1rem;
}

.s3d4-mb-2 {
    margin-bottom: 2rem;
}

.s3d4-mb-3 {
    margin-bottom: 3rem;
}

/* Animation */
@keyframes s3d4-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.s3d4-pulse {
    animation: s3d4-pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 430px) {
    .s3d4-game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .s3d4-game-icon {
        width: 60px;
        height: 60px;
    }

    .s3d4-game-name {
        font-size: 1rem;
    }
}
