/* AI Signal Page Styles */

.aisignal-hero {
    position: relative;
    padding: 6rem 1rem 4rem;
    text-align: center;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 0 0 3rem 3rem;
    background: radial-gradient(circle at top, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0) 70%);
}

.aisignal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(249, 115, 22, 0.1) 50%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.aisignal-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    z-index: 1;
}

.aisignal-hero p {
    font-size: 1.125rem;
    color: #94a3b8;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.ai-analyzer-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.ai-analyzer-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

.ai-input-wrapper {
    position: relative;
    transition: all 0.3s ease;
}

.ai-input-wrapper:focus-within {
    transform: translateY(-2px);
}

.ai-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 1rem;
    padding: 1rem 1rem 1rem 3rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ai-input:focus {
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ai-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8b5cf6;
    transition: all 0.3s ease;
}

.ai-input-wrapper:focus-within .ai-input-icon {
    color: #a78bfa;
}

.btn-magic {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    color: white;
    font-weight: 700;
    border-radius: 1rem;
    padding: 1rem 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-magic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-magic:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px -5px rgba(139, 92, 246, 0.5);
}

.btn-magic:hover::before {
    left: 100%;
}

.btn-magic:active {
    transform: translateY(1px);
}

/* Loading State */
.ai-loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.ai-loading-state.active {
    display: flex;
}

.hex-loader {
    width: 80px;
    height: 80px;
    position: relative;
    animation: rotate 4s linear infinite;
}

.hex-loader svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: url(#hex-gradient);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: dash 2s ease-in-out infinite alternate;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 200;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #a78bfa;
    background: linear-gradient(90deg, #a78bfa, #f472b6, #a78bfa);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 2s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Results State */
.ai-results-state {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ai-results-state.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.result-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.result-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.result-card.long-card {
    border-left: 4px solid #10b981;
}

.result-card.short-card {
    border-left: 4px solid #ef4444;
}

.level-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.level-row:last-child {
    border-bottom: none;
}

.level-label {
    font-size: 0.875rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.level-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.125rem;
}

.confidence-meter {
    height: 6px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation utilities */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}