* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #23264a, #0b0c18);
    color: #f1f1f6;
}

main { text-align: center; padding: 2rem 1rem; }

h1 { margin: 0 0 0.25rem; font-size: 2.5rem; letter-spacing: 0.05em; }

.subtitle { margin: 0 0 1.5rem; color: #b7b9d6; }

form { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }

input {
    width: min(22rem, 70vw);
    padding: 0.7rem 0.9rem;
    border: 1px solid #45487a;
    border-radius: 8px;
    background: #15172e;
    color: inherit;
    font-size: 1rem;
}

button {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #4b5cf0;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

button:hover { background: #3a49d1; }

.ball {
    width: 260px;
    height: 260px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 30%, #555 0%, #111 45%, #000 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.window {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #1b2a6b, #070b24);
}

.triangle {
    width: 110px;
    height: 95px;
    padding: 30px 18px 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    background: #2c46d6;
    transition: opacity 0.4s;
}

.triangle span {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    color: #e8ecff;
}

.triangle.idle { background: transparent; clip-path: none; padding: 0; align-items: center; }
.triangle.idle span { font-size: 3.5rem; color: #111; background: #f5f5f5;
    border-radius: 50%; width: 70px; height: 70px; line-height: 70px; text-transform: none; }

.triangle.hidden { opacity: 0; }

.shaking { animation: shake 0.6s; }

@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    20% { transform: translate(-12px, 4px) rotate(-6deg); }
    40% { transform: translate(10px, -6px) rotate(5deg); }
    60% { transform: translate(-8px, 6px) rotate(-4deg); }
    80% { transform: translate(6px, -4px) rotate(3deg); }
}

.error { color: #ff8a8a; margin-top: 1.25rem; }

footer { padding: 1rem; font-size: 0.85rem; color: #8487ad; }
