* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #0a0a0a;
    color: #666;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 400px;
    width: 100%;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.header p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
}

.question-section {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
}

#question {
    flex: 1;
    padding: 12px 16px;
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    color: #999;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

#question:focus {
    border-color: #333;
    color: #ccc;
}

#question::placeholder {
    color: #444;
}

#askCompass {
    padding: 12px 16px;
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    transition: all 0.2s ease;
    min-width: 50px;
}

#askCompass:hover {
    background: #1a1a1a;
    border-color: #333;
    color: #999;
}

.compass-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.compass {
    width: 120px;
    height: 120px;
    border: 1px solid #222;
    border-radius: 50%;
    position: relative;
    background: #0f0f0f;
    transition: all 0.3s ease;
}

.needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #666 0%, #333 100%);
    transform-origin: bottom center;
    transform: translate(-50%, -100%);
    transition: transform 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 1px;
}

.center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.compass.spinning .needle {
    animation: spin 2s ease-out;
}

@keyframes spin {
    0% { transform: translate(-50%, -100%) rotate(0deg); }
    100% { transform: translate(-50%, -100%) rotate(720deg); }
}

.answer {
    font-size: 1.2rem;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: opacity 0.5s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.answer.show {
    opacity: 1 !important;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.loading {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.dot {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* hover effects */
.compass:hover {
    border-color: #333;
    cursor: pointer;
}

/* responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .compass {
        width: 100px;
        height: 100px;
    }
    
    .needle {
        height: 35px;
    }
    
    .answer {
        font-size: 1rem;
        letter-spacing: 0.3px;
    }
}