/* Doodle Jump Gaming Platform CSS Design
   Mobile-first design with uide- prefix for namespace isolation */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px for easy calculations */
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #34495E 0%, #2c3e50 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Color Palette Variables */
:root {
    --primary-dark: #34495E;
    --accent-red: #8B0000;
    --vibrant-orange: #FF4500;
    --soft-purple: #DDA0DD;
    --deep-purple: #BA55D3;
    --text-light: #ffffff;
    --text-muted: #bdc3c7;
    --bg-overlay: rgba(52, 73, 94, 0.95);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.6rem; }
h6 { font-size: 1.4rem; }

p {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: var(--vibrant-orange);
    transition: var(--transition);
}

a:hover {
    color: var(--soft-purple);
}

/* Utility Classes */
.uide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.uide-text-center { text-align: center; }
.uide-text-left { text-align: left; }
.uide-text-right { text-align: right; }

.uide-mb-1 { margin-bottom: 1rem; }
.uide-mb-2 { margin-bottom: 2rem; }
.uide-mb-3 { margin-bottom: 3rem; }

.uide-mt-1 { margin-top: 1rem; }
.uide-mt-2 { margin-top: 2rem; }
.uide-mt-3 { margin-top: 3rem; }

/* Header Styles */
.uide-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.uide-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 60px;
}

.uide-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
}

.uide-logo img {
    height: 32px;
    width: auto;
}

.uide-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.uide-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.uide-btn-primary {
    background: linear-gradient(135deg, var(--vibrant-orange), var(--accent-red));
    color: var(--text-light);
}

.uide-btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-red), var(--vibrant-orange));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.uide-btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--soft-purple);
}

.uide-btn-secondary:hover {
    background: var(--soft-purple);
    color: var(--primary-dark);
}

.uide-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Navigation */
.uide-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.uide-nav-item {
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.uide-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--vibrant-orange);
}

/* Mobile Menu */
.uide-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--primary-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.uide-mobile-menu.active {
    right: 0;
}

.uide-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.uide-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.uide-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.uide-mobile-nav-item {
    color: var(--text-light);
    font-size: 1.6rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.uide-mobile-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--vibrant-orange);
}

/* Main Content */
.uide-main {
    padding-top: 60px;
    min-height: 100vh;
}

/* Mobile bottom padding for navigation */
@media (max-width: 768px) {
    .uide-main {
        padding-bottom: 80px;
    }
}

/* Carousel */
.uide-carousel {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.uide-carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.uide-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.uide-carousel-slide.active {
    opacity: 1;
}

.uide-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uide-carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-light);
    padding: 2rem;
}

.uide-carousel-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.uide-carousel-text {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.uide-carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

.uide-carousel-btn {
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8rem;
    transition: var(--transition);
}

.uide-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.uide-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.uide-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.uide-carousel-indicator.active {
    background: var(--vibrant-orange);
}

/* Game Sections */
.uide-games-section {
    margin-bottom: 4rem;
}

.uide-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.uide-section-title {
    font-size: 2.2rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.uide-section-icon {
    color: var(--vibrant-orange);
    font-size: 2.4rem;
}

.uide-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.uide-game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.uide-game-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--vibrant-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.uide-game-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.uide-game-name {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Content Modules */
.uide-content-module {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.uide-module-title {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.uide-module-content {
    font-size: 1.4rem;
    line-height: 1.8;
}

.uide-module-content p {
    margin-bottom: 1.5rem;
}

.uide-module-content strong {
    color: var(--vibrant-orange);
    font-weight: 600;
}

/* Bottom Navigation */
.uide-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

.uide-bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.uide-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
    text-decoration: none;
}

.uide-bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.uide-bottom-nav-item.active {
    background: rgba(255, 69, 0, 0.2);
    color: var(--vibrant-orange);
}

.uide-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
    transition: var(--transition);
}

.uide-bottom-nav-item:hover .uide-bottom-nav-icon {
    transform: scale(1.1);
}

.uide-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
}

.uide-bottom-nav-item.active .uide-bottom-nav-text {
    color: var(--vibrant-orange);
}

/* Footer */
.uide-footer {
    background: var(--primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.uide-footer-content {
    text-align: center;
}

.uide-footer-partners {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.uide-footer-partner {
    height: 30px;
    width: auto;
    opacity: 0.7;
    transition: var(--transition);
}

.uide-footer-partner:hover {
    opacity: 1;
}

.uide-footer-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.uide-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.uide-footer-link {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
}

.uide-footer-link:hover {
    color: var(--vibrant-orange);
}

/* Scroll to Top Button */
.uide-scroll-top {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    background: var(--vibrant-orange);
    color: var(--text-light);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.uide-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.uide-scroll-top:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .uide-menu-toggle {
        display: block;
    }

    .uide-nav {
        display: none;
    }

    .uide-header-actions .uide-btn {
        padding: 0.6rem 1.2rem;
        font-size: 1.2rem;
    }

    .uide-carousel {
        height: 200px;
    }

    .uide-games-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.8rem;
    }

    .uide-game-image {
        height: 60px;
    }

    .uide-bottom-nav {
        display: block;
    }

    .uide-container {
        padding: 0 1rem;
    }

    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.8rem; }

    .uide-section-title {
        font-size: 1.8rem;
    }

    .uide-module-title {
        font-size: 1.8rem;
    }
}

@media (min-width: 769px) {
    .uide-bottom-nav {
        display: none !important;
    }

    .uide-main {
        padding-bottom: 0;
    }

    .uide-carousel {
        height: 300px;
    }

    .uide-games-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .uide-header-content {
        padding: 1rem;
    }

    .uide-logo {
        font-size: 1.6rem;
    }

    .uide-logo img {
        height: 24px;
    }

    .uide-btn {
        padding: 0.6rem 1rem;
        font-size: 1.2rem;
    }

    .uide-carousel {
        height: 180px;
    }

    .uide-carousel-content {
        padding: 1.5rem;
    }

    .uide-carousel-title {
        font-size: 1.6rem;
    }

    .uide-game-card {
        padding: 0.8rem;
    }

    .uide-game-image {
        height: 50px;
    }

    .uide-game-name {
        font-size: 1rem;
    }

    .uide-content-module {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes uide-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.uide-fade-in {
    animation: uide-fadeIn 0.6s ease forwards;
}

@keyframes uide-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.uide-pulse {
    animation: uide-pulse 2s infinite;
}

/* Loading States */
.uide-loading {
    position: relative;
    overflow: hidden;
}

.uide-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: uide-loading 1.5s infinite;
}

@keyframes uide-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Accessibility */
.uide-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.uide-btn:focus,
.uide-nav-item:focus,
.uide-game-card:focus {
    outline: 2px solid var(--vibrant-orange);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-muted: #ffffff;
        --shadow-light: 0 2px 10px rgba(255, 255, 255, 0.2);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}