/* ============================================
   ULTIMATE GKS CHATBOT v4.0 - MODERN STYLING
   ============================================ */

/* Chatbot Container & Toggle */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  
  .chatbot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 
      0 8px 24px rgba(30, 144, 255, 0.4),
      0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: pulse-ring 2s infinite;
  }
  
  .chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
      0 12px 32px rgba(30, 144, 255, 0.5),
      0 6px 12px rgba(0, 0, 0, 0.3);
  }
  
  .chatbot-toggle:hover::before {
    opacity: 1;
  }
  
  .chatbot-toggle:active {
    transform: scale(0.95);
  }
  
  @keyframes pulse-ring {
    0% {
      box-shadow: 
        0 8px 24px rgba(30, 144, 255, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(30, 144, 255, 0.7);
    }
    50% {
      box-shadow: 
        0 8px 24px rgba(30, 144, 255, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 0 0 20px rgba(30, 144, 255, 0);
    }
    100% {
      box-shadow: 
        0 8px 24px rgba(30, 144, 255, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(30, 144, 255, 0);
    }
  }
  
  /* Main Chatbot Window */
  .chatbot {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 650px;
    max-height: calc(100vh - 140px);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.15),
      0 10px 30px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
  }
  
  @keyframes slideInUp {
    from {
      opacity: 0;
      transform: translateY(30px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  /* Chatbot Header */
  .chatbot-header {
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
    position: relative;
    overflow: hidden;
  }
  
  .chatbot-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerShine 3s infinite;
  }
  
  @keyframes headerShine {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30%, -30%); }
  }
  
  .chatbot-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
  }
  
  .chatbot-header h3::before {
    content: '🤖';
    font-size: 24px;
    animation: bounce 2s infinite;
  }
  
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }
  
  .chatbot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
  }
  
  .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
    animation: statusPulse 2s infinite;
  }
  
  @keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
  }
  
  /* Quick Action Buttons */
  .chatbot-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
  
  .quick-action-btn {
    padding: 12px 8px;
    background: white;
    border: 1.5px solid rgba(30, 144, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #1E90FF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
  }
  
  .quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 144, 255, 0.25);
    border-color: #1E90FF;
    color: white;
  }
  
  .quick-action-btn:hover::before {
    opacity: 1;
  }
  
  .quick-action-btn:active {
    transform: translateY(0);
  }
  
  .quick-action-btn i {
    font-size: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
  }
  
  .quick-action-btn:hover i {
    transform: scale(1.2);
  }
  
  .quick-action-btn span {
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
  }
  
  /* Messages Container */
  .chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    scroll-behavior: smooth;
  }
  
  .chatbot-messages::-webkit-scrollbar {
    width: 6px;
  }
  
  .chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
  }
  
  .chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #1E90FF, #4169E1);
    border-radius: 10px;
  }
  
  .chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #4169E1, #1E90FF);
  }
  
  /* Message Bubbles */
  .message {
    margin-bottom: 16px;
    animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }
  
  @keyframes messageSlideIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .message p {
    padding: 14px 18px;
    border-radius: 18px;
    margin: 0;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
  }
  
  /* Bot Message */
  .bot-message {
    align-items: flex-start;
  }
  
  .bot-message p {
    background: white;
    color: #2d3748;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 4px;
  }
  
  .bot-message p::before {
    content: '🤖';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
  }
  
  /* User Message */
  .user-message {
    align-items: flex-end;
  }
  
  .user-message p {
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
  }
  
  /* Typing Indicator */
  .typing-indicator {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
  }
  
  .typing-indicator span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
  }
  
  .typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  @keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
  }
  
  /* Input Area */
  .chatbot-input {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  }
  
  .chatbot-input input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(30, 144, 255, 0.2);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2d3748;
  }
  
  .chatbot-input input:focus {
    border-color: #1E90FF;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.1);
  }
  
  .chatbot-input input::placeholder {
    color: #a0aec0;
  }
  
  .chatbot-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
    position: relative;
    overflow: hidden;
  }
  
  .chatbot-send::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }
  
  .chatbot-send:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 16px rgba(30, 144, 255, 0.4);
  }
  
  .chatbot-send:hover::before {
    width: 200%;
    height: 200%;
  }
  
  .chatbot-send:active {
    transform: scale(0.95);
  }
  
  .chatbot-send i {
    font-size: 18px;
    position: relative;
    z-index: 1;
  }
  
  /* Message Content Styling */
  .message strong {
    color: #1E90FF;
    font-weight: 600;
  }
  
  .message em {
    color: #718096;
    font-style: italic;
  }
  
  .message a {
    color: #1E90FF;
    text-decoration: underline;
    transition: color 0.2s ease;
  }
  
  .message a:hover {
    color: #4169E1;
  }
  
  /* Mobile Responsive */
  @media (max-width: 768px) {
    .chatbot-container {
      bottom: 10px;
      right: 10px;
    }
  
    .chatbot-toggle {
      width: 56px;
      height: 56px;
      font-size: 24px;
    }
  
    .chatbot {
      width: calc(100vw - 20px);
      height: calc(100vh - 120px);
      bottom: 80px;
      right: 10px;
      border-radius: 20px;
    }
  
    .chatbot-header {
      padding: 16px 20px;
    }
  
    .chatbot-header h3 {
      font-size: 18px;
    }
  
    .chatbot-quick-actions {
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      padding: 12px;
    }
  
    .quick-action-btn {
      padding: 10px 6px;
      font-size: 10px;
    }
  
    .quick-action-btn i {
      font-size: 18px;
    }
  
    .message p {
      max-width: 90%;
      font-size: 13px;
      padding: 12px 16px;
    }
  }
  
  @media (max-width: 480px) {
    .chatbot-quick-actions {
      grid-template-columns: repeat(2, 1fr);
    }
  
    .quick-action-btn {
      padding: 12px 10px;
    }
  }
  
  /* Scrollbar for Firefox */
  .chatbot-messages {
    scrollbar-width: thin;
    scrollbar-color: #1E90FF rgba(0, 0, 0, 0.05);
  }
  
  /* Enhanced Animation Effects */
  .message.highlight {
    animation: highlightPulse 1s ease;
  }
  
  @keyframes highlightPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 4px 16px rgba(30, 144, 255, 0.3); }
  }
  
  /* Accessibility */
  .chatbot-toggle:focus,
  .chatbot-send:focus,
  .quick-action-btn:focus,
  .chatbot-input input:focus {
    outline: 2px solid #1E90FF;
    outline-offset: 2px;
  }
  
  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    .chatbot {
      background: linear-gradient(145deg, #1a202c 0%, #2d3748 100%);
    }
  
    .chatbot-messages {
      background: linear-gradient(to bottom, #2d3748 0%, #1a202c 100%);
    }
  
    .bot-message p {
      background: #2d3748;
      color: #e2e8f0;
      border-color: rgba(255, 255, 255, 0.1);
    }
  
    .chatbot-input {
      background: #2d3748;
      border-top-color: rgba(255, 255, 255, 0.1);
    }
  
    .chatbot-input input {
      background: #1a202c;
      color: #e2e8f0;
      border-color: rgba(30, 144, 255, 0.3);
    }
  
    .quick-action-btn {
      background: #2d3748;
      border-color: rgba(30, 144, 255, 0.3);
      color: #60a5fa;
    }
  
    .typing-indicator {
      background: #2d3748;
      border-color: rgba(255, 255, 255, 0.1);
    }
  }
  
  /* Loading Animation */
  @keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
  }
  
  .loading-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
      to right,
      rgba(30, 144, 255, 0.1) 0%,
      rgba(30, 144, 255, 0.3) 50%,
      rgba(30, 144, 255, 0.1) 100%
    );
    background-size: 1000px 100%;
  }
  
  /* Premium Effects */
  .premium-glow {
    box-shadow: 
      0 0 20px rgba(30, 144, 255, 0.3),
      0 0 40px rgba(30, 144, 255, 0.2),
      0 0 60px rgba(30, 144, 255, 0.1);
  }
  
  .glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Smooth transitions for all interactive elements */
  * {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }