.scanner-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
}

.scan-hero {
    text-align: center;
    margin-bottom: 36px;
}

.scan-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 14px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 100px;
    opacity: 0;
    animation: scanBadgeIn 0.5s var(--ease-warp) 0.1s forwards;
}

.scan-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin: 0 0 10px;
    letter-spacing: -2px;
    line-height: 1;
    opacity: 0;
    animation: scanBadgeIn 0.5s var(--ease-warp) 0.2s forwards;
}

.scan-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0;
    animation: scanBadgeIn 0.5s var(--ease-warp) 0.3s forwards;
}

@keyframes scanBadgeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mode-switch-container {
    display: flex;
    gap: 6px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 6px;
    border-radius: 50px;
    margin-bottom: 28px;
    border: 1px solid var(--glass-border);
    opacity: 0;
    animation: scanBadgeIn 0.5s var(--ease-warp) 0.25s forwards;
}

.mode-btn {
    padding: 10px 28px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.35s var(--ease-snap);
}

.mode-btn:hover { color: white; }

.mode-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.scan-bar {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin-bottom: 48px;
    z-index: 50;
    opacity: 0;
    animation: scanBadgeIn 0.5s var(--ease-warp) 0.3s forwards;
}

.scan-input {
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 18px 28px;
    padding-right: 120px;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.35s var(--ease-snap);
}

.scan-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.scan-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: white;
    color: black;
    border: none;
    border-radius: 50px;
    padding: 0 28px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.35s var(--ease-snap);
}

.scan-btn:hover { transform: scale(1.03); }
.scan-btn:active { transform: scale(0.98); }
.scan-btn.scan-loading { pointer-events: none; }
.scan-btn.scan-error { background: #ef4444; color: white; }

.suggestions-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(12, 12, 16, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    display: none;
    z-index: 9999;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.suggestions-box.active {
    display: block;
    animation: scanSuggIn 0.3s var(--ease-snap) forwards;
}

@keyframes scanSuggIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.suggestion-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 18px;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.25s var(--ease-snap);
}

.suggestion-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: white;
}

.sugg-name { font-weight: 600; color: white; }
.sugg-meta { font-size: 0.8rem; opacity: 0.8; }

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    width: 100%;
    opacity: 0;
    transform: translateY(24px);
    transition: none;
}

.stats-container.scan-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s var(--ease-warp), transform 0.5s var(--ease-warp);
}

.stats-container.scan-visible .scan-stat {
    opacity: 0;
    transform: translateY(16px);
    animation: scanCardIn 0.5s var(--ease-warp) forwards;
}

.stats-container.scan-visible .scan-profile-card {
    opacity: 0;
    transform: translateY(20px);
    animation: scanCardIn 0.6s var(--ease-warp) 0.1s forwards;
}

.stats-container.scan-visible .scan-stat[data-delay="0"] { animation-delay: 0.15s; }
.stats-container.scan-visible .scan-stat[data-delay="1"] { animation-delay: 0.2s; }
.stats-container.scan-visible .scan-stat[data-delay="2"] { animation-delay: 0.25s; }
.stats-container.scan-visible .scan-stat[data-delay="3"] { animation-delay: 0.3s; }
.stats-container.scan-visible .scan-stat[data-delay="4"] { animation-delay: 0.35s; }
.stats-container.scan-visible .scan-stat[data-delay="5"] { animation-delay: 0.4s; }
.stats-container.scan-visible .scan-stat[data-delay="6"] { animation-delay: 0.45s; }
.stats-container.scan-visible .scan-stat[data-delay="7"] { animation-delay: 0.5s; }
.stats-container.scan-visible .scan-stat[data-delay="8"] { animation-delay: 0.55s; }
.stats-container.scan-visible .scan-stat[data-delay="9"] { animation-delay: 0.6s; }
.stats-container.scan-visible .scan-stat[data-delay="10"] { animation-delay: 0.65s; }
.stats-container.scan-visible .scan-stat[data-delay="11"] { animation-delay: 0.7s; }
.stats-container.scan-visible .scan-stat[data-delay="12"] { animation-delay: 0.75s; }
.stats-container.scan-visible .scan-stat[data-delay="13"] { animation-delay: 0.8s; }
.stats-container.scan-visible .scan-stat[data-delay="14"] { animation-delay: 0.85s; }
.stats-container.scan-visible .scan-stat[data-delay="15"] { animation-delay: 0.9s; }
.stats-container.scan-visible .scan-stat[data-delay="16"] { animation-delay: 0.95s; }
.stats-container.scan-visible .scan-stat[data-delay="17"] { animation-delay: 1s; }
.stats-container.scan-visible .scan-stat[data-delay="18"] { animation-delay: 1.05s; }
.stats-container.scan-visible .scan-stat[data-delay="19"] { animation-delay: 1.1s; }
.stats-container.scan-visible .scan-stat[data-delay="20"] { animation-delay: 1.15s; }
.stats-container.scan-visible .scan-stat[data-delay="21"] { animation-delay: 1.2s; }
.stats-container.scan-visible .scan-stat[data-delay="22"] { animation-delay: 1.25s; }
.stats-container.scan-visible .scan-stat[data-delay="23"] { animation-delay: 1.3s; }
.stats-container.scan-visible .scan-stat[data-delay="24"] { animation-delay: 1.35s; }
.stats-container.scan-visible .scan-stat[data-delay="25"] { animation-delay: 1.4s; }
.stats-container.scan-visible .scan-stat[data-delay="26"] { animation-delay: 1.45s; }
.stats-container.scan-visible .scan-stat[data-delay="27"] { animation-delay: 1.5s; }
.stats-container.scan-visible .scan-stat[data-delay="28"] { animation-delay: 1.55s; }
.stats-container.scan-visible .scan-stat[data-delay="29"] { animation-delay: 1.6s; }
.stats-container.scan-visible .scan-stat[data-delay="30"] { animation-delay: 1.65s; }
.stats-container.scan-visible .scan-stat[data-delay="31"] { animation-delay: 1.7s; }
.stats-container.scan-visible .scan-stat[data-delay="32"] { animation-delay: 1.75s; }
.stats-container.scan-visible .scan-stat[data-delay="33"] { animation-delay: 1.8s; }
.stats-container.scan-visible .scan-stat[data-delay="34"] { animation-delay: 1.85s; }

@keyframes scanCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card {
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    overflow: hidden;
    transition: all 0.4s var(--ease-snap);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.06), transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.stat-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
}

.stat-val.sm { font-size: 1.1rem; color: rgba(255, 255, 255, 0.9); }
.stat-val.scan-accent { color: #f59e0b; }
.stat-val.scan-green { color: #10b981; }
.stat-label.scan-green { color: #10b981; }

.stat-link-btn {
    margin-top: 4px;
    align-self: flex-start;
    font-size: 0.9rem;
    padding: 8px 14px;
}

.scan-profile-card {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    padding: 32px;
    position: relative;
}

.scan-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.scan-profile-main { flex: 1; }

.scan-profile-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 10px 0 4px;
}

.scan-profile-user {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.scan-profile-meta {
    display: flex;
    gap: 24px;
}

.scan-meta-item {
    text-align: right;
}

.scan-profile-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 20px 0 0;
    max-width: 85%;
}

.scan-profile-avatar {
    position: absolute;
    right: 32px;
    bottom: 32px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.85;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pill .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.st-online { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.st-offline { background: rgba(255, 255, 255, 0.06); color: #888; }
.st-banned { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.scan-game-card {
    grid-column: span 3;
    padding: 32px;
}

.scan-game-header {
    display: flex;
    gap: 28px;
    align-items: center;
}

.scan-game-icon {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.6);
}

.scan-game-info { flex: 1; }

.scan-game-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px;
}

.scan-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.scan-game-meta span:first-child {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.scan-pill {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.scan-pill-accent {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.scan-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-snap);
}

.scan-copy-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.scan-ratio-wrap {
    margin-top: 28px;
}

.scan-ratio-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.scan-ratio-fill {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, var(--accent), #10b981);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scan-ratio-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 700px) {
    .stats-container { grid-template-columns: 1fr; }
    .scan-profile-card, .scan-game-card { grid-column: span 1; }
}
