/* PhoneJoy App CSS - Mobile First Design */
:root {
    --primary: #FF69B4;
    --secondary: #FFDFBA;
    --dark: #0D1117;
    --accent: #FFC0CB;
    --white: #FFFFFF;
    --gray: #F5F5F5;
    --text: #333333;
    --text-light: #666666;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --border: #E0E0E0;
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    overflow-x: hidden;
}

body.s3e9-no-scroll {
    overflow: hidden;
}

body.s3e9-paused * {
    animation-play-state: paused !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* Container */
.s3e9-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 769px) {
    .s3e9-container {
        max-width: 1200px;
        padding: 0 20px;
    }
}

/* Header */
.s3e9-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.s3e9-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 430px;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .s3e9-header-content {
        max-width: 1200px;
        padding: 16px 20px;
    }
}

.s3e9-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.s3e9-logo img {
    height: 40px;
    margin-right: 8px;
}

.s3e9-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s3e9-btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s3e9-btn-primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.s3e9-btn-primary:hover {
    background: var(--gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.s3e9-btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.s3e9-btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.s3e9-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    min-height: 44px;
    min-width: 44px;
}

.s3e9-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

@media (min-width: 769px) {
    .s3e9-menu-toggle {
        display: none;
    }
}

/* Mobile Menu */
.s3e9-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px var(--shadow);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.s3e9-mobile-menu.s3e9-active {
    right: 0;
}

.s3e9-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--primary);
    color: var(--white);
}

.s3e9-menu-close {
    font-size: 28px;
    color: var(--white);
    padding: 4px;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s3e9-menu-nav {
    padding: 20px 0;
}

.s3e9-menu-nav li {
    border-bottom: 1px solid var(--border);
}

.s3e9-menu-nav a {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

.s3e9-menu-nav a:hover {
    background: var(--gray);
    color: var(--primary);
}

.s3e9-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.s3e9-menu-overlay.s3e9-active {
    opacity: 1;
    visibility: visible;
}

/* Desktop Navigation */
.s3e9-desktop-nav {
    display: none;
}

@media (min-width: 769px) {
    .s3e9-desktop-nav {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .s3e9-desktop-nav a {
        color: var(--white);
        font-weight: 500;
        transition: var(--transition);
        padding: 8px 0;
        position: relative;
    }

    .s3e9-desktop-nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--white);
        transition: width 0.3s ease;
    }

    .s3e9-desktop-nav a:hover::after {
        width: 100%;
    }
}

/* Main Content */
.s3e9-main {
    margin-top: 64px;
}

@media (max-width: 768px) {
    .s3e9-main {
        padding-bottom: 80px;
    }
}

/* Carousel */
.s3e9-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin: 16px 0;
    box-shadow: 0 4px 20px var(--shadow);
}

.s3e9-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.s3e9-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.s3e9-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

@media (min-width: 769px) {
    .s3e9-slide img {
        height: 400px;
    }
}

.s3e9-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
}

.s3e9-slide-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.s3e9-slide-text {
    font-size: 14px;
    opacity: 0.9;
}

.s3e9-carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
}

.s3e9-carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    box-shadow: 0 2px 8px var(--shadow);
    pointer-events: all;
    transition: var(--transition);
}

.s3e9-carousel-btn:hover {
    background: var(--white);
    transform: scale(1.1);
}

.s3e9-carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.s3e9-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.s3e9-indicator.s3e9-active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* Sections */
.s3e9-section {
    margin: 32px 0;
}

.s3e9-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.s3e9-section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark);
    position: relative;
    padding-left: 16px;
}

.s3e9-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.s3e9-section-more {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.s3e9-section-more:hover {
    gap: 8px;
}

/* Game Grid */
.s3e9-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (min-width: 769px) {
    .s3e9-game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* Game Card */
.s3e9-game-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.s3e9-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.s3e9-game-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: var(--transition);
}

.s3e9-game-card:hover .s3e9-game-image {
    transform: scale(1.05);
}

.s3e9-game-info {
    padding: 12px;
    text-align: center;
}

.s3e9-game-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s3e9-game-category {
    font-size: 12px;
    color: var(--text-light);
}

.s3e9-game-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 105, 180, 0.9);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.s3e9-game-card:hover .s3e9-game-play {
    opacity: 1;
}

/* Content Module */
.s3e9-content-module {
    background: var(--gray);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}

.s3e9-module-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s3e9-module-content {
    color: var(--text-light);
    line-height: 1.8;
}

.s3e9-module-content p {
    margin-bottom: 16px;
}

.s3e9-module-content h3 {
    font-size: 18px;
    color: var(--text);
    margin: 20px 0 12px;
}

.s3e9-module-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.s3e9-module-content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.s3e9-module-content li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Promotional Links */
.s3e9-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.s3e9-promo-link:hover {
    gap: 10px;
    color: #FF1493;
}

/* FAQ Section */
.s3e9-faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.s3e9-faq-question {
    padding: 20px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.s3e9-faq-question:hover {
    background: var(--gray);
}

.s3e9-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-light);
    line-height: 1.8;
}

.s3e9-faq-item.s3e9-active .s3e9-faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}

.s3e9-faq-icon {
    font-size: 20px;
    transition: var(--transition);
}

.s3e9-faq-item.s3e9-active .s3e9-faq-icon {
    transform: rotate(180deg);
}

/* Footer */
.s3e9-footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0 80px;
    margin-top: 60px;
}

.s3e9-footer-content {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 769px) {
    .s3e9-footer-content {
        max-width: 1200px;
        padding: 0 20px;
    }
}

.s3e9-footer-section {
    margin-bottom: 32px;
}

.s3e9-footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--secondary);
}

.s3e9-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.s3e9-footer-links a {
    color: var(--white);
    opacity: 0.8;
    transition: var(--transition);
}

.s3e9-footer-links a:hover {
    opacity: 1;
    color: var(--secondary);
}

.s3e9-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.s3e9-partner-icon {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--dark);
    opacity: 0.8;
    transition: var(--transition);
}

.s3e9-partner-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.s3e9-footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 14px;
}

/* Bottom Navigation */
.s3e9-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px var(--shadow);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    padding: 8px 0;
}

@media (min-width: 769px) {
    .s3e9-bottom-nav {
        display: none;
    }
}

.s3e9-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    min-width: 60px;
    color: var(--text-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.s3e9-bottom-nav-item:hover,
.s3e9-bottom-nav-item.s3e9-active {
    color: var(--primary);
}

.s3e9-bottom-nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: var(--transition);
}

.s3e9-bottom-nav-item:hover .s3e9-bottom-nav-icon {
    transform: translateY(-2px);
}

.s3e9-bottom-nav-label {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

.s3e9-bottom-nav-item.s3e9-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Utility Classes */
.s3e9-text-center {
    text-align: center;
}

.s3e9-text-primary {
    color: var(--primary);
}

.s3e9-bg-primary {
    background: var(--primary);
}

.s3e9-mt-16 {
    margin-top: 16px;
}

.s3e9-mt-24 {
    margin-top: 24px;
}

.s3e9-mb-16 {
    margin-bottom: 16px;
}

.s3e9-mb-24 {
    margin-bottom: 24px;
}

.s3e9-hidden {
    display: none;
}

@media (min-width: 769px) {
    .s3e9-md-hidden {
        display: none;
    }
}

/* Loading Animation */
@keyframes s3e9-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.s3e9-loading {
    animation: s3e9-pulse 1.5s infinite;
}

/* Image lazy load */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img.s3e9-loaded {
    opacity: 1;
}