/**
 * PHL789 - Main CSS Stylesheet
 * @version 1.0.0
 * @author phl789
 */

/* CSS Variables for Theme */
:root {
    --v347-primary: #1C2833;
    --v347-primary-light: #2C3843;
    --v347-primary-dark: #0C1823;
    --v347-secondary: #FF0000;
    --v347-secondary-light: #FF3333;
    --v347-secondary-dark: #CC0000;
    --v347-accent: #34495E;
    --v347-accent-light: #445A6E;
    --v347-accent-dark: #243848;
    --v347-highlight: #CD5C5C;
    --v347-highlight-light: #DD6C6C;
    --v347-highlight-dark: #BC4C4C;
    --v347-purple: #AD1457;
    --v347-purple-light: #BD2467;
    --v347-purple-dark: #8D0347;

    --v347-bg-primary: #1C2833;
    --v347-bg-secondary: #2C3843;
    --v347-bg-tertiary: #34495E;
    --v347-bg-overlay: rgba(28, 40, 51, 0.95);

    --v347-text-primary: #FFFFFF;
    --v347-text-secondary: #E0E0E0;
    --v347-text-muted: #B0B0B0;
    --v347-text-link: #FF0000;

    --v347-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --v347-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --v347-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
    --v347-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.5);

    --v347-radius-sm: 4px;
    --v347-radius-md: 8px;
    --v347-radius-lg: 12px;
    --v347-radius-xl: 16px;

    --v347-transition-fast: 0.2s ease;
    --v347-transition-normal: 0.3s ease;
    --v347-transition-slow: 0.5s ease;

    --v347-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --v347-font-size-xs: 0.75rem;
    --v347-font-size-sm: 0.875rem;
    --v347-font-size-base: 1rem;
    --v347-font-size-lg: 1.125rem;
    --v347-font-size-xl: 1.25rem;
    --v347-font-size-2xl: 1.5rem;
    --v347-font-size-3xl: 2rem;
    --v347-line-height-sm: 1.25;
    --v347-line-height-base: 1.5;
    --v347-line-height-lg: 1.75;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--v347-font-family);
    font-size: var(--v347-font-size-base);
    line-height: var(--v347-line-height-base);
    color: var(--v347-text-primary);
    background-color: var(--v347-bg-primary);
    overflow-x: hidden;
    position: relative;
}

/* Header Styles */
.v347-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--v347-bg-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--v347-border-color, rgba(255, 255, 255, 0.1));
    transition: var(--v347-transition-normal);
}

.v347-header.scrolled {
    background-color: rgba(28, 40, 51, 0.98);
    box-shadow: var(--v347-shadow-md);
}

.v347-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    max-width: 100%;
    margin: 0 auto;
}

.v347-header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--v347-text-primary);
    text-decoration: none;
    font-size: var(--v347-font-size-lg);
    font-weight: 600;
}

.v347-header-logo img {
    width: 24px;
    height: 24px;
}

.v347-header-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.v347-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--v347-radius-md);
    font-size: var(--v347-font-size-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--v347-transition-fast);
    position: relative;
    overflow: hidden;
}

.v347-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.v347-btn:hover::before {
    left: 100%;
}

.v347-btn-primary {
    background-color: var(--v347-secondary);
    color: white;
}

.v347-btn-primary:hover {
    background-color: var(--v347-secondary-dark);
    transform: translateY(-1px);
    box-shadow: var(--v347-shadow-md);
}

.v347-btn-secondary {
    background-color: transparent;
    color: var(--v347-text-primary);
    border: 1px solid var(--v347-border-color, rgba(255, 255, 255, 0.2));
}

.v347-btn-secondary:hover {
    background-color: var(--v347-bg-secondary);
    border-color: var(--v347-secondary);
    color: var(--v347-secondary);
}

.v347-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--v347-text-primary);
    font-size: var(--v347-font-size-xl);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--v347-radius-sm);
    transition: var(--v347-transition-fast);
}

.v347-menu-toggle:hover {
    background-color: var(--v347-bg-secondary);
}

.v347-menu-toggle[aria-expanded="true"] {
    color: var(--v347-secondary);
}

/* Mobile Navigation */
.v347-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--v347-bg-overlay);
    z-index: 9999;
    padding: 4rem 1rem 2rem;
    transition: right var(--v347-transition-normal);
    overflow-y: auto;
}

.v347-mobile-menu.active {
    right: 0;
}

.v347-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.v347-mobile-menu-header h3 {
    color: var(--v347-text-primary);
    font-size: var(--v347-font-size-xl);
}

.v347-mobile-menu-close {
    background: none;
    border: none;
    color: var(--v347-text-primary);
    font-size: var(--v347-font-size-xl);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--v347-radius-sm);
}

.v347-mobile-menu-close:hover {
    background-color: var(--v347-bg-secondary);
}

.v347-mobile-menu-list {
    list-style: none;
}

.v347-mobile-menu-item {
    margin-bottom: 0.5rem;
}

.v347-mobile-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--v347-text-primary);
    text-decoration: none;
    border-radius: var(--v347-radius-md);
    transition: var(--v347-transition-fast);
    font-size: var(--v347-font-size-base);
}

.v347-mobile-menu-link:hover {
    background-color: var(--v347-bg-secondary);
    color: var(--v347-secondary);
    padding-left: 1.5rem;
}

/* Bottom Navigation */
.v347-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--v347-bg-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--v347-border-color, rgba(255, 255, 255, 0.1));
    z-index: 1000;
    padding: 0.25rem 0;
}

@media (min-width: 769px) {
    .v347-bottom-nav {
        display: none;
    }
}

.v347-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.v347-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    color: var(--v347-text-muted);
    text-decoration: none;
    transition: var(--v347-transition-fast);
    border-radius: var(--v347-radius-md);
    position: relative;
}

.v347-bottom-nav-item:hover {
    color: var(--v347-text-primary);
    background-color: var(--v347-bg-secondary);
}

.v347-bottom-nav-item.active {
    color: var(--v347-secondary);
}

.v347-bottom-nav-icon {
    font-size: 24px;
    margin-bottom: 0.125rem;
}

.v347-bottom-nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* Main Content */
main {
    padding: calc(4rem + 1rem) 1rem 6rem;
    max-width: 100%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    main {
        padding-bottom: 6rem;
    }
}

/* Container and Layout */
.v347-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.v347-section {
    margin-bottom: 2rem;
}

.v347-grid {
    display: grid;
    gap: 1rem;
}

.v347-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.v347-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.v347-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Typography */
.v347-title {
    font-size: var(--v347-font-size-3xl);
    font-weight: 700;
    color: var(--v347-text-primary);
    margin-bottom: 1rem;
    line-height: var(--v347-line-height-sm);
}

.v347-title-2 {
    font-size: var(--v347-font-size-2xl);
    font-weight: 600;
    color: var(--v347-text-primary);
    margin-bottom: 0.75rem;
}

.v347-title-3 {
    font-size: var(--v347-font-size-xl);
    font-weight: 600;
    color: var(--v347-text-primary);
    margin-bottom: 0.5rem;
}

.v347-text {
    color: var(--v347-text-secondary);
    line-height: var(--v347-line-height-base);
    margin-bottom: 1rem;
}

.v347-text-muted {
    color: var(--v347-text-muted);
}

.v347-link {
    color: var(--v347-text-link);
    text-decoration: none;
    font-weight: 500;
    transition: var(--v347-transition-fast);
}

.v347-link:hover {
    text-decoration: underline;
}

/* Carousel */
.v347-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--v347-radius-lg);
    height: 200px;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .v347-carousel {
        height: 300px;
    }
}

.v347-carousel-track {
    display: flex;
    transition: transform var(--v347-transition-slow);
}

.v347-carousel-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.v347-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v347-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 1rem;
    color: white;
}

.v347-carousel-title {
    font-size: var(--v347-font-size-xl);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Game Grid */
.v347-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.v347-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--v347-text-primary);
    transition: var(--v347-transition-fast);
    padding: 0.5rem;
    border-radius: var(--v347-radius-sm);
}

.v347-game-item:hover {
    background-color: var(--v347-bg-secondary);
    transform: scale(1.05);
}

.v347-game-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.25rem;
    border-radius: var(--v347-radius-sm);
}

.v347-game-name {
    font-size: var(--v347-font-size-xs);
    text-align: center;
    line-height: var(--v347-line-height-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    white-space: nowrap;
}

/* Cards */
.v347-card {
    background-color: var(--v347-bg-secondary);
    border-radius: var(--v347-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--v347-shadow-sm);
    border: 1px solid var(--v347-border-color, rgba(255, 255, 255, 0.1));
}

.v347-card-header {
    margin-bottom: 1rem;
}

.v347-card-body {
    color: var(--v347-text-secondary);
}

.v347-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--v347-border-color, rgba(255, 255, 255, 0.1));
}

/* Footer */
.v347-footer {
    background-color: var(--v347-bg-tertiary);
    border-top: 1px solid var(--v347-border-color, rgba(255, 255, 255, 0.1));
    padding: 2rem 1rem 4rem;
    margin-top: 3rem;
}

.v347-footer-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.v347-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.v347-footer-link {
    color: var(--v347-text-muted);
    text-decoration: none;
    font-size: var(--v347-font-size-sm);
    transition: var(--v347-transition-fast);
}

.v347-footer-link:hover {
    color: var(--v347-text-primary);
}

.v347-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.v347-partner {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.8;
    transition: var(--v347-transition-fast);
}

.v347-partner:hover {
    opacity: 1;
}

.v347-footer-copyright {
    color: var(--v347-text-muted);
    font-size: var(--v347-font-size-sm);
    margin-bottom: 1rem;
}

/* Utility Classes */
.v347-hidden {
    display: none !important;
}

.v347-invisible {
    visibility: hidden !important;
}

.v347-text-center {
    text-align: center;
}

.v347-text-left {
    text-align: left;
}

.v347-text-right {
    text-align: right;
}

.v347-mt-1 { margin-top: 0.5rem; }
.v347-mt-2 { margin-top: 1rem; }
.v347-mt-3 { margin-top: 1.5rem; }
.v347-mt-4 { margin-top: 2rem; }

.v347-mb-1 { margin-bottom: 0.5rem; }
.v347-mb-2 { margin-bottom: 1rem; }
.v347-mb-3 { margin-bottom: 1.5rem; }
.v347-mb-4 { margin-bottom: 2rem; }

.v347-p-1 { padding: 0.5rem; }
.v347-p-2 { padding: 1rem; }
.v347-p-3 { padding: 1.5rem; }
.v347-p-4 { padding: 2rem; }

/* Responsive Breakpoints */
@media (min-width: 768px) {
    .v347-menu-toggle {
        display: none;
    }

    .v347-header-content {
        padding: 0.75rem 2rem;
    }

    .v347-header-buttons {
        gap: 1rem;
    }

    .v347-bottom-nav {
        display: none;
    }

    main {
        padding: calc(4rem + 2rem) 2rem 6rem;
    }

    .v347-container {
        padding: 0 2rem;
    }

    .v347-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .v347-game-icon {
        width: 70px;
        height: 70px;
    }

    .v347-game-name {
        font-size: var(--v347-font-size-sm);
        max-width: 90px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.v347-animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.v347-animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.v347-animate-pulse {
    animation: pulse 2s infinite;
}

/* Print Styles */
@media print {
    .v347-header,
    .v347-bottom-nav,
    .v347-mobile-menu {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
    }

    .v347-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}