/* static/css/home.css */

.robot-link {
    display: flex;
    justify-content: center;
    text-decoration: none;
    margin: 3rem 0 2rem 0;
    position: relative;
    z-index: 2;
}

.robot-image-wrapper {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.robot-image-wrapper img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 5;
    border: 2.5px solid rgba(139, 92, 246, 0.35);
    box-shadow: 0 0 40px rgba(108, 60, 225, 0.25), inset 0 0 20px rgba(139, 92, 246, 0.08);
    transition: all 0.3s ease;
    background: var(--bg-main);
    animation: softScale 2s ease-in-out infinite;
}

@keyframes softScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.wave-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}

.wave-ring-1 {
    width: 120px;
    height: 120px;
    animation: ripple 2s ease-out infinite;
    border: 4px solid rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
}

.wave-ring-2 {
    width: 120px;
    height: 120px;
    animation: ripple 2s ease-out infinite 0.6s;
    border: 3.5px solid rgba(108, 60, 225, 0.65);
    box-shadow: 0 0 25px rgba(108, 60, 225, 0.2);
}

.wave-ring-3 {
    width: 120px;
    height: 120px;
    animation: ripple 2s ease-out infinite 1.2s;
    border: 3px solid rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
}

.wave-ring-4 {
    width: 120px;
    height: 120px;
    animation: ripple 2s ease-out infinite 1.8s;
    border: 2.5px solid rgba(139, 92, 246, 0.35);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

@keyframes ripple {
    0% { width: 120px; height: 120px; opacity: 1; border-width: 4px; }
    100% { width: 250px; height: 250px; opacity: 0; border-width: 1.5px; }
}

.robot-image-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 70%);
    z-index: 0;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}

.robot-image-wrapper .fallback-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    font-size: 3.5rem;
    color: var(--primary-light);
    opacity: 0.3;
    display: none;
    animation: softScale 2s ease-in-out infinite;
}

.robot-image-wrapper img:not([src]), 
.robot-image-wrapper img[src=""],
.robot-image-wrapper img[src*="error"] {
    display: none;
}

.robot-image-wrapper img:not([src]) ~ .fallback-icon,
.robot-image-wrapper img[src=""] ~ .fallback-icon,
.robot-image-wrapper img[src*="error"] ~ .fallback-icon {
    display: block;
}

.robot-link:hover .robot-image-wrapper img {
    transform: scale(1.08);
    box-shadow: 0 0 60px rgba(108, 60, 225, 0.35), 0 0 80px rgba(139, 92, 246, 0.15);
    border-color: rgba(167, 139, 250, 0.6);
}

.robot-link:hover .wave-ring-1 {
    animation-duration: 1.5s;
    border-color: rgba(139, 92, 246, 0.95);
    border-width: 4.5px;
}
.robot-link:hover .wave-ring-2 {
    animation-duration: 1.5s;
    animation-delay: 0.4s;
    border-color: rgba(108, 60, 225, 0.85);
    border-width: 4px;
}
.robot-link:hover .wave-ring-3 {
    animation-duration: 1.5s;
    animation-delay: 0.8s;
    border-color: rgba(167, 139, 250, 0.7);
    border-width: 3.5px;
}
.robot-link:hover .wave-ring-4 {
    animation-duration: 1.5s;
    animation-delay: 1.2s;
    border-color: rgba(139, 92, 246, 0.5);
    border-width: 3px;
}

.robot-link:hover .robot-image-wrapper::before {
    animation-duration: 1.5s;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent 70%);
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    animation-delay: 0.2s;
    text-align: center;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.hero-content .tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.06);
    padding: 0.2rem 1.2rem;
    border-radius: 50px;
    font-size: 0.65rem;
    color: var(--primary-light);
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
}

.hero-content h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--accent), var(--gold));
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientMove 6s ease-in-out infinite;
}

.hero-content .sub-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 100%;
    animation: fadeInText 1s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

@keyframes fadeInText {
    to { opacity: 1; }
}

.hero-content .sub-text .highlight {
    color: var(--primary-light);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .hero-stats {
    border-top-color: rgba(0, 0, 0, 0.05);
}

.hero-stats .stat-item {
    text-align: center;
    animation: statFade 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-stats .stat-item:nth-child(1) { animation-delay: 0.6s; }
.hero-stats .stat-item:nth-child(2) { animation-delay: 0.7s; }
.hero-stats .stat-item:nth-child(3) { animation-delay: 0.8s; }
.hero-stats .stat-item:nth-child(4) { animation-delay: 0.9s; }

@keyframes statFade {
    to { opacity: 1; transform: translateY(0); }
}

.hero-stats .stat-item .number {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), var(--gold));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: block;
}

.hero-stats .stat-item .number.live {
    animation: numberPulse 2s infinite alternate;
}

@keyframes numberPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.hero-stats .stat-item .label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    font-weight: 500;
}