/**
 * 365 Login - Main Stylesheet
 * Mobile-first responsive design
 * Color Palette: #F8F8FF (text) | #1A1A1A (background)
 * Prefix: wd592-
 */

/* ==================== CSS Variables ==================== */
:root {
    --wd592-primary: #F8F8FF;
    --wd592-secondary: #1A1A1A;
    --wd592-accent: #FFD700;
    --wd592-accent-hover: #FFC107;
    --wd592-bg-dark: #0D0D0D;
    --wd592-bg-card: #252525;
    --wd592-bg-gradient: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
    --wd592-text-light: #F8F8FF;
    --wd592-text-muted: #A0A0A0;
    --wd592-border-color: #333333;
    --wd592-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --wd592-radius: 12px;
    --wd592-radius-sm: 8px;
    --wd592-transition: all 0.3s ease;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--wd592-bg-gradient);
    color: var(--wd592-text-light);
    line-height: 1.6;
    min-height: 100vh;
    max-width: 430px;
    margin: 0 auto;
    overflow-x: hidden;
}

body.wd592-menu-open {
    overflow: hidden;
}

a {
    color: var(--wd592-accent);
    text-decoration: none;
    transition: var(--wd592-transition);
}

a:hover {
    color: var(--wd592-accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== Header ==================== */
.wd592-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    z-index: 1000;
    border-bottom: 1px solid var(--wd592-border-color);
    transition: var(--wd592-transition);
}

.wd592-header.wd592-scrolled {
    background: rgba(13, 13, 13, 0.98);
    box-shadow: var(--wd592-shadow);
}

.wd592-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wd592-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wd592-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--wd592-accent) 0%, #FF8C00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wd592-header-actions {
    display: flex;
    gap: 10px;
}

.wd592-btn {
    padding: 8px 16px;
    border-radius: var(--wd592-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--wd592-transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wd592-btn-primary {
    background: linear-gradient(135deg, var(--wd592-accent) 0%, #FF8C00 100%);
    color: var(--wd592-secondary);
}

.wd592-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

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

.wd592-btn-secondary:hover {
    background: var(--wd592-accent);
    color: var(--wd592-secondary);
}

.wd592-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--wd592-text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* ==================== Mobile Menu ==================== */
.wd592-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--wd592-secondary);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.wd592-mobile-menu.wd592-active {
    right: 0;
}

.wd592-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(--wd592-transition);
}

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

.wd592-mobile-nav {
    list-style: none;
}

.wd592-mobile-nav li {
    margin-bottom: 15px;
}

.wd592-mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--wd592-bg-card);
    border-radius: var(--wd592-radius-sm);
    color: var(--wd592-text-light);
    font-weight: 500;
    transition: var(--wd592-transition);
}

.wd592-mobile-nav a:hover {
    background: var(--wd592-accent);
    color: var(--wd592-secondary);
}

/* ==================== Main Content ==================== */
main {
    padding-top: 70px;
    padding-bottom: 20px;
}

@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

.wd592-container {
    padding: 0 16px;
    max-width: 100%;
}

/* ==================== Hero Section ==================== */
.wd592-hero {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
    padding: 30px 16px;
    text-align: center;
    border-bottom: 1px solid var(--wd592-border-color);
}

.wd592-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.wd592-hero-subtitle {
    color: var(--wd592-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.wd592-hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.wd592-hero-buttons .wd592-btn {
    padding: 12px 24px;
    font-size: 1rem;
}

/* ==================== Game Categories ==================== */
.wd592-categories {
    padding: 20px 0;
    background: var(--wd592-bg-dark);
}

.wd592-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.wd592-category-tabs::-webkit-scrollbar {
    display: none;
}

.wd592-category-tab {
    flex-shrink: 0;
    padding: 10px 18px;
    background: var(--wd592-bg-card);
    border: 1px solid var(--wd592-border-color);
    border-radius: 20px;
    color: var(--wd592-text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--wd592-transition);
    white-space: nowrap;
}

.wd592-category-tab.wd592-active,
.wd592-category-tab:hover {
    background: var(--wd592-accent);
    color: var(--wd592-secondary);
    border-color: var(--wd592-accent);
}

/* ==================== Game Grid ==================== */
.wd592-games-section {
    padding: 20px 16px;
}

.wd592-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wd592-section-title i {
    color: var(--wd592-accent);
}

.wd592-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.wd592-game-card {
    background: var(--wd592-bg-card);
    border-radius: var(--wd592-radius);
    overflow: hidden;
    transition: var(--wd592-transition);
    cursor: pointer;
    border: 1px solid var(--wd592-border-color);
}

.wd592-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
    border-color: var(--wd592-accent);
}

.wd592-game-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.wd592-game-name {
    padding: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wd592-game-grid[data-category] {
    display: none;
}

.wd592-game-grid.wd592-active {
    display: grid;
}

/* ==================== Features Section ==================== */
.wd592-features {
    padding: 30px 16px;
    background: var(--wd592-bg-card);
}

.wd592-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.wd592-feature-card {
    background: var(--wd592-secondary);
    padding: 20px 15px;
    border-radius: var(--wd592-radius);
    text-align: center;
    border: 1px solid var(--wd592-border-color);
    transition: var(--wd592-transition);
}

.wd592-feature-card:hover {
    border-color: var(--wd592-accent);
    transform: translateY(-3px);
}

.wd592-feature-icon {
    font-size: 2rem;
    color: var(--wd592-accent);
    margin-bottom: 10px;
}

.wd592-feature-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.wd592-feature-desc {
    font-size: 0.75rem;
    color: var(--wd592-text-muted);
}

/* ==================== Promo Banner ==================== */
.wd592-promo-banner {
    background: linear-gradient(135deg, var(--wd592-accent) 0%, #FF8C00 100%);
    padding: 20px 16px;
    text-align: center;
    margin: 20px 0;
}

.wd592-promo-banner h3 {
    color: var(--wd592-secondary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.wd592-promo-banner p {
    color: var(--wd592-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.wd592-promo-banner .wd592-btn {
    background: var(--wd592-secondary);
    color: var(--wd592-accent);
}

/* ==================== Footer ==================== */
.wd592-footer {
    background: var(--wd592-bg-dark);
    padding: 30px 16px 20px;
    border-top: 1px solid var(--wd592-border-color);
}

.wd592-footer-partners {
    text-align: center;
    margin-bottom: 20px;
}

.wd592-footer-partners h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--wd592-text-muted);
}

.wd592-partner-logos {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wd592-partner-logos img {
    height: 30px;
    opacity: 0.7;
    transition: var(--wd592-transition);
}

.wd592-partner-logos img:hover {
    opacity: 1;
}

.wd592-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.wd592-footer-links a {
    color: var(--wd592-text-muted);
    font-size: 0.85rem;
}

.wd592-footer-links a:hover {
    color: var(--wd592-accent);
}

.wd592-footer-copyright {
    text-align: center;
    color: var(--wd592-text-muted);
    font-size: 0.8rem;
}

/* ==================== Bottom Navigation ==================== */
.wd592-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 5px;
    border-top: 1px solid var(--wd592-border-color);
    z-index: 1000;
}

.wd592-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    min-width: 60px;
    min-height: 60px;
    border-radius: var(--wd592-radius-sm);
    transition: var(--wd592-transition);
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--wd592-text-muted);
}

.wd592-nav-item:hover,
.wd592-nav-item.wd592-active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--wd592-accent);
}

.wd592-nav-item i {
    font-size: 22px;
}

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

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

/* ==================== Content Sections ==================== */
.wd592-content-section {
    padding: 25px 16px;
}

.wd592-content-section h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--wd592-accent);
}

.wd592-content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--wd592-text-light);
}

.wd592-content-section ul {
    list-style: none;
    margin-bottom: 15px;
}

.wd592-content-section ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.wd592-content-section ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--wd592-accent);
}

/* ==================== Responsive Adjustments ==================== */
@media (max-width: 768px) {
    .wd592-header-actions {
        gap: 8px;
    }

    .wd592-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (min-width: 769px) {
    body {
        max-width: 100%;
    }

    .wd592-hero {
        padding: 50px 30px;
    }

    .wd592-hero-title {
        font-size: 2.5rem;
    }

    .wd592-game-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .wd592-feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== Animations ==================== */
@keyframes wd592-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.wd592-pulse {
    animation: wd592-pulse 2s infinite;
}

@keyframes wd592-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wd592-fade-in {
    animation: wd592-fadeIn 0.5s ease forwards;
}
