.ai-challenge-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 85vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.challenge-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.challenge-title h3 {
    margin: 0;
    font-weight: 600;
    color: #1a237e;
}

.challenge-title i {
    color: #5c6bc0;
}

.challenge-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.difficulty-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.difficulty-badge.easy {
    background: #d1fae5;
    color: #047857;
}

.difficulty-badge.medium {
    background: #fef3c7;
    color: #b45309;
}

.difficulty-badge.hard {
    background: #fee2e2;
    color: #b91c1c;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.status-action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 10px 0;
}

.challenge-button {
    background: linear-gradient(135deg, #3730a3, #6366f1);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.challenge-button i {
    font-size: 1.1em;
}

.close-challenge-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
}

.close-challenge-button:hover {
    color: #ef4444;
}

.challenge-chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #f8fafc;
}

.challenge-message {
    display: flex;
    gap: 0.75rem;
    max-width: 90%;
}

.system-notice {
    align-self: center;
    background: #f1f5f9;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin: 0.5rem auto;
    color: #64748b;
    font-style: italic;
    width: fit-content;
    text-align: center;
}

.challenge-message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    color: white;
}

.avatar.assistant {
    background: #5c6bc0;
}

.avatar.user {
    background: #06b6d4;
}

.message-content {
    background: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border-top-left-radius: 0;
    max-width: calc(100% - 3rem);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.challenge-message.user-message .message-content {
    background: #e0f2fe;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    height: 1.5rem;
}

.typing-indicator .dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.3s linear infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

.challenge-input-container {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background-color: white;
}

.challenge-input {
    flex-grow: 1;
    resize: none;
    min-height: 3.5rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s;
}

.challenge-input:focus {
    border-color: #5c6bc0;
    box-shadow: 0 0 0 2px rgba(92, 107, 192, 0.2);
}

.send-challenge-button {
    background: linear-gradient(135deg, #21376e, #793ea5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.send-challenge-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.send-challenge-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.interview-ended-banner {
    background-color: #f0f9ff;
    color: #0369a1;
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #bae6fd;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.interview-ended-banner i {
    color: #0ea5e9;
}

.results-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.challenge-button {
    background: linear-gradient(135deg, #3730a3, #6366f1);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.challenge-button i {
    font-size: 1.1em;
}

.retry-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.retry-button {
    background-color: #e0f2fe;
    color: #0284c7;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-button:hover {
    background-color: #bae6fd;
}

.challenge-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to right, #2563eb, #3b82f6);
  color: white;
  padding: 15px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.3s ease-out;
}

.challenge-notification.visible {
  transform: translateY(0);
}

.notification-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  margin-right: 15px;
  flex-shrink: 0;
}

.notification-text {
  flex-grow: 1;
  font-size: 0.95rem;
  padding: 0 10px;
}

.notification-action {
  background-color: white;
  color: #2563eb;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  margin-left: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.notification-action:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.notification-close {
  background: transparent;
  border: none;
  color: white;
  margin-left: 15px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .notification-content {
    flex-wrap: wrap;
  }
  
  .notification-action {
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }
}

/* AI Challenge Notification Bubble */
.challenge-bubble {
  display: flex;
  background-color: #e0f2fe;
  border-left: 4px solid #0284c7;
  padding: 16px;
  border-radius: 8px;
  margin-top: 24px;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.1);
  animation: fadeIn 0.5s ease-out;
}

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

.challenge-bubble-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #0ea5e9;
  color: white;
  border-radius: 50%;
  margin-right: 16px;
  flex-shrink: 0;
}

.challenge-bubble-icon i {
  font-size: 20px;
  margin-top: 10px;
}

.challenge-bubble-content {
  flex-grow: 1;
}

.challenge-bubble-content p {
  color: #0c4a6e;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.challenge-bubble-button {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.challenge-bubble-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #0284c7, #0369a1);
}