/**
 * SpinPH Main Styles
 * CSS Class prefix: pgfb-
 * Color palette: #E5E5E5, #6F4E37, #0E1621, #FDF5E6, #F5DEB3, #006400
 * Mobile-first responsive design
 */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pgfb-primary: #E5E5E5;
    --pgfb-secondary: #6F4E37;
    --pgfb-dark: #0E1621;
    --pgfb-light: #FDF5E6;
    --pgfb-accent: #F5DEB3;
    --pgfb-success: #006400;
    --pgfb-white: #FFFFFF;
    --pgfb-black: #000000;
    --pgfb-gray: #888888;
    --pgfb-border: #CCCCCC;
    --pgfb-shadow: rgba(0, 0, 0, 0.1);
    --pgfb-shadow-dark: rgba(0, 0, 0, 0.3);
    --pgfb-gradient: linear-gradient(135deg, #6F4E37 0%, #0E1621 100%);
    --pgfb-radius: 8px;
    --pgfb-radius-large: 12px;
    --pgfb-transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--pgfb-dark);
    background-color: var(--pgfb-primary);
    overflow-x: hidden;
}

/* Typography */
.pgfb-h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pgfb-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.pgfb-h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--pgfb-secondary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.pgfb-h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pgfb-dark);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.pgfb-p {
    font-size: 1rem;
    color: var(--pgfb-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pgfb-small {
    font-size: 0.875rem;
    color: var(--pgfb-gray);
    line-height: 1.5;
}

/* Layout containers */
.pgfb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pgfb-main {
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 80px; /* Space for bottom nav on mobile */
}

@media (min-width: 769px) {
    .pgfb-main {
        padding-bottom: 2rem; /* Less padding on desktop */
    }
}

/* Header */
.pgfb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--pgfb-gradient);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--pgfb-transition);
    box-shadow: 0 2px 20px var(--pgfb-shadow-dark);
}

.pgfb-header.scrolled {
    background: rgba(14, 22, 33, 0.95);
    backdrop-filter: blur(20px);
}

.pgfb-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pgfb-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pgfb-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pgfb-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--pgfb-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pgfb-white);
    font-weight: bold;
}

/* Desktop navigation */
.pgfb-nav {
    display: none;
}

@media (min-width: 769px) {
    .pgfb-nav {
        display: flex;
        gap: 2rem;
        align-items: center;
    }
}

.pgfb-nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.pgfb-nav-link {
    color: var(--pgfb-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--pgfb-radius);
    transition: var(--pgfb-transition);
    position: relative;
}

.pgfb-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pgfb-accent);
}

.pgfb-nav-link.active {
    background: var(--pgfb-success);
    color: var(--pgfb-white);
}

/* Header buttons */
.pgfb-header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.pgfb-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--pgfb-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pgfb-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.pgfb-btn-primary {
    background: var(--pgfb-success);
    color: var(--pgfb-white);
}

.pgfb-btn-primary:hover {
    background: #004d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 100, 0, 0.3);
}

.pgfb-btn-secondary {
    background: transparent;
    color: var(--pgfb-light);
    border: 2px solid var(--pgfb-light);
}

.pgfb-btn-secondary:hover {
    background: var(--pgfb-light);
    color: var(--pgfb-dark);
}

/* Mobile menu toggle */
.pgfb-mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--pgfb-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--pgfb-radius);
    transition: var(--pgfb-transition);
}

@media (min-width: 769px) {
    .pgfb-mobile-menu-toggle {
        display: none;
    }
}

.pgfb-mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu */
.pgfb-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--pgfb-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-top: 4rem;
}

.pgfb-mobile-menu.active {
    right: 0;
}

.pgfb-mobile-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(--pgfb-transition);
}

.pgfb-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pgfb-mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pgfb-mobile-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pgfb-mobile-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--pgfb-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--pgfb-transition);
}

.pgfb-mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pgfb-accent);
}

.pgfb-mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--pgfb-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--pgfb-radius);
    transition: var(--pgfb-transition);
}

.pgfb-mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Bottom navigation (mobile only) */
.pgfb-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--pgfb-dark);
    z-index: 1000;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px var(--pgfb-shadow-dark);
}

@media (min-width: 769px) {
    .pgfb-bottom-nav {
        display: none;
    }
}

.pgfb-bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.pgfb-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--pgfb-gray);
    border-radius: var(--pgfb-radius);
    transition: var(--pgfb-transition);
    cursor: pointer;
    border: none;
    background: none;
}

.pgfb-bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pgfb-light);
}

.pgfb-bottom-nav-item.active {
    color: var(--pgfb-success);
    background: rgba(0, 100, 0, 0.2);
}

.pgfb-bottom-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.pgfb-bottom-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Carousel */
.pgfb-carousel {
    position: relative;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: var(--pgfb-radius-large);
    overflow: hidden;
    box-shadow: 0 8px 32px var(--pgfb-shadow-dark);
}

.pgfb-carousel-container {
    position: relative;
    height: 250px;
    background: var(--pgfb-gradient);
}

@media (min-width: 768px) {
    .pgfb-carousel-container {
        height: 400px;
    }
}

.pgfb-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--pgfb-light);
}

.pgfb-carousel-slide.active {
    opacity: 1;
}

.pgfb-carousel-content {
    max-width: 600px;
}

.pgfb-carousel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px var(--pgfb-shadow-dark);
}

@media (min-width: 768px) {
    .pgfb-carousel-title {
        font-size: 3rem;
    }
}

.pgfb-carousel-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px var(--pgfb-shadow-dark);
}

.pgfb-carousel-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.pgfb-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--pgfb-transition);
}

.pgfb-carousel-dot.active {
    background: var(--pgfb-success);
}

.pgfb-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.pgfb-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--pgfb-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--pgfb-transition);
}

.pgfb-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.pgfb-carousel-prev {
    left: 1rem;
}

.pgfb-carousel-next {
    right: 1rem;
}

/* Game sections */
.pgfb-games-section {
    margin: 3rem 0;
}

.pgfb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pgfb-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pgfb-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pgfb-section-icon {
    color: var(--pgfb-success);
    font-size: 1.5rem;
}

.pgfb-section-toggle {
    background: none;
    border: 2px solid var(--pgfb-secondary);
    color: var(--pgfb-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--pgfb-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--pgfb-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pgfb-section-toggle:hover {
    background: var(--pgfb-secondary);
    color: var(--pgfb-light);
}

.pgfb-section-toggle.active {
    background: var(--pgfb-success);
    border-color: var(--pgfb-success);
    color: var(--pgfb-white);
}

/* Game grid */
.pgfb-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .pgfb-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }
}

.pgfb-game-card {
    background: var(--pgfb-white);
    border-radius: var(--pgfb-radius-large);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--pgfb-shadow);
    transition: var(--pgfb-transition);
    cursor: pointer;
    position: relative;
}

.pgfb-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--pgfb-shadow-dark);
}

.pgfb-game-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--pgfb-gradient);
}

.pgfb-game-info {
    padding: 0.75rem;
    text-align: center;
}

.pgfb-game-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pgfb-dark);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pgfb-game-play {
    background: var(--pgfb-success);
    color: var(--pgfb-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--pgfb-radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pgfb-transition);
    width: 100%;
}

.pgfb-game-play:hover {
    background: #004d00;
    transform: scale(1.05);
}

/* Content sections */
.pgfb-content-section {
    background: var(--pgfb-white);
    border-radius: var(--pgfb-radius-large);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px var(--pgfb-shadow);
}

.pgfb-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .pgfb-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .pgfb-content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pgfb-content-card {
    background: var(--pgfb-light);
    border-radius: var(--pgfb-radius-large);
    padding: 1.5rem;
    transition: var(--pgfb-transition);
}

.pgfb-content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--pgfb-shadow-dark);
}

.pgfb-content-card-icon {
    font-size: 2.5rem;
    color: var(--pgfb-success);
    margin-bottom: 1rem;
}

.pgfb-content-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--pgfb-secondary);
    margin-bottom: 0.5rem;
}

.pgfb-content-card-text {
    color: var(--pgfb-dark);
    line-height: 1.6;
}

/* Footer */
.pgfb-footer {
    background: var(--pgfb-dark);
    color: var(--pgfb-light);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.pgfb-footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .pgfb-footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pgfb-footer-section h3 {
    color: var(--pgfb-accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.pgfb-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pgfb-footer-links li {
    margin-bottom: 0.5rem;
}

.pgfb-footer-links a {
    color: var(--pgfb-light);
    text-decoration: none;
    transition: var(--pgfb-transition);
}

.pgfb-footer-links a:hover {
    color: var(--pgfb-accent);
}

.pgfb-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.pgfb-partner-logo {
    width: 60px;
    height: 30px;
    background: var(--pgfb-white);
    border-radius: var(--pgfb-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--pgfb-dark);
    font-weight: 600;
}

.pgfb-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: var(--pgfb-gray);
    font-size: 0.875rem;
}

/* Utility classes */
.pgfb-text-center {
    text-align: center;
}

.pgfb-text-left {
    text-align: left;
}

.pgfb-text-right {
    text-align: right;
}

.pgfb-mb-1 {
    margin-bottom: 0.5rem;
}

.pgfb-mb-2 {
    margin-bottom: 1rem;
}

.pgfb-mb-3 {
    margin-bottom: 1.5rem;
}

.pgfb-mt-1 {
    margin-top: 0.5rem;
}

.pgfb-mt-2 {
    margin-top: 1rem;
}

.pgfb-mt-3 {
    margin-top: 1.5rem;
}

.pgfb-hidden {
    display: none;
}

.pgfb-visible {
    display: block;
}

.pgfb-flex {
    display: flex;
}

.pgfb-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgfb-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pgfb-flex-wrap {
    flex-wrap: wrap;
}

.pgfb-gap-1 {
    gap: 0.5rem;
}

.pgfb-gap-2 {
    gap: 1rem;
}

.pgfb-gap-3 {
    gap: 1.5rem;
}

/* Animations */
.pgfb-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pgfb-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.pgfb-scale-in {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.pgfb-scale-in.visible {
    transform: scale(1);
    opacity: 1;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .pgfb-hidden-mobile {
        display: none !important;
    }

    .pgfb-text-center-mobile {
        text-align: center !important;
    }

    .pgfb-flex-column-mobile {
        flex-direction: column !important;
    }
}

@media (min-width: 769px) {
    .pgfb-hidden-desktop {
        display: none !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--pgfb-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--pgfb-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pgfb-dark);
}

/* Loading states */
.pgfb-loading {
    position: relative;
    overflow: hidden;
}

.pgfb-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Focus styles for accessibility */
.pgfb-btn:focus,
.pgfb-nav-link:focus,
.pgfb-game-play:focus,
.pgfb-section-toggle:focus {
    outline: 2px solid var(--pgfb-success);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .pgfb-header,
    .pgfb-bottom-nav,
    .pgfb-carousel-controls,
    .pgfb-carousel-nav,
    .pgfb-game-play {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .pgfb-main {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}