/* ================= GLOBAL ================= */

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #000;
    color: white;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ================= CYBER GRID BACKGROUND ================= */

html, body {
    margin: 0;
    padding: 0;
    background: #000;
}

/* Conteneur grille */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(97, 97, 97, 0.404) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 97, 97, 0.404) 1px, transparent 1px);
    background-size: 60px 60px;
}

#gridCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ================= NAVBAR ================= */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
}

.logo {
    font-weight: bold;
    font-size: 22px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: #aaa;
    transition: 0.3s ease;
}

.nav-links a:hover {
    color: white;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-right a,
#logoutBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 25px;
    border-radius: 15px;

    background: white;
    color: black;

    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;

    transition: all 0.25s ease;
    z-index: 100;
}

.nav-right a:hover,
#logoutBtn:hover {
    background: #38bdf8;
    color: black;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(56,189,248,0.5);
}

.nav-right a:active,
#logoutBtn:active {
    transform: scale(0.95);
}

/* ================= HERO ================= */

.hero {
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 850px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ================= LOGO ================= */

.logo-wrapper {
    position: relative;
    margin-bottom: 50px;
}

.logo-img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    position: relative;
    box-shadow: 0 0 40px rgba(56,189,248,0.6);
    animation: logoPulse 3s infinite ease-in-out;
}

.lightning-ring {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(56,189,248,0.8),
        transparent,
        rgba(255,255,255,0.9),
        transparent
    );
    filter: blur(8px);
    animation: rotateRing 4s linear infinite;
    z-index: 1;
}

/* Animations */

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logoPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* ================= TEXT ================= */

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.hero p {
    color: #aaa;
    margin-bottom: 40px;
}

/* ================= SEARCH ================= */

.search-bar {
    display: flex;
    align-items: center;
    width: 650px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 8px;
    transition: 0.3s ease;
}

.search-bar:hover {
    border: 1px solid rgba(56,189,248,0.5);
    box-shadow: 0 0 25px rgba(56,189,248,0.2);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 15px 20px;
    color: white;
    font-size: 16px;
}

.search-bar button {
    padding: 12px 25px;
    border-radius: 15px;
    border: none;
    background: white;
    color: black;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.search-bar button:hover {
    background: #38bdf8;
    box-shadow: 0 0 20px rgba(56,189,248,0.5);
}

/* ================= SEARCH TYPES ================= */

.search-types {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.search-type-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 9px 18px;
    border-radius: 999px;
    color: #cfcfcf;
    font-size: 14px;
    cursor: pointer;
    transition: 0.25s ease;
}

.search-type-btn:hover {
    background: rgba(56,189,248,0.15);
    border: 1px solid rgba(56,189,248,0.5);
    color: white;
}

.search-type-btn.active {
    background: white;
    color: black;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        circle 250px at var(--x) var(--y),
        rgba(255,255,255,0.15),
        transparent 60%
    );
    transition: background 0.05s linear;
}


button,
.search-type-btn,
.nav-right a {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s ease;
}

button:hover,
.search-type-btn:hover,
.nav-right a:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

button:active {
    transform: scale(0.95);
}



/* ================= RESULTS CONTAINER ================= */

#results {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ================= RESULT CARD ================= */

.result-card {
    background: rgba(35, 35, 35, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 25px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* subtle glow effect */
.result-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(56,189,248,0.08),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-card:hover::before {
    opacity: 1;
}

.result-card:hover {
    transform: translateY(-4px);
    border: 1px solid rgba(56,189,248,0.4);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

/* ================= HEADER ================= */

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.result-header h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #38bdf8;
}

.result-header span {
    font-size: 12px;
    color: #888;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 20px;
}

/* ================= CONTENT ================= */

.result-card p {
    font-size: 14px;
    margin: 8px 0;
    color: #d4d4d4;
    line-height: 1.6;
}

.result-card strong {
    color: #ffffff;
    font-weight: 600;
}


/* ================= RESULTS ANIMATION ================= */

.results-exit {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.results-enter {
    opacity: 1;
    transform: translateY(0);
    animation: resultsFade 0.35s ease;
}

@keyframes resultsFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.copy-field {
    margin: 6px 0;
}

.copy-value {
    cursor: pointer;
    transition: 0.2s;
    word-break: break-all;
    padding: 2px 6px;
    border-radius: 5px;
}

.copy-value:hover {
    background: rgba(255,255,255,0.1);
}

.copy-value.copied {
    color: #00ff88;
}