/* CrazyWin PH - Core Stylesheet */
/* All classes use wb301- prefix to avoid conflicts */

:root {
    --wb301-primary: #B03060;
    --wb301-secondary: #DC143C;
    --wb301-accent: #FF0000;
    --wb301-bg: #0C0C0C;
    --wb301-surface: #1a1a1a;
    --wb301-text: #CCCCCC;
    --wb301-text-light: #ffffff;
    --wb301-text-dim: #999999;
    --wb301-border: #333333;
    --wb301-shadow: rgba(176, 48, 96, 0.2);
    --wb301-overlay: rgba(0, 0, 0, 0.8);
}

/* 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, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--wb301-text);
    background: var(--wb301-bg);
    overflow-x: hidden;
}

/* Container and layout */
.wb301-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.6rem;
    width: 100%;
}

.wb301-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wb301-main {
    flex: 1;
    padding-bottom: 7rem;
}

/* Header styles */
.wb301-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--wb301-bg) 0%, var(--wb301-surface) 100%);
    border-bottom: 1px solid var(--wb301-border);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.wb301-header-scrolled {
    box-shadow: 0 2px 20px var(--wb301-shadow);
}

.wb301-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 6rem;
    padding: 0 1.6rem;
}

.wb301-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--wb301-text-light);
    font-weight: 600;
    font-size: 1.8rem;
}

.wb301-logo-img {
    width: 3.2rem;
    height: 3.2rem;
    margin-right: 0.8rem;
    border-radius: 0.4rem;
}

.wb301-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wb301-auth-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--wb301-primary);
    border-radius: 0.4rem;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
}

.wb301-auth-btn.wb301-btn-primary {
    background: var(--wb301-primary);
    color: var(--wb301-text-light);
}

.wb301-auth-btn.wb301-btn-outline {
    color: var(--wb301-primary);
}

.wb301-auth-btn:hover {
    background: var(--wb301-primary);
    color: var(--wb301-text-light);
    transform: translateY(-1px);
}

.wb301-menu-toggle {
    display: flex;
    flex-direction: column;
    width: 2.4rem;
    height: 2.4rem;
    cursor: pointer;
    padding: 0.4rem;
}

.wb301-menu-toggle span {
    height: 0.2rem;
    background: var(--wb301-text);
    margin: 0.2rem 0;
    transition: 0.3s;
}

.wb301-menu-toggle-active span:nth-child(1) {
    transform: rotate(-45deg) translate(-0.4rem, 0.4rem);
}

.wb301-menu-toggle-active span:nth-child(2) {
    opacity: 0;
}

.wb301-menu-toggle-active span:nth-child(3) {
    transform: rotate(45deg) translate(-0.4rem, -0.4rem);
}

/* Mobile menu */
.wb301-mobile-menu {
    position: fixed;
    top: 6rem;
    left: -100%;
    width: 80%;
    height: calc(100vh - 6rem);
    background: var(--wb301-surface);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.wb301-menu-active {
    left: 0;
}

.wb301-menu-overlay {
    position: fixed;
    top: 6rem;
    left: 0;
    width: 100%;
    height: calc(100vh - 6rem);
    background: var(--wb301-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

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

.wb301-nav-menu {
    list-style: none;
    padding: 2rem 0;
}

.wb301-nav-item {
    border-bottom: 1px solid var(--wb301-border);
}

.wb301-nav-link {
    display: block;
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: var(--wb301-text);
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

.wb301-nav-link:hover {
    background: var(--wb301-primary);
    color: var(--wb301-text-light);
    padding-left: 3rem;
}

/* Carousel styles */
.wb301-carousel {
    position: relative;
    height: 20rem;
    margin: 2rem 0;
    border-radius: 1rem;
    overflow: hidden;
}

.wb301-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.wb301-slide-active {
    opacity: 1;
}

.wb301-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb301-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.wb301-carousel-indicator {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wb301-indicator-active {
    background: var(--wb301-primary);
    transform: scale(1.2);
}

/* Button styles */
.wb301-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wb301-btn-primary {
    background: linear-gradient(135deg, var(--wb301-primary) 0%, var(--wb301-secondary) 100%);
    color: var(--wb301-text-light);
    box-shadow: 0 4px 15px var(--wb301-shadow);
}

.wb301-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--wb301-shadow);
}

.wb301-play-btn {
    background: linear-gradient(135deg, var(--wb301-accent) 0%, var(--wb301-secondary) 100%);
    color: var(--wb301-text-light);
    border: none;
    border-radius: 0.8rem;
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    position: relative;
    overflow: hidden;
}

.wb301-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
}

.wb301-promo-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    animation: wb301-pulse 2s infinite;
}

/* Game grid styles */
.wb301-game-section {
    margin: 3rem 0;
}

.wb301-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wb301-text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.wb301-game-item {
    background: var(--wb301-surface);
    border-radius: 0.8rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--wb301-border);
}

.wb301-game-item:hover,
.wb301-game-item-active {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--wb301-shadow);
    border-color: var(--wb301-primary);
}

.wb301-game-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 0.8rem;
    border-radius: 0.6rem;
    object-fit: cover;
}

.wb301-game-name {
    font-size: 1.1rem;
    color: var(--wb301-text);
    font-weight: 500;
    line-height: 1.3;
}

/* Content sections */
.wb301-content-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--wb301-surface);
    border-radius: 1rem;
    border: 1px solid var(--wb301-border);
}

.wb301-section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.wb301-section-header h1,
.wb301-section-header h2 {
    color: var(--wb301-text-light);
    margin-bottom: 1rem;
}

.wb301-section-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
}

.wb301-section-header h2 {
    font-size: 2rem;
    font-weight: 600;
}

.wb301-text-content {
    line-height: 1.6;
    color: var(--wb301-text);
}

.wb301-text-content p {
    margin-bottom: 1.5rem;
}

.wb301-text-content ul,
.wb301-text-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.wb301-text-content li {
    margin-bottom: 0.8rem;
}

.wb301-text-content a {
    color: var(--wb301-primary);
    text-decoration: none;
    font-weight: 500;
}

.wb301-text-content a:hover {
    color: var(--wb301-secondary);
    text-decoration: underline;
}

.wb301-text-content strong {
    color: var(--wb301-text-light);
}

/* FAQ styles */
.wb301-faq-item {
    background: var(--wb301-bg);
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--wb301-border);
}

.wb301-faq-question {
    padding: 1.5rem;
    background: var(--wb301-surface);
    color: var(--wb301-text-light);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.wb301-faq-answer {
    padding: 1.5rem;
    color: var(--wb301-text);
    line-height: 1.6;
}

/* Bottom navigation */
.wb301-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6rem;
    background: var(--wb301-surface);
    border-top: 1px solid var(--wb301-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.wb301-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--wb301-text-dim);
    transition: all 0.3s ease;
    padding: 0.5rem;
    min-height: 4.4rem;
    min-width: 4.4rem;
}

.wb301-nav-active {
    color: var(--wb301-primary);
}

.wb301-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
}

.wb301-nav-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Footer styles */
.wb301-footer {
    background: var(--wb301-surface);
    border-top: 1px solid var(--wb301-border);
    padding: 3rem 0 8rem;
    margin-top: 4rem;
}

.wb301-footer-content {
    text-align: center;
}

.wb301-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.wb301-footer-link {
    color: var(--wb301-primary);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.wb301-footer-link:hover {
    color: var(--wb301-secondary);
}

.wb301-partners {
    margin: 2rem 0;
}

.wb301-partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 30rem;
    margin: 1rem auto;
}

.wb301-partner-icon {
    width: 100%;
    height: 4rem;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.wb301-partner-icon:hover {
    opacity: 1;
}

.wb301-copyright {
    color: var(--wb301-text-dim);
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* Animation classes */
.wb301-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.wb301-animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Ripple effect */
.wb301-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: wb301-ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes wb301-ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Pulse animation */
@keyframes wb301-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

/* Loading styles */
.wb301-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--wb301-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.wb301-loader-hide {
    opacity: 0;
}

.wb301-spinner {
    width: 4rem;
    height: 4rem;
    border: 0.3rem solid var(--wb301-border);
    border-top: 0.3rem solid var(--wb301-primary);
    border-radius: 50%;
    animation: wb301-spin 1s linear infinite;
}

.wb301-loading-text {
    margin-top: 2rem;
    color: var(--wb301-text);
    font-size: 1.4rem;
}

@keyframes wb301-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification */
.wb301-toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wb301-primary);
    color: var(--wb301-text-light);
    padding: 1rem 2rem;
    border-radius: 0.6rem;
    font-size: 1.4rem;
    z-index: 10001;
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
    transition: all 0.3s ease;
}

.wb301-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .wb301-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wb301-container {
        padding: 0 1.2rem;
    }
    
    .wb301-navbar {
        padding: 0 1.2rem;
    }
}

@media (max-width: 320px) {
    .wb301-game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wb301-auth-btn {
        padding: 0.5rem 0.8rem;
        font-size: 1.1rem;
    }
}