:root {
    --bg: #080c14;
    --card: #111827;
    --primary: #00f5a0;
    --secondary: #00c6ff;
    --text: #f7fbff;
    --muted: #92a1b8;
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ff5573;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: "DM Sans", Arial, sans-serif;
    background-color: var(--bg);
    background:
        radial-gradient(circle at top left, rgba(0, 245, 160, 0.13), transparent 32rem),
        radial-gradient(circle at top right, rgba(0, 198, 255, 0.16), transparent 30rem),
        #080c14;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px clamp(18px, 4vw, 48px);
    border-bottom: 1px solid var(--border);
    background: rgba(8, 12, 20, 0.7);
    backdrop-filter: blur(18px);
}

.brand,
.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand {
    font-family: "Rajdhani", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0;
}

.brand span span {
    color: var(--primary);
}

.brand-mark,
.hero-icon {
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 245, 160, 0.32);
    background: linear-gradient(135deg, rgba(0, 245, 160, 0.16), rgba(0, 198, 255, 0.12));
    box-shadow: 0 0 28px rgba(0, 245, 160, 0.12);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.home-btn {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    transition: 0.2s ease;
}

.home-btn:hover {
    color: var(--text);
    border-color: rgba(0, 198, 255, 0.45);
}

.app-shell {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100% - 32px));
    margin: 0 auto;
    padding: 116px 0 64px;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    margin-bottom: 22px;
    overflow: hidden;
}

.hero-icon img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.hero-icon span {
    display: none;
    color: var(--primary);
    font-size: 2rem;
}

.hero-icon img[src=""],
.hero-icon img:not([src]) {
    display: none;
}

.hero h1,
.tool-card h2,
.modal-card h2 {
    margin: 0;
    font-family: "Rajdhani", sans-serif;
    font-weight: 700;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(2.55rem, 7vw, 5.25rem);
    line-height: 0.92;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p,
.description,
.tool-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero p {
    max-width: 640px;
    margin: 18px 0 0;
    font-size: 1.05rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
    color: #cbd6e7;
    font-size: 0.88rem;
}

.badge.live span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}

.description {
    max-width: 420px;
    margin: 30px auto 28px;
    text-align: center;
}

.flow {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
}

.tool-card,
.modal-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.88);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), 0 0 40px rgba(0, 198, 255, 0.06);
}

.tool-card {
    display: none;
    position: relative;
    padding: clamp(24px, 5vw, 34px);
}

.step-panel {
    width: 100%;
}

.tool-card.active {
    display: block;
}

.step-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #061019;
    font-weight: 800;
}

.tool-card h2 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.input-row {
    display: grid;
    grid-template-columns: 40px 1fr 44px;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    margin: 22px 0 16px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.72);
    transition: 0.2s ease;
}

.input-row:focus-within {
    border-color: rgba(0, 245, 160, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 245, 160, 0.08);
}

.input-row input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.input-icon {
    color: var(--secondary);
    text-align: center;
}

.icon-btn,
.close-modal {
    border: 0;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    transition: 0.2s ease;
}

.icon-btn {
    height: 38px;
    border-radius: 11px;
}

.primary-btn,
.ghost-btn,
.link-btn,
.option-card {
    border: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #061019;
    font-weight: 800;
    box-shadow: 0 12px 32px rgba(0, 198, 255, 0.16);
}

.primary-btn:hover,
.option-card:hover,
.home-btn:hover {
    transform: translateY(-1px);
}

.link-btn {
    display: block;
    margin: 16px auto 0;
    background: transparent;
    color: var(--secondary);
}

.alert {
    display: none;
    margin-bottom: 14px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 85, 115, 0.35);
    border-radius: 12px;
    background: rgba(255, 85, 115, 0.1);
    color: #ffbac7;
}

.animated-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 23px;
    background: rgba(0, 198, 255, 0.09);
    color: var(--primary);
    font-size: 2.3rem;
}

#searchingState,
#foundState,
#step3,
#step4 {
    text-align: center;
}

.search-pulse {
    animation: pulseSearch 1.25s ease-in-out infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

.success-pop {
    animation: pop 0.5s ease both;
}

.user-card,
.profile-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.58);
    text-align: left;
}

.user-card img,
.profile-preview img {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.user-card strong,
.profile-preview strong {
    display: block;
    font-size: 1.05rem;
}

.user-card span,
.profile-preview span,
.user-card small,
.profile-preview small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.confirm-copy {
    margin: 0 0 18px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.option-card {
    min-height: 126px;
    padding: 16px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(8, 12, 20, 0.55);
    color: var(--text);
}

.option-card span,
.option-card strong,
.option-card small {
    display: block;
}

.option-card span {
    color: var(--secondary);
    font-size: 1.55rem;
}

.option-card strong {
    margin-top: 12px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.45rem;
}

.option-card small {
    color: var(--muted);
}

.option-card.selected {
    border-color: rgba(0, 245, 160, 0.62);
    background: linear-gradient(180deg, rgba(0, 245, 160, 0.14), rgba(0, 198, 255, 0.08));
    box-shadow: 0 0 28px rgba(0, 245, 160, 0.1);
}

.progress-track {
    height: 12px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 22px rgba(0, 245, 160, 0.32);
}

.progress-count,
.countdown {
    display: block;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 800;
}

.final-box {
    display: grid;
    gap: 10px;
    margin: 22px 0 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.6);
    text-align: left;
}

.final-box div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.final-box span {
    color: var(--muted);
}

.countdown {
    margin-bottom: 18px;
    font-family: "Rajdhani", sans-serif;
    font-size: 2rem;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    padding: 22px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
}

.modal-card {
    position: relative;
    width: min(420px, 100%);
    margin: 10vh auto 0;
    padding: 28px;
}

.modal-card.wide {
    width: min(760px, 100%);
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.3rem;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ghost-btn {
    min-height: 54px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.howto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.howto-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.5);
}

.howto-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.howto-card h3 {
    margin: 12px 0 6px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.2rem;
}

.howto-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

@keyframes pulseSearch {
    50% {
        transform: scale(1.06) rotate(-8deg);
        box-shadow: 0 0 34px rgba(0, 198, 255, 0.22);
    }
}

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

@keyframes pop {
    from {
        transform: scale(0.72);
        opacity: 0;
    }
}

@media (max-width: 700px) {
    .navbar {
        padding: 14px 16px;
    }

    .brand {
        font-size: 1.15rem;
    }

    .home-btn {
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .app-shell {
        width: min(100% - 24px, 960px);
        padding-top: 100px;
    }

    .option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .howto-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        margin-top: 7vh;
        padding: 24px;
    }
}

@media (max-width: 430px) {
    .home-btn span:last-child {
        display: none;
    }

    .badge-row {
        justify-content: flex-start;
    }

    .modal-actions,
    .final-box div {
        grid-template-columns: 1fr;
    }
}
