:root {
    --bg-core: #050505;
    --bg-surface: #0f0f0f;
    --primary: hsl(16, 100%, 50%); /* Fire Orange */
    --primary-glow: hsla(16, 100%, 50%, 0.3);
    --accent-cyan: #00f2ff;
    --accent-purple: #bd00ff;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-light: rgba(255, 255, 255, 0.08);
    --glass: rgba(20, 20, 20, 0.7);
    --ease: cubic-bezier(0.645, 0.045, 0.355, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-core);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Visual Effects --- */
.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(circle at 10% 10%, rgba(255, 69, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(189, 0, 255, 0.05) 0%, transparent 40%);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(var(--border-light) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    opacity: 0.3;
}

/* --- Typography --- */
h1, h2, h3 { font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: -0.02em; }
.accent-text { color: var(--primary); text-shadow: 0 0 15px var(--primary-glow); }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }

/* --- Header --- */
.main-header {
    padding: 32px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.brand-text {
    font-size: 1.75rem;
    font-weight: 800;
}

.changelog-pill {
    background: var(--glass);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 50px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    font-weight: 600;
    font-size: 0.85rem;
}

.changelog-pill:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(255, 69, 0, 0.1);
}

.changelog-pill img { width: 20px; }

/* --- Cards & Glassmorphism --- */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: all 0.4s var(--ease);
}

.main-form-card {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
}

.main-form-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header { text-align: center; margin-bottom: 32px; }
.card-header h2 { font-size: 2rem; margin-bottom: 8px; }

/* --- Forms --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.input-wrapper {
    position: relative;
}

input, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-light);
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    transition: all 0.3s var(--ease);
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.15);
}

/* --- Buttons --- */
.btn-primary {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-primary:active { transform: translateY(0); }

/* --- Results Grid --- */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin: 60px 0;
}

.item-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    animation: fadeInUp 0.5s var(--ease) forwards;
}

.item-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.item-img-container {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 8px;
    border: 1px solid var(--border-light);
}

.item-img-container img { width: 100%; height: 100%; object-fit: contain; }

.item-info { flex: 1; }
.item-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.item-meta { display: flex; gap: 8px; margin-bottom: 12px; }

.badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.id-text { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }

/* --- Footer --- */
.main-footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-light);
    margin-top: 100px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.footer-links { display: flex; gap: 20px; }

.footer-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease);
}

.footer-pill:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 255, 0.05);
}

.footer-pill img { width: 24px; }
.creator { color: var(--text-main); font-weight: 800; }

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s var(--ease);
}

.modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body { padding: 32px; overflow-y: auto; }
.modal-footer { padding: 20px; border-top: 1px solid var(--border-light); text-align: center; }

.close-btn { background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.6; transition: 0.2s; }
.close-btn:hover { opacity: 1; color: var(--primary); }

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Mobile */
@media (max-width: 768px) {
    .main-form-card { padding: 24px; margin: 20px auto; }
    .header-flex { flex-direction: column; gap: 20px; }
    .results-grid { grid-template-columns: 1fr; }
}