/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&display=swap');

:root {
    color-scheme: dark;
    --page: #010510;
    --card: rgba(7, 13, 26, 0.92);
    --surface: rgba(12, 18, 30, 0.85);
    --text: #f8fafc;
    --muted: rgba(248, 250, 252, 0.72);
    --border: rgba(148, 163, 184, 0.24);
    --accent: #4b9dff;
    --accent-glow: rgba(75, 157, 255, 0.35);
    --error: #ef4444;
    
    --radius: 12px;
    font-family: "Lato", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--page);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(75, 157, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.05), transparent 25%);
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    pointer-events: none;
}

.hero-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin: 0 0 16px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    animation: fadeUp 0.8s ease-out forwards;
}

.gradient-text {
    background: linear-gradient(
        90deg,
        #fff,
        var(--accent),
        #fff
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 5s linear infinite;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--muted);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.search-wrapper {
    width: 100%;
    max-width: 600px;
    position: relative;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.4s forwards;
}

.search-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    display: flex;
    gap: 8px;
    box-shadow: 
        0 0 0 1px rgba(0,0,0,0),
        0 10px 40px -10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.search-card:focus-within {
    border-color: var(--accent);
    box-shadow: 
        0 0 0 1px var(--accent),
        0 10px 40px -10px rgba(75, 157, 255, 0.2);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    color: var(--text);
    font-family: inherit;
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: rgba(248, 250, 252, 0.4);
}

.search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.search-btn:hover {
    background: #3a8de6;
    transform: translateY(-1px);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.pro-tip {
    margin-top: 40px;
    background: rgba(12, 18, 30, 0.4);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    font-size: 14px;
    color: var(--muted);
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.6s forwards;
}

.pro-tip strong {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    margin-right: 8px;
}

.url-hack {
    display: block;
    margin-top: 8px;
    font-family: monospace;
    font-size: 13px;
    background: rgba(0,0,0,0.3);
    padding: 8px;
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
}

.highlight {
    color: #4ade80;
    font-weight: bold;
    text-decoration: underline;
}

.url-arrow {
    margin: 0 8px;
    color: var(--accent);
}

.error-msg {
    color: var(--error);
    font-size: 13px;
    margin-top: 10px;
    text-align: left;
    padding-left: 10px;
    display: none;
    font-weight: 600;
    animation: shake 0.4s ease-in-out;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(248, 250, 252, 0.3);
}

@media (max-width: 640px) {
    .search-card {
        flex-direction: column;
        padding: 8px;
    }
    .search-btn {
        width: 100%;
        padding: 12px;
    }
}