/* CSS Design for 222ph.xyz - All classes use "ui57-" prefix */

/* CSS Variables */
:root {
    --ui57-primary: #3CB371;
    --ui57-secondary: #32CD32;
    --ui57-dark: #1A1A2E;
    --ui57-accent: #228B22;
    --ui57-highlight: #FF8C00;
    --ui57-bg: #1A1A2E;
    --ui57-text: #FFFFFF;
    --ui57-text-muted: #B0B0B0;
    --ui57-border: #2A2A3E;
    --ui57-shadow: rgba(0, 0, 0, 0.3);
    --ui57-gradient: linear-gradient(135deg, var(--ui57-primary), var(--ui57-secondary));
}

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

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--ui57-text);
    background-color: var(--ui57-bg);
    overflow-x: hidden;
}

/* Layout Components */
.ui57-container {
    max-width: 43rem;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.ui57-main {
    flex: 1;
    padding-top: 7rem;
    padding-bottom: 8rem;
}

.ui57-grid {
    display: grid;
    gap: 1.5rem;
}

.ui57-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ui57-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* Header */
.ui57-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ui57-gradient);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--ui57-shadow);
}

.ui57-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    height: 6rem;
}

.ui57-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--ui57-text);
    font-weight: bold;
    font-size: 1.8rem;
}

.ui57-logo-img {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.4rem;
}

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

.ui57-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}

.ui57-menu-toggle span {
    display: block;
    height: 0.2rem;
    width: 100%;
    background: var(--ui57-text);
    margin: 0.3rem 0;
    transition: all 0.3s ease;
    border-radius: 0.1rem;
}

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

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

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

/* Mobile Menu */
.ui57-mobile-menu {
    position: fixed;
    top: 6rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ui57-dark);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.ui57-mobile-menu.ui57-active {
    transform: translateX(0);
}

.ui57-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ui57-mobile-nav li {
    margin-bottom: 1rem;
}

.ui57-nav-link {
    display: block;
    padding: 1.2rem 1.5rem;
    color: var(--ui57-text);
    text-decoration: none;
    border-radius: 0.8rem;
    transition: all 0.3s ease;
    font-size: 1.6rem;
    border: 1px solid transparent;
}

.ui57-nav-link:hover,
.ui57-nav-link.ui57-active {
    background: var(--ui57-gradient);
    border-color: var(--ui57-primary);
    transform: translateX(0.5rem);
}

/* Buttons */
.ui57-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 4.4rem;
    min-width: 4.4rem;
}

.ui57-btn-primary {
    background: var(--ui57-gradient);
    color: var(--ui57-text);
    box-shadow: 0 4px 15px rgba(60, 179, 113, 0.3);
}

.ui57-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(60, 179, 113, 0.4);
}

.ui57-btn-secondary {
    background: linear-gradient(135deg, var(--ui57-highlight), #FF6B35);
    color: var(--ui57-text);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.ui57-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
}

.ui57-btn-outline {
    background: transparent;
    color: var(--ui57-primary);
    border: 2px solid var(--ui57-primary);
}

.ui57-btn-outline:hover {
    background: var(--ui57-primary);
    color: var(--ui57-text);
}

/* Cards */
.ui57-card {
    background: linear-gradient(145deg, #252545, #2A2A4A);
    border-radius: 1.2rem;
    padding: 2rem;
    box-shadow: 0 8px 32px var(--ui57-shadow);
    border: 1px solid var(--ui57-border);
    transition: all 0.3s ease;
}

.ui57-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--ui57-shadow);
}

/* Carousel */
.ui57-carousel {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
}

.ui57-carousel-slide {
    position: relative;
    display: none;
    width: 100%;
    height: 20rem;
}

.ui57-carousel-slide.ui57-active {
    display: block;
}

.ui57-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ui57-carousel-img:hover {
    transform: scale(1.05);
}

.ui57-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1.5rem 1.5rem;
    color: white;
}

.ui57-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.ui57-carousel-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--ui57-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Game Grid */
.ui57-games-section {
    margin: 3rem 0;
}

.ui57-section-title {
    font-size: 2.4rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--ui57-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ui57-game-category {
    margin-bottom: 4rem;
}

.ui57-category-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--ui57-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.ui57-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.ui57-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(145deg, #252545, #2A2A4A);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--ui57-border);
}

.ui57-game-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--ui57-shadow);
    border-color: var(--ui57-primary);
}

.ui57-game-icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 0.8rem;
    margin-bottom: 0.8rem;
    object-fit: cover;
}

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

/* Content Sections */
.ui57-content-section {
    margin: 4rem 0;
}

.ui57-content-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--ui57-primary);
}

.ui57-content-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--ui57-text-muted);
    margin-bottom: 1.5rem;
}

.ui57-highlight-text {
    color: var(--ui57-highlight);
    font-weight: 600;
}

/* Footer */
.ui57-footer {
    background: var(--ui57-dark);
    padding: 3rem 0;
    border-top: 1px solid var(--ui57-border);
}

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

.ui57-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ui57-footer-link {
    color: var(--ui57-text-muted);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.ui57-footer-link:hover {
    color: var(--ui57-primary);
}

.ui57-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    opacity: 0.6;
}

.ui57-partner-logo {
    width: 3rem;
    height: 3rem;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.ui57-partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

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

/* Mobile Bottom Navigation */
.ui57-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ui57-gradient);
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    box-shadow: 0 -4px 20px var(--ui57-shadow);
    z-index: 999;
}

.ui57-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--ui57-text);
    font-size: 1rem;
    padding: 0.5rem;
    min-width: 4.4rem;
    transition: all 0.3s ease;
    border-radius: 0.8rem;
}

.ui57-bottom-nav-item:hover,
.ui57-bottom-nav-item.ui57-active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.ui57-bottom-nav-icon {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}

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

/* Animations */
@keyframes ui57-fadeIn {
    from { opacity: 0; transform: translateY(2rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ui57-slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes ui57-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-1rem); }
    60% { transform: translateY(-0.5rem); }
}

.ui57-animate-fade {
    animation: ui57-fadeIn 0.6s ease-out;
}

.ui57-animate-slide {
    animation: ui57-slideIn 0.5s ease-out;
}

.ui57-animate-bounce {
    animation: ui57-bounce 1s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ui57-games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ui57-game-icon {
        width: 4rem;
        height: 4rem;
    }
    
    .ui57-game-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .ui57-container {
        padding: 0 0.8rem;
    }
    
    .ui57-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    
    .ui57-game-item {
        padding: 0.8rem;
    }
    
    .ui57-game-icon {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .ui57-game-name {
        font-size: 0.9rem;
    }
}

/* Loading States */
body:not(.ui57-loaded) {
    overflow: hidden;
}

.ui57-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ui57-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

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

/* Utility Classes */
.ui57-text-center { text-align: center; }
.ui57-text-left { text-align: left; }
.ui57-text-right { text-align: right; }
.ui57-hidden { display: none; }
.ui57-visible { display: block; }
.ui57-flex { display: flex; }
.ui57-flex-center { display: flex; align-items: center; justify-content: center; }
.ui57-mt-1 { margin-top: 1rem; }
.ui57-mt-2 { margin-top: 2rem; }
.ui57-mt-3 { margin-top: 3rem; }
.ui57-mb-1 { margin-bottom: 1rem; }
.ui57-mb-2 { margin-bottom: 2rem; }
.ui57-mb-3 { margin-bottom: 3rem; }