:root {
    --bg-dark: #07090f;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-lighter: rgba(255, 255, 255, 0.15);
    
    --brand-gradient: linear-gradient(135deg, #0ea5e9, #3b82f6, #4f46e5);
    --brand-glow: rgba(59, 130, 246, 0.5);
    
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.2);
    --success-text: #34d399;
    
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-border: rgba(239, 68, 68, 0.2);
    --error-text: #f87171;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Global Premium Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2); 
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5); 
}

/* Firefox compatibility */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0,0,0,0.2);
}

/* Premium Backgrounds */
.mesh-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    opacity: 0.6;
}

.mesh-blob {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    opacity: 0.6;
    animation: drift 20s ease-in-out infinite alternate;
}

.blob-1 {
    top: -10%; left: -10%; width: 600px; height: 600px;
    background: #1e3a8a; /* Deep blue */
}

.blob-2 {
    bottom: -20%; right: -10%; width: 500px; height: 500px;
    background: #312e81; /* Deep indigo */
    animation-delay: -5s;
}

.blob-3 {
    top: 30%; left: 40%; width: 400px; height: 400px;
    background: #064e3b; /* Subtle dark teal */
    animation-delay: -10s;
    opacity: 0.4;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -50px) scale(1.1); }
}

.grid-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.page-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 3rem 2rem 5rem 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon-wrapper {
    background: var(--brand-gradient);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px var(--brand-glow);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.ping-dot {
    position: relative;
    display: flex;
    width: 8px; height: 8px;
}

.ping-animate {
    position: absolute;
    width: 100%; height: 100%;
    background-color: #10b981;
    border-radius: 50%;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.75;
}

.ping-static {
    position: relative;
    width: 100%; height: 100%;
    background-color: #10b981;
    border-radius: 50%;
}

@keyframes ping {
    75%, 100% { transform: scale(2.5); opacity: 0; }
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Layout Wrapper & Hero */
.content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-typography {
    flex: 1;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeSlideUp 0.8s ease-out;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-features {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.feature-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-gradient);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Glass Card */
.glass-card {
    width: 100%;
    max-width: 480px;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 1rem 2rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative; /* important for absolute positioning of dropdown */
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s;
}

.input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1rem 1rem 1rem 3rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper input:focus + .focus-border {
    transform: scaleX(1);
}

.input-wrapper input:focus ~ .input-icon {
    color: #3b82f6;
}

/* Premium Button */
.btn {
    width: 100%;
    position: relative;
    padding: 1rem;
    border: none;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--brand-gradient);
    opacity: 0.9;
    transition: opacity 0.3s;
    z-index: 0;
}

.btn:hover .btn-bg {
    opacity: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
    pointer-events: none;
}

.btn:hover::before { opacity: 1; }

.btn-text {
    position: relative;
    z-index: 2;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Loader */
.loader {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
    position: absolute;
    z-index: 3;
}

@keyframes spinner { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.btn.loading .btn-text { opacity: 0; }
.btn.loading .loader { display: block !important; }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }
.alert-error { background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); }

/* Realtime Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-dark);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    max-height: 250px;
    overflow-y: auto;
}

/* Custom Scrollbar for Search Results */
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.search-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.search-results::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-light);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(59, 130, 246, 0.15);
}

.search-item img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.search-item-info {
    display: flex;
    flex-direction: column;
}

.search-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.search-item-appid {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: -2px;
}

.no-results {
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Tools Expansion Grid */
.tools-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.section-header {
    text-align: center;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tool-screenshot {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid var(--border-light);
}

.tool-screenshot.placeholder {
    background: rgba(255,255,255,0.02);
}

.tool-info {
    padding: 2rem;
    display: flex; flex-direction: column; gap: 0.75rem; flex: 1;
}

/* Badges for Search */
.badge-dlc {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.badge-game {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.tool-info h3 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
.tool-info p { color: var(--text-secondary); font-size: 0.9rem; flex: 1; line-height: 1.6; }


