body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #0f1535; /* Fallback color for body */
}

.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 40px 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.robot-img {
    width: 160px; /* Further reduced logo size */
    height: 160px; /* Further reduced logo size */
    margin-bottom: 20px;
}

.robot-img img {
    width: 100%;
    animation: ai-float 2.5s ease-in-out infinite alternate;
}

@keyframes ai-float {
    0% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 5px 15px #00c6ff44);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
        filter: drop-shadow(0 20px 25px #00c6ff88);
    }
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 5px 15px #00c6ff44);
    }
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffaf3a;
    text-align: center;
    width: 100%;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 24px;
    color: #e0e0e0;
    text-align: center;
    width: 100%;
}

.card {
    background: rgba(20, 30, 60, 0.8);
    border: 1px solid rgba(62, 234, 255, 0.2);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.result-box {
    background: linear-gradient(135deg, #18213c 60%, #1ec6e6 100%);
    border-radius: 12px;
    padding: 64px 18px;
    max-width: 340px;
    margin: 60px auto;
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.accuracy {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #fff;
}

.accuracy .percent {
    color: #ffaf3a;
    font-weight: bold;
    font-size: 1.3rem;
}

.desc {
    font-size: 1rem;
    color: #b8c6e0;
    margin-bottom: 6px;
}

.desc .highlight {
    color: #ffaf3a;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

.input-group {
    width: 100%;
    margin-bottom: 18px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(62, 234, 255, 0.3);
    background: #141e3a;
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    text-align: center;
}

.btn {
    width: 100%;
    padding: 16px 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
    animation: none; /* Removed default breath animation to avoid conflict */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 198, 255, 0.5);
}

#chat-btn {
    animation: breath 1.6s ease-in-out infinite;
}

@keyframes breath {
    0% {
        box-shadow: 0 2px 12px 0 #15a22333;
        transform: scale(1);
    }

    50% {
        box-shadow: 0 6px 24px 0 #15a22355;
        transform: scale(1.04);
    }

    100% {
        box-shadow: 0 2px 12px 0 #15a22333;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    .robot-img {
        width: 150px;
        height: 150px;
    }
    .title {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 1.1rem;
    }
}

#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    background: #0f1535; /* Video fallback and dark overlay */
    background-size: cover;
    filter: brightness(0.5);
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }