:root {
    --bg-main: #050505;
    --bg-card: #0a0a0a;
    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.5);
    --text-main: #e4e4e7;
    --text-muted: #71717a;
    --border: #27272a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #eab308;
}

.hidden {
    display: none !important;
}

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

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

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* mobile blocker */
#mobile-blocker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 4px solid var(--error);
}

.mobile-msg {
    max-width: 400px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--error);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

.mobile-msg h1 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--error);
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.mobile-msg p {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.mobile-sub {
    color: var(--accent) !important;
    font-weight: bold;
}

/* activate mobile blocker on small screens */
@media (max-width: 768px) {
    #mobile-blocker {
        display: flex;
    }

    .app-container,
    footer {
        display: none;
    }
}

#bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    background-size: cover;
    background-position: center;
    z-index: -3;
    transition: opacity 1s ease;
    opacity: 0.3;
}

#theme-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(46, 16, 101, 0.8) 0%, #000000 80%);
    z-index: -2;
    pointer-events: none;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
    background-size: 100% 4px;
    z-index: -1;
    pointer-events: none;
}

.app-container {
    width: 100%;
    max-width: 650px;
    padding: 20px;
    padding-bottom: 80px;
    z-index: 10;
}

/* header */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-group {
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo-group:hover {
    opacity: 0.8;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -1px;
    line-height: 1;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.subtitle-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.version-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.version-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

.version-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    border: 1px solid #333;
    color: #eee;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.version-badge:hover::after {
    opacity: 1;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #555;
}

.version-badge.up-to-date .status-dot {
    background: var(--success);
    box-shadow: 0 0 5px var(--success);
}

.version-badge.outdated .status-dot {
    background: var(--error);
    box-shadow: 0 0 5px var(--error);
}

.version-badge.loading .status-dot {
    background: var(--warning);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

.status-indicator {
    font-size: 0.7rem;
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    align-self: flex-start;
}

/* interface section */
.search-tabs {
    display: flex;
    gap: 4px;
    padding-left: 12px;
    margin-bottom: -1px;
    position: relative;
    z-index: 5;
}

.tab-btn {
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid var(--border);
    border-bottom: none;
    color: var(--text-muted);
    padding: 6px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.tab-btn:hover {
    opacity: 1;
    background: rgba(30, 30, 30, 0.8);
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--accent);
    border-color: var(--accent);
    border-bottom: 1px solid var(--bg-card);
    opacity: 1;
    font-weight: 700;
    box-shadow: 0 -5px 15px rgba(124, 58, 237, 0.1);
    transform: translateY(1px);
}

.control-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0px 12px 12px 12px;
    padding: 5px;
    position: relative;
    z-index: 4;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.control-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.15);
}

.bar-content {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    gap: 10px;
}

.hidden {
    display: none !important;
}

.input-icon {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.bar-content:focus-within .input-icon {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

button#searchBtn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button#searchBtn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

button#searchBtn:active {
    transform: translateY(0);
}

.bar-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 0.8rem;
    flex: 1;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: white;
    border-color: var(--accent);
}

.error-msg {
    color: var(--error);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    margin-top: 10px;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.grid-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.02) 0%, transparent 100%);
}

.grid-item {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.grid-item:hover {
    transform: scale(1.03);
    border-color: var(--accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 10px;
    background: linear-gradient(to top, #000 10%, transparent);
    display: flex;
    flex-direction: column;
}

.grid-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #aaa;
}

.loader-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.settings-content {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section {
    background: rgba(15, 15, 16, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.settings-section:hover {
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(15, 15, 16, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.section-icon {
    font-size: 1.2rem;
}

.section-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
}

.section-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.setting-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    color: #e4e4e7;
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    border-radius: 8px;
    height: 120px;
    resize: vertical;
    outline: none;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

textarea:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}

.section-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.mini-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.mini-btn:hover {
    color: white;
    border-color: #555;
    background: rgba(255, 255, 255, 0.05);
}

.mini-btn.action:hover {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.mini-btn.warn:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: rgba(15, 15, 16, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-top: 30px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #050505;
}

.badge {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 1px;
}

.id-wrapper {
    cursor: pointer;
    display: flex;
    gap: 8px;
    align-items: center;
    transition: opacity 0.2s;
}

.id-wrapper:hover {
    opacity: 0.7;
}

.id-wrapper:active {
    transform: scale(0.98);
}

.id-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #555;
}

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

.hero-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    background-color: #000;
    background-size: cover;
    background-position: center top;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #0a0a0a 5%, rgba(10, 10, 10, 0.9) 50%, rgba(10, 10, 10, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 20px;
    padding-bottom: 0px;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
}

.hero-header {
    margin-bottom: 10px;
    flex-shrink: 0;
}

#gameTitle {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dev-label {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.rating-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    transition: all 0.3s;
}

.hero-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 10px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tag-pill {
    font-size: 0.6rem;
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.desc-text {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-buttons {
    display: flex;
    gap: 10px;
}

.steam-btn,
.db-btn,
.warning-badge {
    height: 38px;
    display: flex;
    align-items: center;
}

.steam-btn,
.db-btn {
    gap: 10px;
    background: #171a21;
    color: #e4e4e7;
    border: 1px solid #333;
    padding: 0 15px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.steam-btn:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #fff;
}

.db-btn:hover {
    background: #6c008d65;
    border-color: #7c3aed;
    color: #fff;
}

.warning-container {
    display: flex;
    gap: 10px;
}

.warning-badge {
    padding: 0 16px;
    font-size: 0.8rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    gap: 6px;
    text-transform: uppercase;
}

.warn-denuvo {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid #dc2626;
    color: #fca5a5;
}

.warn-online {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid #eab308;
    color: #fde047;
}

.controls {
    padding: 20px;
    padding-top: 0px;
    background: #0a0a0a;
}

.log-window {
    background: #050505;
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 100px;
    padding: 10px;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #aaa;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 4px;
}

.status-ok {
    color: var(--success);
}

.status-fail {
    color: var(--error);
}

.status-warn {
    color: #fbbf24;
}

.primary-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: black;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.primary-btn:hover {
    background: #f4f4f5;
    transform: translateY(-1px);
}

.primary-btn:disabled {
    background: #52525b;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none !important;
}

footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 20;
}

footer a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(10, 10, 10, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

footer a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

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

.lua-modal.show {
    opacity: 1;
}

.lua-modal.hidden {
    display: none !important;
}

.lua-modal-content {
    background: linear-gradient(145deg, #0f0f10 0%, #0a0a0b 100%);
    border: 1px solid var(--accent);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 40px var(--accent-glow), 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lua-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(124, 58, 237, 0.1);
}

.lua-source {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
}

.lua-close-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lua-close-btn:hover {
    color: var(--error);
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.lua-code {
    flex: 1;
    overflow: auto;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #c5f6c8;
    background: #050505;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.lua-copy-btn {
    margin: 15px;
    flex-shrink: 0;
}