/* =====================================================
   HOOTALE — Hytale UUID Lookup
   Magical owl theme: indigo night sky, warm cream, hat blues
   ===================================================== */

/* ---- Variables ---- */
:root {
    /* Backgrounds — deep indigo night sky */
    --bg-primary:     #09091b;
    --bg-secondary:   #0e0f24;
    --bg-card:        #12142c;
    --bg-card-hover:  #171932;

    /* Owl hat blues (primary accent) */
    --accent:         #6D8DD4;
    --accent-dark:    #415BA5;
    --accent-light:   #9BB5EC;
    --accent-glow:    rgba(109, 141, 212, 0.22);
    --accent-glow-strong: rgba(109, 141, 212, 0.50);

    /* Owl eye turquoise (sparkle / secondary highlight) */
    --turquoise:      #4DD4C8;
    --turquoise-glow: rgba(77, 212, 200, 0.20);

    /* Owl feathers */
    --warm-cream:     #FFF3C0;   /* light feathers — UUID text, warm accents */
    --warm-brown:     #AC4D1E;   /* dark feathers — error tone */

    /* Text */
    --text-primary:   #EDE9DC;   /* warm off-white, like parchment */
    --text-secondary: #8A96BE;
    --text-muted:     #404870;

    /* UI chrome */
    --border:         rgba(109, 141, 212, 0.22);
    --border-subtle:  rgba(255, 255, 255, 0.06);
    --danger:         #D4704D;
    --danger-bg:      rgba(172, 77, 30, 0.07);
    --danger-border:  rgba(172, 77, 30, 0.32);
    --shadow:         0 6px 32px rgba(0, 0, 0, 0.55);
    --radius:         14px;
    --radius-sm:      8px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

/* ---- Base ---- */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* =====================================================
   STAR FIELD — radial-gradient dots in owl palette
   ===================================================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        /* ✦ Row 1 — top strip */
        radial-gradient(circle 1.5px at  4%  7%, rgba(255, 243, 192, 0.75) 0%, transparent 100%),
        radial-gradient(circle 1px   at 11%  3%, rgba(109, 141, 212, 0.90) 0%, transparent 100%),
        radial-gradient(circle 2px   at 21% 16%, rgba(255, 255, 255, 0.28) 0%, transparent 100%),
        radial-gradient(circle 1px   at 29%  8%, rgba( 77, 212, 200, 0.75) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 38% 13%, rgba(255, 243, 192, 0.55) 0%, transparent 100%),
        radial-gradient(circle 1px   at 46%  4%, rgba( 65,  91, 165, 0.85) 0%, transparent 100%),
        radial-gradient(circle 2px   at 54%  9%, rgba(255, 255, 255, 0.22) 0%, transparent 100%),
        radial-gradient(circle 1px   at 61%  3%, rgba(109, 141, 212, 0.80) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 70% 15%, rgba(255, 243, 192, 0.60) 0%, transparent 100%),
        radial-gradient(circle 1px   at 77%  7%, rgba( 65,  91, 165, 0.75) 0%, transparent 100%),
        radial-gradient(circle 2.5px at 84% 12%, rgba( 77, 212, 200, 0.45) 0%, transparent 100%),
        radial-gradient(circle 1px   at 91%  4%, rgba(255, 243, 192, 0.65) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 97% 17%, rgba(109, 141, 212, 0.70) 0%, transparent 100%),

        /* ✦ Row 2 — upper third */
        radial-gradient(circle 1px   at  2% 29%, rgba( 65,  91, 165, 0.85) 0%, transparent 100%),
        radial-gradient(circle 2px   at 13% 34%, rgba(255, 255, 255, 0.20) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 24% 27%, rgba(255, 243, 192, 0.50) 0%, transparent 100%),
        radial-gradient(circle 1px   at 34% 38%, rgba( 77, 212, 200, 0.60) 0%, transparent 100%),
        radial-gradient(circle 2px   at 44% 24%, rgba(109, 141, 212, 0.60) 0%, transparent 100%),
        radial-gradient(circle 1px   at 55% 33%, rgba(255, 243, 192, 0.42) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 66% 26%, rgba( 65,  91, 165, 0.72) 0%, transparent 100%),
        radial-gradient(circle 1px   at 76% 38%, rgba(255, 255, 255, 0.22) 0%, transparent 100%),
        radial-gradient(circle 2px   at 86% 30%, rgba(109, 141, 212, 0.50) 0%, transparent 100%),
        radial-gradient(circle 1px   at 95% 22%, rgba( 77, 212, 200, 0.60) 0%, transparent 100%),

        /* ✦ Row 3 — mid area */
        radial-gradient(circle 1.5px at  7% 50%, rgba(255, 243, 192, 0.35) 0%, transparent 100%),
        radial-gradient(circle 1px   at 17% 44%, rgba(109, 141, 212, 0.55) 0%, transparent 100%),
        radial-gradient(circle 2px   at 29% 55%, rgba( 65,  91, 165, 0.45) 0%, transparent 100%),
        radial-gradient(circle 1px   at 41% 47%, rgba(255, 255, 255, 0.18) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 57% 53%, rgba(255, 243, 192, 0.30) 0%, transparent 100%),
        radial-gradient(circle 1px   at 71% 45%, rgba( 77, 212, 200, 0.42) 0%, transparent 100%),
        radial-gradient(circle 2px   at 83% 54%, rgba(109, 141, 212, 0.38) 0%, transparent 100%),
        radial-gradient(circle 1px   at 93% 47%, rgba( 65,  91, 165, 0.58) 0%, transparent 100%),

        /* ✦ Row 4 — lower, sparse (below content fold) */
        radial-gradient(circle 1px   at  9% 68%, rgba(255, 243, 192, 0.25) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 33% 64%, rgba(109, 141, 212, 0.30) 0%, transparent 100%),
        radial-gradient(circle 1px   at 60% 70%, rgba( 65,  91, 165, 0.35) 0%, transparent 100%),
        radial-gradient(circle 2px   at 85% 62%, rgba(255, 243, 192, 0.20) 0%, transparent 100%);
}

/* =====================================================
   ATMOSPHERIC GLOW ORBS — overlaid on star field
   ===================================================== */
.site-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Top-left: blue hat glow */
.site-bg::before {
    content: '';
    position: absolute;
    top: -22%;
    left: -12%;
    width: 65%;
    height: 65%;
    background: radial-gradient(circle, rgba(109, 141, 212, 0.07) 0%, transparent 65%);
}

/* Bottom-right: deeper indigo glow */
.site-bg::after {
    content: '';
    position: absolute;
    bottom: -18%;
    right: -8%;
    width: 55%;
    height: 55%;
    background: radial-gradient(circle, rgba(65, 91, 165, 0.055) 0%, transparent 65%);
}

/* ---- Layout ---- */
.section {
    position: relative;
    z-index: 1;
    padding: 3.5rem 1.5rem 6rem;
}

.container {
    max-width: 660px !important;
}

/* =====================================================
   HEADER — Owl logo + title
   ===================================================== */
.hero-header {
    text-align: center;
    margin-bottom: 2.75rem;
}

.site-title-link {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

/* Owl mascot logo */
.site-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 14px rgba(109, 141, 212, 0.55))
        drop-shadow(0 0 30px rgba(77, 212, 200, 0.20));
    animation: owlFloat 5s ease-in-out infinite;
    display: block;
}

@keyframes owlFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    40%       { transform: translateY(-7px) rotate(-1.5deg); }
    60%       { transform: translateY(-5px) rotate(1deg); }
}

.site-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: clamp(2.1rem, 5.5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.07em;
    line-height: 1;
    margin: 0;
    text-shadow:
        0 0 45px var(--accent-glow-strong),
        0 0 90px rgba(65, 91, 165, 0.20),
        0 2px 8px rgba(0, 0, 0, 0.7);
    transition: text-shadow 0.35s ease;
}

.site-title-link:hover .site-title {
    text-shadow:
        0 0 65px var(--accent-glow-strong),
        0 0 130px rgba(65, 91, 165, 0.28),
        0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Sparkle stars flanking the title (pure CSS, no extra HTML) */
.site-title::before,
.site-title::after {
    content: '✦';
    font-size: 0.55em;
    color: var(--accent);
    opacity: 0.5;
    vertical-align: super;
    animation: starPulse 3s ease-in-out infinite;
}
.site-title::before { margin-right: 0.4em; }
.site-title::after  { margin-left:  0.4em; animation-delay: 1.5s; }

@keyframes starPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50%       { opacity: 0.75; transform: scale(1.2); }
}

.site-subtitle {
    display: block;
    font-size: 0.74rem;
    color: var(--text-secondary);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 400;
    margin-top: 0.6rem;
}

/* =====================================================
   SEARCH
   ===================================================== */
.search-wrapper {
    margin-bottom: 0.5rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--accent);
    font-size: 0.88rem;
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.search-container:focus-within .search-icon {
    opacity: 1;
}

.search-input {
    width: 100%;
    padding: 0.95rem 1.2rem 0.95rem 2.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition:
        border-color 0.22s ease,
        box-shadow   0.22s ease,
        background   0.22s ease;
    -webkit-appearance: none;
    appearance: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow:
        0 0 0 3px var(--accent-glow),
        var(--shadow);
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */
.loading-container {
    display: flex;
    justify-content: center;
    padding: 2.5rem 0;
}

.loading-spinner {
    width: 34px;
    height: 34px;
    border: 2.5px solid var(--border-subtle);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.my-indicator { display: none; }
.htmx-request .my-indicator  { display: flex; }
.htmx-request.my-indicator   { display: flex; }

/* =====================================================
   PROFILE CARD
   ===================================================== */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeSlideIn 0.3s ease;
    margin-top: 1.5rem;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.75rem;
    background: linear-gradient(
        135deg,
        rgba(109, 141, 212, 0.13) 0%,
        rgba(65,  91,  165, 0.04) 100%
    );
    border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px var(--accent-glow);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.profile-identity {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.profile-username {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-badge {
    display: inline-block;
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    font-weight: 600;
    background: rgba(109, 141, 212, 0.10);
    border: 1px solid rgba(109, 141, 212, 0.28);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    width: fit-content;
}

.profile-card-body {
    padding: 1.4rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.profile-field-label {
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-field-label i {
    margin-right: 0.35rem;
    color: var(--accent);
    opacity: 0.65;
    width: 12px;
    text-align: center;
}

.profile-field-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* UUID block — warm cream colour, like owl light feathers */
.profile-uuid-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.profile-uuid {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.86rem;
    color: var(--warm-cream);
    background: rgba(255, 243, 192, 0.06);
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 243, 192, 0.14);
    display: block;
    word-break: break-all;
    letter-spacing: 0.05em;
    line-height: 1.65;
    flex: 1;
}

.uuid-copy-btn {
    flex-shrink: 0;
    background: rgba(109, 141, 212, 0.10);
    border: 1px solid rgba(109, 141, 212, 0.22);
    border-radius: var(--radius-sm);
    color: var(--accent);
    cursor: pointer;
    padding: 0 0.85rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background     0.18s ease,
        color          0.18s ease,
        border-color   0.18s ease,
        box-shadow     0.18s ease;
}

.uuid-copy-btn:hover {
    background: rgba(109, 141, 212, 0.20);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.uuid-copy-btn.copied {
    color: #86efac;
    background: rgba(134, 239, 172, 0.10);
    border-color: rgba(134, 239, 172, 0.25);
}

.profile-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0 -1.75rem;
}

/* =====================================================
   STATUS CARDS — not_found / error
   ===================================================== */
.status-card {
    text-align: center;
    padding: 2.75rem 2rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    animation: fadeSlideIn 0.3s ease;
    margin-top: 1.5rem;
}

.status-not-found {
    border-color: rgba(109, 141, 212, 0.18);
}

.status-error {
    border-color: var(--danger-border);
    background: var(--danger-bg);
}

.status-icon {
    font-size: 2.2rem;
    margin-bottom: 0.9rem;
    line-height: 1;
}

.status-not-found .status-icon { color: var(--text-muted); }
.status-error     .status-icon { color: var(--danger); }

.status-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
}

.status-message {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =====================================================
   FOOTER
   ===================================================== */
.credit-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 0.7rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    z-index: 10;
    letter-spacing: 0.03em;
}

.credit-footer strong {
    color: var(--text-secondary);
    font-weight: 500;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track  { background: var(--bg-primary); }
::-webkit-scrollbar-thumb  { background: rgba(109,141,212,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }
