/**
 * Play Time Game - Core Stylesheet
 * Prefix: pg40-
 * Version: 1.0.0
 */

/* CSS Variables */
:root {
    --pg40-primary: #8B008B;
    --pg40-secondary: #800080;
    --pg40-bg: #1E1E1E;
    --pg40-text: #BDC3C7;
    --pg40-muted: #808080;
    --pg40-accent: #9B30FF;
    --pg40-success: #2ECC71;
    --pg40-warning: #F39C12;
    --pg40-danger: #E74C3C;
    --pg40-card-bg: #2A2A2A;
    --pg40-border: #3A3A3A;
    --pg40-gradient: linear-gradient(135deg, #8B008B 0%, #800080 100%);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--pg40-text);
    background-color: var(--pg40-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--pg40-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--pg40-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.pg40-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.pg40-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--pg40-bg) 0%, rgba(30, 30, 30, 0.95) 100%);
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--pg40-border);
}

.pg40-header-scrolled {
    background: rgba(30, 30, 30, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.pg40-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.pg40-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg40-logo img {
    width: 32px;
    height: 32px;
}

.pg40-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--pg40-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pg40-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg40-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.pg40-btn-primary {
    background: var(--pg40-gradient);
    color: #fff;
}

.pg40-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 139, 0.4);
}

.pg40-btn-outline {
    background: transparent;
    color: var(--pg40-accent);
    border: 2px solid var(--pg40-primary);
}

.pg40-btn-outline:hover {
    background: var(--pg40-primary);
    color: #fff;
}

.pg40-menu-btn {
    background: transparent;
    border: none;
    color: var(--pg40-text);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu */
.pg40-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--pg40-bg);
    z-index: 9999;
    padding: 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.pg40-menu-active {
    right: 0;
}

.pg40-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;
}

.pg40-overlay-active {
    opacity: 1;
    visibility: visible;
}

.pg40-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pg40-border);
}

.pg40-menu-close {
    background: transparent;
    border: none;
    color: var(--pg40-text);
    font-size: 2.4rem;
    cursor: pointer;
}

.pg40-nav-list {
    list-style: none;
}

.pg40-nav-item {
    margin-bottom: 0.5rem;
}

.pg40-nav-link {
    display: block;
    padding: 1.2rem 1rem;
    color: var(--pg40-text);
    font-size: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pg40-nav-link:hover {
    background: var(--pg40-card-bg);
    color: var(--pg40-accent);
}

/* Main Content */
.pg40-main {
    padding-top: 70px;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .pg40-main {
        padding-bottom: 80px;
    }
}

/* Hero Carousel */
.pg40-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.pg40-slide {
    display: none;
    cursor: pointer;
}

.pg40-slide img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
}

.pg40-slide:first-child {
    display: block;
}

/* Section Title */
.pg40-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--pg40-primary);
}

/* Game Grid */
.pg40-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg40-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.pg40-game-item:hover {
    transform: translateY(-5px);
}

.pg40-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--pg40-border);
    transition: border-color 0.3s ease;
}

.pg40-game-item:hover .pg40-game-img {
    border-color: var(--pg40-primary);
}

.pg40-game-name {
    font-size: 1.2rem;
    color: var(--pg40-text);
    margin-top: 0.5rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category Section */
.pg40-category {
    margin-bottom: 2.5rem;
}

.pg40-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pg40-category-icon {
    font-size: 2.4rem;
    color: var(--pg40-accent);
}

.pg40-category-title {
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
}

/* Cards */
.pg40-card {
    background: var(--pg40-card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--pg40-border);
}

.pg40-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

.pg40-card-text {
    font-size: 1.4rem;
    color: var(--pg40-text);
    line-height: 1.6;
}

/* Info Box */
.pg40-info-box {
    background: linear-gradient(135deg, rgba(139, 0, 139, 0.2) 0%, rgba(128, 0, 128, 0.2) 100%);
    border: 1px solid var(--pg40-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.pg40-footer {
    background: var(--pg40-card-bg);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--pg40-border);
}

.pg40-footer-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pg40-footer-desc {
    font-size: 1.4rem;
    color: var(--pg40-muted);
    line-height: 1.6;
    max-width: 350px;
    margin: 0 auto;
}

.pg40-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pg40-footer-link {
    font-size: 1.3rem;
    color: var(--pg40-text);
    padding: 0.5rem 1rem;
    background: var(--pg40-bg);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pg40-footer-link:hover {
    background: var(--pg40-primary);
    color: #fff;
}

.pg40-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: var(--pg40-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--pg40-border);
}

/* Bottom Navigation */
.pg40-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, var(--pg40-card-bg) 0%, var(--pg40-bg) 100%);
    border-top: 1px solid var(--pg40-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.5rem;
}

@media (min-width: 769px) {
    .pg40-bottom-nav {
        display: none;
    }
}

.pg40-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    background: transparent;
    border: none;
    color: var(--pg40-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.pg40-nav-btn:hover,
.pg40-nav-btn.pg40-active {
    color: var(--pg40-accent);
    transform: scale(1.1);
}

.pg40-nav-btn .material-icons,
.pg40-nav-btn .fas,
.pg40-nav-btn .far,
.pg40-nav-btn ion-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.pg40-nav-btn span {
    font-size: 1rem;
    font-weight: 500;
}

/* List Styles */
.pg40-list {
    list-style: none;
    padding: 0;
}

.pg40-list-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--pg40-border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.pg40-list-item:last-child {
    border-bottom: none;
}

.pg40-list-icon {
    color: var(--pg40-accent);
    font-size: 2rem;
    flex-shrink: 0;
}

/* Promo Link Styles */
.pg40-promo-link {
    display: inline-block;
    color: var(--pg40-accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg40-promo-link:hover {
    color: var(--pg40-primary);
    text-decoration: underline;
}

/* Responsive Grid */
.pg40-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Text Utilities */
.pg40-text-center { text-align: center; }
.pg40-text-left { text-align: left; }
.pg40-text-white { color: #fff; }
.pg40-text-accent { color: var(--pg40-accent); }
.pg40-text-muted { color: var(--pg40-muted); }
.pg40-fw-bold { font-weight: 700; }

/* Spacing Utilities */
.pg40-mt-1 { margin-top: 1rem; }
.pg40-mt-2 { margin-top: 2rem; }
.pg40-mb-1 { margin-bottom: 1rem; }
.pg40-mb-2 { margin-bottom: 2rem; }
.pg40-py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.pg40-py-2 { padding-top: 2rem; padding-bottom: 2rem; }

/* Badge */
.pg40-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--pg40-gradient);
    color: #fff;
}

/* Divider */
.pg40-divider {
    height: 1px;
    background: var(--pg40-border);
    margin: 2rem 0;
}

/* Animation */
@keyframes pg40-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pg40-pulse {
    animation: pg40-pulse 2s infinite;
}
