﻿/* ============================================================
   Uisnwdx Homepage Styles — Doodle Sketch Theme v2
   ============================================================ */

/* ---------- Hero Section ---------- */
.ux-hero {
    background: var(--ux-bg-deep);
    padding: 60px var(--ux-content-pad) 70px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.06);
}

/* Floating doodle stars */
.ux-hero::before {
    content: '';
    position: absolute;
    top: 30px; right: 10%;
    width: 200px; height: 200px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 5 L61 35 L95 35 L68 57 L79 90 L50 70 L21 90 L32 57 L5 35 L39 35 Z' fill='none' stroke='%2300d2ff' stroke-width='1' opacity='0.08'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: ux-float 6s ease-in-out infinite;
}

.ux-hero::after {
    content: '';
    position: absolute;
    bottom: 20px; left: 5%;
    width: 150px; height: 150px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23a855f7' stroke-width='1.5' stroke-dasharray='8 4' opacity='0.08'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: ux-float 8s ease-in-out infinite reverse;
}

@keyframes ux-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Scribble decoration on hero */
.ux-hero-inner {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Wavy underline for hero title */
.ux-hero h1 {
    font-family: var(--ux-font-doodle);
    font-size: 3rem; font-weight: 700;
    color: var(--ux-text-primary); margin-bottom: 14px;
    letter-spacing: 1px;
}
.ux-hero h1 em {
    font-style: normal;
    color: var(--ux-accent-cyan);
    position: relative;
    display: inline-block;
}
.ux-hero h1 em::after {
    content: '';
    position: absolute; bottom: -2px; left: 0; right: 0;
    height: 4px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 2 Q25 0 50 2 T100 2 T150 2 T200 2' fill='none' stroke='%2300d2ff' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
    background-size: 200px 4px;
}

/* Hero pill badge */
.ux-hero-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--ux-bg-surface);
    border: 1.5px dashed var(--ux-border-sketch);
    padding: 5px 18px; border-radius: var(--ux-radius-round);
    font-family: var(--ux-font-doodle); font-size: 1rem;
    color: var(--ux-accent-cyan); margin-bottom: 18px;
    animation: ux-pill-bounce 3s ease-in-out infinite;
}

@keyframes ux-pill-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Hero description with hand-written feel */
.ux-hero-desc {
    font-family: var(--ux-font-hand);
    font-size: 1.15rem;
    color: var(--ux-text-secondary);
    max-width: 560px; margin: 0 auto 28px;
    line-height: 1.7;
}

/* Search bar with doodle border */
.ux-hero-search {
    display: flex; max-width: 480px; margin: 0 auto 20px;
    background: var(--ux-bg-surface);
    border: 2px solid var(--ux-border-sketch);
    border-radius: var(--ux-radius-round);
    overflow: hidden; transition: all 0.3s var(--ux-ease-out);
}
.ux-hero-search:focus-within {
    border-color: var(--ux-accent-cyan);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.15), 0 0 0 3px rgba(0, 210, 255, 0.08);
    transform: scale(1.01);
}
.ux-hero-search input {
    flex: 1; padding: 13px 18px; border: none;
    font-family: var(--ux-font-hand); font-size: 1rem;
    outline: none; background: transparent; color: var(--ux-text-primary);
}
.ux-hero-search input::placeholder { color: var(--ux-text-muted); }
.ux-hero-search button {
    padding: 13px 24px; background: var(--ux-grad-cyan);
    color: #fff; font-family: var(--ux-font-hand); font-size: 0.95rem;
    border: none; cursor: pointer; transition: all 0.25s var(--ux-ease-out);
}
.ux-hero-search button:hover {
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

/* Trending chips */
.ux-hero-chips {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap;
    color: var(--ux-text-muted); font-family: var(--ux-font-hand); font-size: 0.9rem;
}
.ux-hero-chips a {
    color: var(--ux-text-secondary);
    background: var(--ux-bg-surface);
    border: 1.5px dashed var(--ux-border);
    padding: 4px 14px; border-radius: var(--ux-radius-round);
    font-family: var(--ux-font-hand); font-size: 0.88rem;
    transition: all 0.2s var(--ux-ease-bounce);
}
.ux-hero-chips a:hover {
    border-color: var(--ux-accent-cyan);
    color: var(--ux-accent-cyan);
    border-style: solid;
    transform: translateY(-2px) rotate(-1deg);
    box-shadow: 2px 2px 0 rgba(0, 210, 255, 0.2);
}

/* ---------- Category Grid ---------- */
.ux-categories {
    padding: 50px var(--ux-content-pad);
    max-width: 100%; margin: 0 auto;
}

.ux-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.ux-cat-item {
    background: var(--ux-bg-surface);
    border: 2px solid var(--ux-border-sketch);
    border-radius: var(--ux-radius-lg);
    padding: 22px 14px; text-align: center;
    transition: all 0.3s var(--ux-ease-out);
    cursor: pointer; position: relative;
    overflow: hidden;
}

/* Doodle corner decoration */
.ux-cat-item::before {
    content: '';
    position: absolute;
    top: -8px; right: -8px;
    width: 24px; height: 24px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4 Q12 2 20 4 Q22 12 20 20' fill='none' stroke='%2300d2ff' stroke-width='1.5' stroke-dasharray='3 2' opacity='0'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    transition: opacity 0.3s;
}
.ux-cat-item:hover::before { opacity: 0.6; }

.ux-cat-item::after {
    content: '~'; position: absolute; bottom: -2px; right: 12px;
    font-family: var(--ux-font-doodle); font-size: 1.2rem;
    color: var(--ux-accent-cyan); opacity: 0;
    transition: opacity 0.2s;
}
.ux-cat-item:hover::after { opacity: 0.5; }

.ux-cat-item:hover {
    transform: translateY(-3px) rotate(-0.5deg);
    border-color: var(--ux-border-accent);
    box-shadow: 3px 3px 0 rgba(0, 210, 255, 0.12);
}

.ux-cat-icon {
    width: 50px; height: 50px;
    border-radius: var(--ux-radius-round);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 10px;
    color: #fff; border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    transition: transform 0.3s var(--ux-ease-bounce);
}
.ux-cat-item:hover .ux-cat-icon {
    transform: rotate(-8deg) scale(1.1);
}

.ux-cat-item h3 {
    font-family: var(--ux-font-hand);
    font-size: 1rem; margin-bottom: 3px;
    color: var(--ux-text-primary);
}
.ux-cat-item p {
    font-family: var(--ux-font-hand);
    font-size: 0.82rem; color: var(--ux-text-muted);
}

.ux-cat-action .ux-cat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ux-cat-puzzle .ux-cat-icon { background: var(--ux-grad-purple); }
.ux-cat-sports .ux-cat-icon { background: var(--ux-grad-green); }
.ux-cat-strategy .ux-cat-icon { background: var(--ux-grad-cyan); }
.ux-cat-casual .ux-cat-icon { background: var(--ux-grad-yellow); }
.ux-cat-girls .ux-cat-icon { background: var(--ux-grad-pink); }

/* ---------- Game Sections ---------- */
.ux-game-section {
    padding: 40px var(--ux-content-pad);
    max-width: 100%; margin: 0 auto;
}
.ux-game-section + .ux-game-section {
    border-top: 2px dashed rgba(255, 255, 255, 0.04);
}

/* Section label with doodle wiggle */
.ux-section-label {
    position: relative;
    display: inline-block;
}
.ux-section-label::before {
    content: '';
    position: absolute;
    bottom: -3px; left: 10%; right: 10%;
    height: 3px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 1.5 Q10 0 20 1.5 T40 1.5 T60 1.5 T80 1.5 T100 1.5' fill='none' stroke='%2300d2ff' stroke-width='1.5' opacity='0.4'/%3E%3C/svg%3E") repeat-x;
    background-size: 100px 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .ux-hero { padding: 40px 16px 50px; }
    .ux-hero h1 { font-size: 2rem; }
    .ux-hero-desc { font-size: 1rem; }
    .ux-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .ux-hero h1 { font-size: 1.7rem; }
    .ux-hero-search { flex-direction: column; border-radius: var(--ux-radius-lg); }
    .ux-hero-search button { padding: 12px; }
}
