/* --- URSA REGISTRY STYLE v2.0 --- */

:root {
    --bg-dark: #03080f;
    --card-bg: rgba(20, 25, 40, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --neon-blue: #00ccff;
    --accent: #007aff;
    --text-main: #ffffff;
    --text-sec: #8e8e93;
    --success: #30d158;
    --warning: #ff9f0a;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

/* --- BACKGROUND FX --- */
.background-glow {
    position: fixed; top: -20%; left: -20%; width: 140%; height: 140%;
    background: radial-gradient(circle at 50% 30%, rgba(0, 204, 255, 0.08) 0%, transparent 60%);
    z-index: -1; pointer-events: none;
}

/* --- CONTAINER --- */
.main-container {
    width: 100%; max-width: 600px;
    display: flex; flex-direction: column; gap: 20px;
}

/* --- HEADER --- */
header { text-align: center; margin-bottom: 10px; }

.logo-area { 
    display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 5px;
    animation: fadeIn 0.5s ease;
}
.logo-area ion-icon { font-size: 28px; color: var(--neon-blue); }

h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px; font-weight: 900; letter-spacing: 1px;
}
h1 span { color: var(--neon-blue); }

.subtitle { font-size: 13px; color: var(--text-sec); font-weight: 500; }

/* --- INPUT SECTION --- */
.input-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: 24px;
    padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.input-wrapper {
    position: relative; display: flex; align-items: center;
    background: rgba(0,0,0,0.3); border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.input-wrapper:focus-within { border-color: var(--neon-blue); box-shadow: 0 0 15px rgba(0,204,255,0.1); }

.input-icon {
    font-size: 20px; color: var(--text-sec); margin-left: 15px;
}

input {
    flex: 1; background: transparent; border: none; padding: 16px;
    color: #fff; font-size: 14px; font-family: inherit; outline: none;
}

button {
    background: var(--neon-blue); color: #000; border: none; padding: 16px;
    border-radius: 16px; font-weight: 800; font-family: 'Unbounded', sans-serif;
    font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: 0.2s; text-transform: uppercase;
}
button:active { transform: scale(0.98); opacity: 0.9; }

/* --- LIST HEADER --- */
.list-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 10px; margin-top: 10px;
}
.list-header h2 { font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.live-dot {
    width: 8px; height: 8px; background: var(--success); border-radius: 50%;
    box-shadow: 0 0 10px var(--success); animation: pulse 2s infinite;
}

/* --- GAMES GRID (REPLACES TABLE) --- */
.games-grid { display: flex; flex-direction: column; gap: 10px; padding-bottom: 50px; }

.game-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
    border-radius: 20px; padding: 12px;
    display: flex; align-items: center; gap: 15px;
    transition: 0.3s; animation: slideUp 0.3s ease;
}
.game-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); }

.game-icon {
    width: 54px; height: 54px; border-radius: 14px; object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
}

.game-info { flex: 1; min-width: 0; }
.game-name { 
    font-size: 15px; font-weight: 700; color: #fff; text-decoration: none; 
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.game-meta { font-size: 11px; color: var(--text-sec); display: flex; align-items: center; gap: 5px; }

/* --- STATUS BADGES --- */
.status-badge {
    padding: 6px 12px; border-radius: 10px; font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}

.st-pending { background: rgba(255,255,255,0.1); color: #aaa; border: 1px solid rgba(255,255,255,0.1); }
.st-processing { background: rgba(255, 159, 10, 0.15); color: var(--warning); border: 1px solid rgba(255, 159, 10, 0.3); }
.st-ready { background: rgba(48, 209, 88, 0.15); color: var(--success); border: 1px solid rgba(48, 209, 88, 0.3); box-shadow: 0 0 10px rgba(48, 209, 88, 0.1); }

/* --- LOADING STATE --- */
.loading-state {
    text-align: center; padding: 40px; color: var(--text-sec); font-size: 13px;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.spinner {
    width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--neon-blue); border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- ANIMATIONS --- */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
