/**
 * ph365 app - Main Stylesheet
 * All classes use prefix 'vaff-' for namespace isolation
 * Color Palette: #DEE2E6 | #FF8A80 | #32CD32 | #880E4F | #E0FFFF | #2C3E50
 * @version 1.0.0
 */

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

:root {
    --vaff-primary: #880E4F;
    --vaff-secondary: #2C3E50;
    --vaff-accent: #FF8A80;
    --vaff-success: #32CD32;
    --vaff-light: #E0FFFF;
    --vaff-muted: #DEE2E6;
    --vaff-bg: #1a1a2e;
    --vaff-bg-alt: #16213e;
    --vaff-text: #ffffff;
    --vaff-text-muted: #b0b0b0;
    --vaff-border-radius: 8px;
    --vaff-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --vaff-transition: all 0.3s ease;
    --vaff-font-size-base: 62.5%;
}

html {
    font-size: var(--vaff-font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--vaff-bg);
    color: var(--vaff-text);
    line-height: 1.5rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

.vaff-wrapper {
    padding-top: 6rem;
}

/* Header Styles */
.vaff-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--vaff-primary), var(--vaff-secondary));
    padding: 1rem 1.5rem;
    z-index: 1000;
    box-shadow: var(--vaff-shadow);
    transition: var(--vaff-transition);
}

.vaff-header-scrolled {
    padding: 0.8rem 1.5rem;
    background: rgba(136, 14, 79, 0.95);
}

.vaff-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 430px;
    margin: 0 auto;
}

.vaff-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.vaff-logo img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.vaff-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--vaff-text);
}

.vaff-header-actions {
    display: flex;
    gap: 0.8rem;
}

.vaff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--vaff-border-radius);
    cursor: pointer;
    transition: var(--vaff-transition);
    border: none;
    min-height: 44px;
    min-width: 44px;
}

.vaff-btn-primary {
    background: linear-gradient(135deg, var(--vaff-accent), #ff6b6b);
    color: var(--vaff-secondary);
}

.vaff-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 138, 128, 0.4);
}

.vaff-btn-secondary {
    background: transparent;
    border: 2px solid var(--vaff-success);
    color: var(--vaff-success);
}

.vaff-btn-secondary:hover {
    background: var(--vaff-success);
    color: var(--vaff-bg);
}

/* Hamburger Menu */
.vaff-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.vaff-hamburger span {
    width: 100%;
    height: 3px;
    background: var(--vaff-text);
    border-radius: 2px;
    transition: var(--vaff-transition);
}

.vaff-hamburger-active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.vaff-hamburger-active span:nth-child(2) {
    opacity: 0;
}

.vaff-hamburger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

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

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

.vaff-mobile-menu a {
    display: block;
    padding: 1.2rem;
    color: var(--vaff-text);
    text-decoration: none;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--vaff-transition);
}

.vaff-mobile-menu a:hover {
    background: rgba(255, 138, 128, 0.1);
    padding-left: 1.6rem;
}

.vaff-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: var(--vaff-transition);
}

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

/* Carousel/Slider */
.vaff-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--vaff-border-radius);
    margin-bottom: 2rem;
}

.vaff-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.vaff-slide {
    min-width: 100%;
    display: none;
}

.vaff-slide-active {
    display: block;
}

.vaff-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    cursor: pointer;
}

.vaff-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}

.vaff-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--vaff-transition);
}

.vaff-dot-active {
    background: var(--vaff-accent);
}

/* Game Grid */
.vaff-game-section {
    margin-bottom: 3rem;
}

.vaff-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--vaff-text);
    border-left: 4px solid var(--vaff-accent);
    padding-left: 1rem;
}

.vaff-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.vaff-game-item {
    text-align: center;
    cursor: pointer;
    transition: var(--vaff-transition);
}

.vaff-game-item:hover {
    transform: translateY(-4px);
}

.vaff-game-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--vaff-border-radius);
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: var(--vaff-transition);
}

.vaff-game-item:hover img {
    border-color: var(--vaff-accent);
}

.vaff-game-name {
    font-size: 1.1rem;
    color: var(--vaff-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Content Sections */
.vaff-section {
    padding: 2rem 0;
}

.vaff-card {
    background: var(--vaff-bg-alt);
    border-radius: var(--vaff-border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--vaff-shadow);
}

.vaff-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--vaff-accent);
}

.vaff-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--vaff-light);
}

.vaff-card p {
    font-size: 1.3rem;
    line-height: 1.8rem;
    color: var(--vaff-text-muted);
    margin-bottom: 1rem;
}

.vaff-card ul, .vaff-card ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.vaff-card li {
    font-size: 1.3rem;
    line-height: 1.8rem;
    color: var(--vaff-text-muted);
    margin-bottom: 0.5rem;
}

/* Promo Link Styles */
.vaff-promo-text {
    color: var(--vaff-accent);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.vaff-promo-text:hover {
    color: var(--vaff-success);
}

/* Footer */
.vaff-footer {
    background: var(--vaff-bg-alt);
    padding: 3rem 1.5rem 8rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vaff-footer-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.vaff-footer-brand p {
    font-size: 1.2rem;
    color: var(--vaff-text-muted);
    line-height: 1.6rem;
}

.vaff-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.vaff-footer-links a {
    padding: 0.6rem 1.2rem;
    background: var(--vaff-primary);
    color: var(--vaff-text);
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: var(--vaff-border-radius);
    transition: var(--vaff-transition);
}

.vaff-footer-links a:hover {
    background: var(--vaff-accent);
    color: var(--vaff-secondary);
}

.vaff-footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.vaff-footer-nav a {
    color: var(--vaff-text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--vaff-transition);
}

.vaff-footer-nav a:hover {
    color: var(--vaff-accent);
}

.vaff-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: var(--vaff-text-muted);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Bottom Navigation */
.vaff-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--vaff-primary), var(--vaff-secondary));
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.vaff-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: var(--vaff-text);
    transition: var(--vaff-transition);
    cursor: pointer;
}

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

.vaff-nav-item i, .vaff-nav-item .material-icons {
    font-size: 24px;
    margin-bottom: 2px;
}

.vaff-nav-item ion-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.vaff-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

/* Features Grid */
.vaff-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.vaff-feature-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--vaff-bg-alt);
    border-radius: var(--vaff-border-radius);
}

.vaff-feature-item i {
    font-size: 3rem;
    color: var(--vaff-accent);
    margin-bottom: 1rem;
}

.vaff-feature-item h3 {
    font-size: 1.4rem;
    color: var(--vaff-text);
    margin-bottom: 0.5rem;
}

.vaff-feature-item p {
    font-size: 1.2rem;
    color: var(--vaff-text-muted);
}

/* Testimonials */
.vaff-testimonials {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vaff-testimonial {
    background: var(--vaff-bg-alt);
    border-radius: var(--vaff-border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--vaff-accent);
}

.vaff-testimonial p {
    font-size: 1.3rem;
    color: var(--vaff-text-muted);
    font-style: italic;
    margin-bottom: 0.8rem;
}

.vaff-testimonial-author {
    font-size: 1.2rem;
    color: var(--vaff-success);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .vaff-wrapper {
        padding-bottom: 80px;
    }

    .vaff-hamburger {
        display: flex;
    }

    .vaff-header-actions .vaff-btn {
        display: none;
    }
}

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

    .vaff-header-actions .vaff-btn {
        display: inline-flex;
    }

    .vaff-hamburger {
        display: none;
    }

    .vaff-container {
        max-width: 768px;
    }
}
