/**
 * fairplay24 Layout Styles
 * Class prefix: g047-
 * Mobile-first responsive design
 */

/* CSS Custom Properties */
:root {
    --g047-primary: #FFA500;
    --g047-primary-dark: #FF8C00;
    --g047-primary-light: #FFBF00;
    --g047-bg: #262626;
    --g047-bg-dark: #1a1a1a;
    --g047-bg-light: #333333;
    --g047-text: #ffffff;
    --g047-text-muted: #cccccc;
    --g047-secondary: #34495E;
    --g047-accent: #FF8C00;
    --g047-success: #28a745;
    --g047-border: #444444;
    --g047-shadow: rgba(0, 0, 0, 0.3);
    --g047-transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--g047-text);
    background-color: var(--g047-bg);
    min-height: 100vh;
}

/* Container System */
.g047-container {
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.g047-wrapper {
    max-width: 43rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.g047-header {
    background-color: var(--g047-bg-dark);
    box-shadow: 0 2px 10px var(--g047-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.g047-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.g047-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--g047-text);
}

.g047-logo-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--g047-primary), var(--g047-primary-dark));
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.g047-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--g047-primary);
}

.g047-nav-buttons {
    display: flex;
    gap: 1rem;
}

.g047-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--g047-transition);
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.g047-btn-primary {
    background: linear-gradient(135deg, var(--g047-primary), var(--g047-primary-dark));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.g047-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.g047-btn-secondary {
    background: transparent;
    color: var(--g047-primary);
    border: 2px solid var(--g047-primary);
}

.g047-btn-secondary:hover {
    background: var(--g047-primary);
    color: #ffffff;
}

.g047-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.g047-menu-toggle span {
    display: block;
    width: 2.5rem;
    height: 0.3rem;
    background-color: var(--g047-primary);
    border-radius: 0.2rem;
    transition: var(--g047-transition);
}

/* Mobile Menu */
.g047-mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 30rem;
    height: 100vh;
    background-color: var(--g047-bg-dark);
    box-shadow: 2px 0 10px var(--g047-shadow);
    transition: left 0.3s ease;
    z-index: 9999;
    padding: 2rem;
    overflow-y: auto;
}

.g047-mobile-menu.g047-menu-open {
    left: 0;
}

.g047-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: var(--g047-transition);
    z-index: 9998;
}

.g047-menu-overlay.g047-overlay-active {
    opacity: 1;
    visibility: visible;
}

.g047-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--g047-border);
}

.g047-menu-close {
    background: none;
    border: none;
    color: var(--g047-text);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.g047-menu-nav a {
    display: block;
    padding: 1rem 0;
    color: var(--g047-text);
    text-decoration: none;
    font-size: 1.6rem;
    border-bottom: 1px solid var(--g047-border);
    transition: var(--g047-transition);
}

.g047-menu-nav a:hover {
    color: var(--g047-primary);
    padding-left: 1rem;
}

/* Hero Carousel */
.g047-hero {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 3rem;
    overflow: hidden;
    border-radius: 1rem;
}

.g047-hero-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.g047-hero-slide {
    min-width: 100%;
    height: 25rem;
    position: relative;
}

.g047-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Styles */
.g047-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.g047-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--g047-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.g047-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 0.3rem;
    background: linear-gradient(90deg, var(--g047-primary), var(--g047-primary-dark));
    border-radius: 0.2rem;
}

/* Game Grid */
.g047-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.g047-card {
    background-color: var(--g047-bg-light);
    border-radius: 0.8rem;
    overflow: hidden;
    transition: var(--g047-transition);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--g047-shadow);
}

.g047-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.2);
}

.g047-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

.g047-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--g047-transition);
}

.g047-card:hover .g047-card-image img {
    transform: scale(1.1);
}

.g047-card-content {
    padding: 0.8rem;
}

.g047-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--g047-text);
    text-align: center;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Content Section */
.g047-content {
    background-color: var(--g047-bg-light);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.g047-content h2 {
    font-size: 1.8rem;
    color: var(--g047-primary);
    margin-bottom: 1rem;
}

.g047-content h3 {
    font-size: 1.5rem;
    color: var(--g047-primary-light);
    margin: 1.5rem 0 0.8rem;
}

.g047-content p {
    margin-bottom: 1rem;
    color: var(--g047-text-muted);
    line-height: 1.6;
}

.g047-content ul, .g047-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.g047-content li {
    margin-bottom: 0.5rem;
    color: var(--g047-text-muted);
}

.g047-content a {
    color: var(--g047-primary);
    text-decoration: none;
    font-weight: 500;
}

.g047-content a:hover {
    text-decoration: underline;
}

/* Button Group */
.g047-btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.g047-btn-group .g047-btn {
    flex: 1;
    min-width: 12rem;
}

/* Footer */
.g047-footer {
    background-color: var(--g047-bg-dark);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--g047-border);
}

.g047-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.g047-footer-links a {
    color: var(--g047-text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: var(--g047-transition);
}

.g047-footer-links a:hover {
    color: var(--g047-primary);
}

.g047-footer-bottom {
    text-align: center;
    color: var(--g047-text-muted);
    font-size: 1.2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--g047-border);
}

/* Mobile Bottom Navigation */
.g047-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6rem;
    background-color: var(--g047-bg-dark);
    box-shadow: 0 -2px 10px var(--g047-shadow);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0.5rem 0;
}

.g047-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 6rem;
    min-height: 6rem;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--g047-text-muted);
    text-decoration: none;
    transition: var(--g047-transition);
    padding: 0.5rem;
}

.g047-nav-item:hover, .g047-nav-item.active {
    color: var(--g047-primary);
}

.g047-nav-icon {
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.g047-nav-label {
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (min-width: 769px) {
    .g047-mobile-menu,
    .g047-menu-toggle,
    .g047-menu-overlay,
    .g047-bottom-nav {
        display: none;
    }

    .g047-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .g047-hero-slide {
        height: 40rem;
    }

    main {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    main {
        padding-bottom: 8rem;
    }

    .g047-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .g047-hero-slide {
        height: 20rem;
    }

    .g047-nav-buttons {
        gap: 0.8rem;
    }

    .g047-btn {
        padding: 0.6rem 1rem;
        font-size: 1.2rem;
    }
}

/* Utility Classes */
.g047-text-center {
    text-align: center;
}

.g047-mb-1 { margin-bottom: 1rem; }
.g047-mb-2 { margin-bottom: 2rem; }
.g047-mb-3 { margin-bottom: 3rem; }

.g047-mt-1 { margin-top: 1rem; }
.g047-mt-2 { margin-top: 2rem; }
.g047-mt-3 { margin-top: 3rem; }
