/* --- START OF FILE styles.css --- */

/* --- Base & Layout Styles --- */
*, *:before, *:after { padding: 0; margin: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-padding-top: 85px; /* Adjust if navbar height changes */ scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  padding-top: 75px; /* Adjust if navbar height changes */
  color: #2d3748; /* Default text color */
  background-color: #f9fafb; /* Default background */
  visibility: hidden; /* Hide body until auth check is complete */
  line-height: 1.6; /* Default line height */
}
body.auth-checked { visibility: visible; } /* Show body after auth check */

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

/* Accessibility Helper */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- START: Modern Navbar Styles --- */
.navbar { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: fixed; top: 0; left: 0; width: 100%; height: 75px; padding: 0 2.5rem; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05); z-index: 999; transition: background-color 0.3s ease, box-shadow 0.3s ease; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.nav-logo a { display: block; }
.nav-logo svg { width: clamp(130px, 25vw, 190px); height: auto; display: block; }
.nav-links { display: flex; align-items: center; list-style: none; gap: 1.8rem; /* Slightly reduced gap */ padding-left: 0; margin: 0; } /* Ensure no default padding/margin */
.nav-links li { margin: 0; padding: 0; } /* Reset li margin/padding */
.nav-links li a, .nav-links li button.nav-credits-btn { /* Apply to both links and credit button */
    display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #374151; font-weight: 500; font-size: 0.95rem; /* Unified font size */ padding: 0.5rem 0.2rem; position: relative; transition: color 0.2s ease; background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-links li a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background-color: #1abc9c; transition: width 0.3s ease-in-out; border-radius: 1px; }
.nav-links li a:hover, .nav-links li a:focus,
.nav-links li button.nav-credits-btn:hover, .nav-links li button.nav-credits-btn:focus { color: #1abc9c; }
.nav-links li a:hover::after, .nav-links li a:focus::after { width: 100%; }
.nav-links li a svg, .nav-links li button.nav-credits-btn svg { width: 1.2rem; height: 1.2rem; stroke-width: 1.8; color: #6b7280; transition: color 0.2s ease; margin-bottom: -2px; flex-shrink: 0; /* Prevent icon shrinking */ }
.nav-links li a:hover svg, .nav-links li a:focus svg,
.nav-links li button.nav-credits-btn:hover svg, .nav-links li button.nav-credits-btn:focus svg { color: #1abc9c; }

/* Hide profile link by default */
.nav-profile-item { display: none; }
.nav-profile-item.visible { display: list-item; } /* Show when logged in */

/* Hide KB link by default */
.nav-kb-item { display: none; }
.nav-kb-item.visible { display: list-item; } /* Show when logged in */

/* Hide Dashboard link by default */
.nav-dashboard-item { display: none; }
.nav-dashboard-item.visible { display: list-item; } /* Show when logged in */

/* Hide Call History link by default */
.nav-call-history-item { display: none; }
.nav-call-history-item.visible { display: list-item; } /* Show when logged in */

/* Hide Credits link by default */
.nav-credits-item { display: none; }
.nav-credits-item.visible { display: list-item; }
.nav-credits-btn { /* Specific styling for credit button if needed, inherits from general link style */
    padding: 0.5rem 0.8rem !important; /* More padding for button-like feel */
    background-color: rgba(26, 188, 156, 0.08) !important;
    border-radius: 6px !important;
    color: #16a085 !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-credits-btn:hover, .nav-credits-btn:focus {
    background-color: rgba(26, 188, 156, 0.15) !important;
    color: #148f77 !important;
    transform: translateY(-1px);
}
.nav-credits-btn svg { color: #16a085 !important; }
#nav-credits-balance { font-weight: 600; }


.nav-auth-item { margin-left: 0.8rem; } /* Combined Login/Logout/Signup Item */
.nav-auth-btn { background-color: #1abc9c; color: #ffffff; padding: 0.7rem 1.5rem; border: none; border-radius: 999px; font-weight: 500; font-size: 0.95rem; cursor: pointer; display: inline-flex; /* Use inline-flex */ align-items: center; gap: 0.6rem; transition: all 0.25s ease; box-shadow: 0 4px 10px rgba(26, 188, 156, 0.15); text-decoration: none; white-space: nowrap; /* Prevent text wrapping */ }
.nav-auth-btn:hover, .nav-auth-btn:focus { background-color: #16a085; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(26, 188, 156, 0.25); color: #ffffff; }
.nav-auth-btn svg { width: 1.1rem; height: 1.1rem; stroke-width: 2; flex-shrink: 0; }
.hamburger { display: none; cursor: pointer; background: none; border: none; padding: 0.5rem; margin-right: -0.5rem; z-index: 1001; }
.hamburger .bar { display: block; width: 28px; height: 3px; margin: 6px auto; transition: all 0.3s ease-in-out; background-color: #1f2937; border-radius: 2px; }
@media (max-width: 992px) {
    .navbar { padding: 0 1.5rem; height: 70px; }
    body { padding-top: 70px; }
    html { scroll-padding-top: 75px; } /* Keep slightly larger for smooth scroll */
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; transform: translateX(-10px); }
    .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .nav-links { position: fixed; left: -100%; top: 70px; flex-direction: column; background-color: rgba(255, 255, 255, 1); backdrop-filter: none; width: 100%; height: calc(100vh - 70px); text-align: center; transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1); gap: 0; padding: 2rem 0; align-items: center; overflow-y: auto; box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.04); z-index: 1000; }
    .nav-links.active { left: 0; }
    .nav-links li { width: 100%; text-align: center; margin-bottom: 0.5rem; }
    .nav-links li:last-child { margin-bottom: 0; } /* Adjusted for auth button being last */
    .nav-links li a, .nav-links li button.nav-credits-btn { font-size: 1.1rem; justify-content: center; padding: 1rem 1.5rem; width: 100%; color: #1f2937; border-radius: 8px; transition: background-color 0.2s ease, color 0.2s ease; text-decoration: none; }
    .nav-links li a:hover, .nav-links li a:focus,
    .nav-links li button.nav-credits-btn:hover, .nav-links li button.nav-credits-btn:focus { background-color: #eef2f3; color: #1abc9c; }
    .nav-links li a::after { display: none; }
    .nav-links li a svg, .nav-links li button.nav-credits-btn svg { color: #6b7280; }
    .nav-links li a:hover svg, .nav-links li a:focus svg,
    .nav-links li button.nav-credits-btn:hover svg, .nav-links li button.nav-credits-btn:focus svg { color: #1abc9c; }
    li.nav-auth-item { order: 10; /* Ensure it comes last in mobile */ margin-left: 0; padding: 1.5rem 10% 0; margin-top: 1rem; width: 100%; }
    li.nav-auth-item .nav-auth-btn { margin-top: 0; padding: 0.8rem 1.5rem; font-size: 1.1rem; width: 100%; max-width: 320px; justify-content: center; margin-left: auto; margin-right: auto; }
    
    /* Mobile Nav Link Order */
    li.nav-links > li:has(a[href="blog.html"]) { order: 3; }
    li.nav-kb-item { order: 4; }
    li.nav-dashboard-item { order: 5; } /* New dashboard link order */
    li.nav-call-history-item { order: 6; } 
    li.nav-profile-item { order: 7; } 
    li.nav-credits-item { order: 8; width: 100%; padding: 0.5rem 10%; }
    li.nav-credits-item .nav-credits-btn { width: 100%; max-width: 320px; justify-content: center; margin-left: auto; margin-right: auto;}
}
/* --- END: Modern Navbar Styles --- */

/* Ensure navbar icons are always visible */
.nav-links li a svg, 
.nav-links li button.nav-credits-btn svg {
    display: block !important;
}

/* --- START: Chat Orb & Window Styles --- */
.chat-orb { position: fixed; bottom: 1.5rem; right: 1.5rem; width: clamp(55px, min(10vw, 8vh), 70px); height: clamp(55px, min(10vw, 8vh), 70px); background: linear-gradient(135deg, #1abc9c, #16a085); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); z-index: 1010; transition: transform 0.3s ease, box-shadow 0.3s ease, width 0.2s ease, height 0.2s ease; }
.chat-orb:hover { transform: scale(1.1); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
.chat-orb svg { width: 60%; height: 60%; display: block; filter: drop-shadow(0px 1px 6px rgba(0, 0, 0, 0.3)); }
.chat-window { position: fixed; bottom: calc(clamp(55px, min(10vw, 8vh), 70px) + 1rem); right: 0.5rem; background-color: #ffffff; border-radius: 1rem; box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, .3), 0 0.0625rem 0.125rem rgba(0, 0, 0, .2); z-index: 1020; display: flex; flex-direction: column; resize: none; overflow: visible; /* Allow shadow */ width: clamp(280px, 85vw, 400px); height: clamp(350px, 70vh, 550px); opacity: 0; transform: translateY(20px) scale(0.95); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease, width 0.4s ease, height 0.4s ease, top 0.4s ease, left 0.4s ease, bottom 0.4s ease, right 0.4s ease, border-radius 0.4s ease; }
.chat-window::before { /* Optional: Chat tail */ content: ''; position: absolute; width: 0; height: 0; top: 100%; right: 2.5rem; border: 0.75rem solid transparent; border-bottom: none; border-top-color: #fff; filter: drop-shadow(0 0.0625rem 0.0625rem rgba(0, 0, 0, .1)); z-index: -1; transition: opacity 0.3s ease, right 0.4s ease; }
.chat-window.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.chat-window.fullscreen { width: 100%; height: 100%; max-width: 100%; max-height: 100%; top: 0; left: 0; right: 0; bottom: 0; border-radius: 0; overflow: hidden; z-index: 1050; }
.chat-window.fullscreen::before { opacity: 0; }
.chat-window.fullscreen .chat-header, .chat-window.fullscreen .chat-input-area { border-radius: 0; }
.chat-header { background-color: transparent; color: #333; padding: 0.75rem 1rem; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; cursor: grab; border-bottom: 1px solid #e0e0e0; border-top-left-radius: 1rem; border-top-right-radius: 1rem; transition: border-radius 0.4s ease; }
.chat-header:active { cursor: grabbing; }
.chat-title { font-weight: 600; font-size: 1rem; color: #1abc9c; }
.chat-header-buttons { display: flex; align-items: center; gap: 0.3rem; }
.chat-header-buttons button { background: none; border: none; color: #aaa; font-weight: bold; line-height: 1; cursor: pointer; opacity: 0.8; transition: opacity 0.2s ease, color 0.2s ease; padding: 0 0.3rem; display: flex; align-items: center; justify-content: center; }
.chat-header-buttons button:hover { opacity: 1; color: #777; }
.chat-header-buttons button svg { width: 1.1rem; height: 1.1rem; }
.chat-close { font-size: 1.5rem; }
.chat-body { flex-grow: 1; padding: 1rem; overflow-y: auto; background-color: transparent; font-size: 0.9rem; line-height: 1.5; display: flex; flex-direction: column; min-height: 100px; }
.message { padding: 0.5rem 0.75rem; border-radius: 15px; margin-bottom: 0.6rem; max-width: 80%; word-wrap: break-word; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.message.received { background-color: #e9e9eb; color: #333; border-bottom-left-radius: 3px; align-self: flex-start; margin-right: auto; }
.message.sent { background-color: #1abc9c; color: white; border-bottom-right-radius: 3px; align-self: flex-end; margin-left: auto; }
.chat-input-area { display: flex; padding: 0.6rem 1rem; border-top: 1px solid #e0e0e0; background-color: transparent; flex-shrink: 0; border-bottom-left-radius: 1rem; border-bottom-right-radius: 1rem; align-items: center; gap: 0.5rem; transition: border-radius 0.4s ease; }
.chat-input { flex-grow: 1; border: 1px solid #ccc; border-radius: 20px; padding: 0.5rem 1rem; font-size: 0.9rem; font-family: inherit; outline: none; transition: border-color 0.2s ease; color: #333; background-color: #fff; resize: none; min-height: 2.4rem; line-height: 1.4; height: auto; max-height: 100px; /* Limit growth */ overflow-y: auto; }
.chat-input:focus { border-color: #1abc9c; }
.chat-mic, .chat-send { border: none; border-radius: 50%; padding: 0; width: 2.4rem; height: 2.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.3s ease, opacity 0.3s ease, cursor 0.3s ease; }
.chat-mic svg, .chat-send svg { width: 1.25rem; height: 1.25rem; display: block; }
.chat-mic { background-color: transparent; color: #1abc9c; box-shadow: none; }
.chat-mic:hover:not(:disabled) { background-color: rgba(26, 188, 156, 0.1); color: #16a085; box-shadow: 0 0 8px rgba(26, 188, 156, 0.4); }
.chat-mic:disabled { opacity: 0.5; cursor: not-allowed; background-color: transparent !important; box-shadow: none !important; }
.chat-mic svg path { fill: currentColor; transition: fill 0.2s ease; }
.chat-mic svg path[d*="M200.4"] { fill: currentColor; } /* Path for outer area */
.chat-mic svg path[d*="M128,176"] { fill: none; stroke: currentColor; } /* Path for mic shape */
.chat-send { background-color: #1abc9c; color: white; }
.chat-send:hover { background-color: #16a085; }
.chat-send svg { stroke: currentColor; stroke-width: 2.5; fill: none; }
/* --- END: Chat Orb & Window Styles --- */

/* --- START: Audio Orb Styles --- */
#audio-orb-container { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: auto; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s ease, visibility 0s linear 0.4s; border-radius: 15px 15px 0 0; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
#audio-orb-container.active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s ease, visibility 0s linear 0s; }
#audio-orb-container .ring-container { position: relative; width: 200px; height: 200px; display: flex; justify-content: center; align-items: center; border-radius: 50%; overflow: visible; }
#audio-orb-container .ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 3px solid transparent; border-top-color: rgba(100, 210, 100, 0.8); border-right-color: rgba(100, 210, 100, 0.5); border-bottom-color: rgba(100, 210, 100, 0.3); border-left-color: rgba(100, 210, 100, 0.5); filter: drop-shadow(0 0 8px rgba(100, 210, 100, 0.3)); animation: rotate 8s linear infinite; transform-origin: center; box-sizing: border-box; z-index: 2; pointer-events: none; }
@keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#audio-orb-container .wave { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(100, 210, 100, 1); border-radius: 50%; z-index: 1; overflow: hidden; }
#audio-orb-container .wave:before, #audio-orb-container .wave:after { content: ''; position: absolute; top: 0; left: 50%; width: 200%; height: 200%; transform-origin: center center; transform: translate(-50%, -75%); }
#audio-orb-container .wave:before { border-radius: 45%; background: rgba(255, 255, 255, 1); animation: animate 5s linear infinite; }
#audio-orb-container .wave:after { border-radius: 40%; background: rgba(255, 255, 255, 0.5); animation: animate 10s linear infinite; }
@keyframes animate { 0% { transform: translate(-50%, -75%) rotate(0deg); } 100% { transform: translate(-50%, -75%) rotate(360deg); } }
#audio-orb-container .pulse-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(100, 210, 100, 0.2); transform: scale(1); opacity: 0; pointer-events: none; z-index: 5; box-sizing: border-box; animation: gentlePulse 1.3s ease-out forwards; }
@keyframes gentlePulse { 0% { transform: scale(1); opacity: 0.5; } 50% { opacity: 0.2; } 100% { transform: scale(1.3); opacity: 0; } }
#audio-orb-container .controls { position: relative; margin-top: 15px; background: rgba(255, 255, 255, 0.9); padding: 10px 20px; border-radius: 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; backdrop-filter: blur(5px); border: 1px solid rgba(200, 200, 200, 0.3); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); }
#audio-orb-container button { background: white; color: #333; border: 1px solid rgba(100, 210, 100, 0.5); padding: 8px 18px; border-radius: 20px; cursor: pointer; font-weight: 500; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); font-size: 0.9rem; }
#audio-orb-container button:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); border-color: rgba(100, 210, 100, 0.8); }
#audio-orb-container button:active { transform: translateY(0); }
#audio-orb-container .status { color: #666; font-size: 12px; text-align: center; margin-top: 4px; }
/* --- END: Audio Orb Styles --- */

/* Primary CTA Button Style (reusable) */
.cta-button-primary {
  display: inline-flex; /* Use flex for icon alignment */
  align-items: center; /* Vertically center icon and text */
  justify-content: center; /* Center content horizontally */
  gap: 0.6em; /* Space between icon and text */
  background: linear-gradient(95deg, #1edcbe 0%, #1abc9c 50%, #16a085 100%);
  background-size: 200% auto;
  color: #ffffff;
  padding: 0.9rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 999px; /* Pill shape */
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: none;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(26, 188, 156, 0.2);
  line-height: 1.3; /* Adjust line height if needed */
}
.cta-button-primary:hover:not(:disabled), .cta-button-primary:focus:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(26, 188, 156, 0.3), 0 0 15px 2px rgba(26, 188, 156, 0.3); /* Added Glow */
  background-position: right center;
  filter: brightness(1.05);
  color: #fff; /* Ensure text color remains */
}
.cta-button-primary:disabled {
  background: #bdc3c7; cursor: not-allowed; transform: none; box-shadow: none; opacity: 0.7;
}
.cta-button-primary .feather {
  width: 1.2em; /* Size relative to font size */
  height: 1.2em;
  stroke-width: 2;
}


/* Footer Styles (if shared) */
footer {
    padding: 2.5rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(249, 250, 251, 0.8);
    position: relative;
    z-index: 1;
    margin-top: auto; /* Push footer down if content is short */
}
footer a { color: #4a5568; text-decoration: none; margin: 0 0.5rem; transition: color 0.2s ease; }
footer a:hover { color: #1abc9c; }

/* --- START: Toast Notification Styles --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none; /* Allow clicking through the container */
}

.toast {
    background-color: rgba(50, 50, 50, 0.9);
    color: #fff;
    padding: 12px 20px 12px 15px; /* More padding on right for close button */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
    pointer-events: auto; /* Enable pointer events for individual toasts */
    min-width: 250px;
    max-width: 350px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    overflow: hidden; /* Hide overflowing content */
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    flex-shrink: 0;
    display: flex; /* Center the icon */
    align-items: center;
}

.toast-icon .feather {
    stroke-width: 2;
    width: 1.3em;
    height: 1.3em;
    vertical-align: middle;
}

.toast-message {
    flex-grow: 1;
    word-wrap: break-word; /* Wrap long messages */
}

.toast-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 10px; /* Space from message */
    opacity: 0.8;
    transition: opacity 0.2s ease, color 0.2s ease;
    align-self: flex-start; /* Align to top */
    margin-top: -2px; /* Fine-tune vertical alignment */
}

.toast-close-btn:hover {
    opacity: 1;
    color: #fff;
}

/* Type-specific styles */
.toast-success { background-color: rgba(39, 174, 96, 0.9); } /* #27ae60 */
.toast-success .toast-icon { color: #d4edda; }

.toast-error { background-color: rgba(192, 57, 43, 0.9); } /* #c0392b */
.toast-error .toast-icon { color: #f8d7da; }

.toast-warning { background-color: rgba(243, 156, 18, 0.9); } /* #f39c12 */
.toast-warning .toast-icon { color: #fff3cd; }

.toast-info { background-color: rgba(41, 128, 185, 0.9); } /* #2980b9 */
.toast-info .toast-icon { color: #d1ecf1; }

@media (max-width: 600px) {
    #toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        align-items: center; /* Center toasts on small screens */
    }
    .toast {
        width: calc(100% - 20px); /* Full width minus padding */
        max-width: none;
    }
}
/* --- END: Toast Notification Styles --- */
/* --- START: Social Login Button Styles (Add this to styles.css) --- */
.social-logins {
    margin-top: 0; /* Adjusted from .social */
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.social-btn { /* Style for the new <button> elements */
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: background-color 0.2s, box-shadow 0.2s, opacity 0.2s; /* Added opacity */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(209, 213, 219, 0.8); /* Use slightly more visible border */
    flex-grow: 1;
    flex-basis: 120px;
    text-align: center;
}
.social-btn:hover:not(:disabled) {
    background-color: rgba(243, 244, 246, 0.9); /* Light hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}
.social-btn:disabled {
    background-color: rgba(230, 230, 230, 0.7);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6; /* Make disabled state clearer */
}
.social-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
/* --- END: Social Login Button Styles --- */

/* --- START: Creatively Redesigned Payment Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: transparent; /* Changed to transparent */
    z-index: 1040;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0.4s;
    /* Removed background pattern to keep it transparent */
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 15px 35px rgba(50, 50, 93, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.07),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
}

/* Creative diagonal accent instead of standard border */
.modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: 
        linear-gradient(135deg, #00b248 0%, #00b248 50%, transparent 50.1%, transparent 100%);
    opacity: 0.1;
    z-index: 0;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1.25rem;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #003720;
    margin: 0;
    letter-spacing: -0.02em;
    position: relative;
}

.modal-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 2.5rem;
    height: 0.25rem;
    background: linear-gradient(90deg, #00b248, rgba(0, 178, 72, 0.5));
    border-radius: 1rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #003720;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Creative close button styles */
.modal-close-btn::before,
.modal-close-btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: #003720;
    transition: all 0.3s ease;
}

.modal-close-btn::before {
    transform: rotate(45deg);
}

.modal-close-btn::after {
    transform: rotate(-45deg);
}

.modal-close-btn:hover::before,
.modal-close-btn:hover::after {
    background-color: #00b248;
}

.modal-close-btn:hover {
    transform: rotate(90deg);
}

.modal-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 178, 72, 0.3);
}

.modal-body {
    padding: 0.5rem 2rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: relative;
    z-index: 1;
}

.modal-body p {
    margin: 0;
    font-size: 1rem;
    color: #4d6b5c;
    line-height: 1.6;
}

.amount-section {
    position: relative;
    padding-bottom: 0.5rem;
}

.modal-body label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #003720;
    margin-bottom: 0.75rem;
    position: relative;
}

/* Creative animated label */
.modal-body label.animated {
    overflow: hidden;
}

.modal-body label.animated::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00b248, transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.modal-body input[type="number"] {
    width: 100%;
    padding: 1rem 1rem;
    font-size: 1.125rem;
    border: 2px solid #eaefed;
    border-radius: 14px;
    background-color: #ffffff;
    color: #003720;
    transition: all 0.3s ease;
    appearance: textfield;
    -moz-appearance: textfield;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-body input[type="number"]::-webkit-outer-spin-button,
.modal-body input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-body input[type="number"]:focus {
    border-color: #00b248;
    box-shadow: 0 0 0 3px rgba(0, 178, 72, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0);
    outline: none;
}

.modal-body input[type="number"].error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1);
}

.input-group-addon {
    padding: 1rem 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #003720;
    background-color: #f1f8f5;
    border: 2px solid #eaefed;
    border-right: none;
    border-radius: 14px 0 0 14px;
    display: flex;
    align-items: center;
}

.input-with-addon {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-with-addon input[type="number"] {
    border-radius: 0 14px 14px 0;
    flex-grow: 1;
    border-left: none;
}

#amount-hint {
    font-size: 0.8rem;
    color: #4d6b5c;
    margin-top: 0.75rem;
    display: block;
    font-weight: normal;
}

.input-error-message {
    color: #f44336;
    font-size: 0.8rem;
    margin-top: 0.75rem;
    display: none;
}

.input-error-message.visible {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.paypal-form-container {
    display: none;
}

/* --- Enhanced Footer and Button Styles --- */
.modal-footer {
    padding: 2rem;
    text-align: center;
    background-color: #f7faf9;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Creative diagonal pattern in footer */
.modal-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 1px;
    background-image: repeating-linear-gradient(
        -45deg,
        #00b248,
        #00b248 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.4;
}

/* PayPal Button with improved readability - NOW YELLOW */
.paypal-checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    background: #ffc43a; /* PayPal Yellow */
    color: #003087; /* PayPal Dark Blue for text */
    padding: 0.9em 2em;
    font-size: 1.1rem;
    font-weight: 700; 
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1), /* Neutral shadow */
        0 1px 3px rgba(0, 0, 0, 0.08);
    line-height: 1.4;
    width: 100%;
    text-decoration: none;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.paypal-checkout-btn::after { /* Subtle shine effect on button */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Creative pulse animation for the button - kept for interaction */
.paypal-checkout-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    padding-bottom: 120%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255, 255, 255, 0.15); /* Adjusted for yellow background */
    z-index: 0;
}

.paypal-checkout-btn:hover::before {
    animation: pulse 1.5s ease-out;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.paypal-checkout-btn > span {
    color: #003087; /* Ensure PayPal Dark Blue for text */
    font-weight: 700; 
    position: relative;
    z-index: 2;
    letter-spacing: 0.02em; 
    text-shadow: none; /* Removed text shadow, should be readable on yellow */
}

.paypal-checkout-btn .paypal-logo-svg {
    height: 1.4em;
    width: auto;
    vertical-align: middle;
    position: relative;
    z-index: 2;
    filter: none; /* Removed previous filters, logo should be clear on yellow */
}

.paypal-checkout-btn:hover {
    transform: translateY(-2px);
    background: #ffb719; /* Darker PayPal yellow on hover */
    box-shadow: 
        0 7px 14px rgba(0, 0, 0, 0.12), /* Enhanced neutral shadow */
        0 3px 6px rgba(0, 0, 0, 0.1);
}

.paypal-checkout-btn:hover::after {
    opacity: 1;
}

.paypal-checkout-btn:active {
    transform: translateY(1px);
    background: #e0a318; /* Even darker yellow for active state */
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.1), /* Softer neutral shadow */
        0 1px 2px rgba(0, 0, 0, 0.08);
}

.paypal-checkout-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(255, 196, 58, 0.5), /* Yellow focus ring */
        0 4px 6px rgba(0, 0, 0, 0.1), 
        0 1px 3px rgba(0, 0, 0, 0.08);
}

.paypal-checkout-btn:disabled {
    background: #e0e0e0; /* Standard disabled style */
    color: #a0a0a0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Loading state with creative spinner */
.paypal-checkout-btn.loading {
    position: relative;
    color: transparent !important; /* Hide text and logo */
}
.paypal-checkout-btn.loading .paypal-logo-svg,
.paypal-checkout-btn.loading > span {
    visibility: hidden; /* Hide children explicitly */
}


.paypal-checkout-btn.loading::before { /* Re-using ::before for spinner, ensure it's on top */
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(0, 48, 135, 0.3); /* PayPal Blue, 30% opacity */
    border-radius: 50%;
    border-top-color: #003087; /* PayPal Blue, solid */
    animation: spinner 0.8s linear infinite;
    z-index: 10; /* Make sure spinner is above other ::before content */
    background: transparent; /* Ensure no interference from pulse animation background */
    padding-bottom: 0; /* Override pulse animation padding */
    transform: translate(-50%, -50%); /* Override pulse animation transform */
}


@keyframes spinner {
    to { transform: translate(-50%, -50%) rotate(360deg); } /* Adjusted for consistent centering with translate */
}

/* Enhanced Accepted Cards Container with creative design */
.accepted-cards-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    /* flex-wrap: wrap; */ /* Removed to ensure logos stay in one line by default */
    position: relative;
}

/* Creative separator */
.accepted-cards-container::before {
    content: "secure payment via";
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: #f7faf9;
    padding: 0 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8aa89c;
}

/* Payment card logos wrapper */
.payment-logos-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    /* flex-wrap: wrap; */ /* MODIFIED: Removed to keep logos in one row */
    flex-wrap: nowrap; /* MODIFIED: Added to explicitly keep logos in one row */
    gap: 1.25em;
    position: relative;
    padding: 0.5rem;
    border-radius: 12px;
    background: linear-gradient(to right, rgba(0, 178, 72, 0.03), rgba(0, 178, 72, 0.01), rgba(0, 178, 72, 0.03));
    /* MODIFIED: Added responsive font-size for scaling logos and gaps */
    font-size: clamp(7px, 2.5vw, 12px); 
}

/* Common styling for payment logo SVGs - preserving original sizes */
.payment-logo-svg {
    max-height: 100%;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    filter: grayscale(20%);
    opacity: 0.85;
}

.payment-logo-svg:hover {
    transform: translateY(-3px) rotate(1deg);
    filter: grayscale(0%);
    opacity: 1;
}

/* Specific adjustments for individual logos - preserving original sizing */
.payment-logo-svg[aria-label="Visa"] {
    width: 4.5em;
}

.payment-logo-svg[aria-label="Mastercard"] {
    width: 4.0em;
}

.payment-logo-svg[aria-label="American Express"] {
    height: 4.025em;
    width: auto;
}

.payment-logo-svg[aria-label="Discover"] {
    height: 4.025em;
    width: auto;
}

/* Hide the white background rectangle in the Discover SVG */
.payment-logo-svg[aria-label="Discover"] > rect[fill="white"],
.payment-logo-svg[aria-label="Discover"] > rect[stroke="#F3F3F3"] {
    display: none !important;
}

/* --- Mobile Responsiveness with creative adaptations --- */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-body {
        padding: 0.5rem 1.5rem 1.5rem;
        gap: 1.5rem;
    }
    
    .modal-footer {
        padding: 1.5rem;
    }
    
    .payment-logos-wrapper {
        /* flex-wrap: wrap; */ /* MODIFIED: Removed to keep logos in one row */
        /* The nowrap from the base rule will apply, or you can re-state flex-wrap: nowrap; if desired */
        gap: 0.75em; /* This gap will scale with the responsive font-size */
    }
    
    /* Float labels for mobile */
    .input-with-label {
        position: relative;
    }
    
    .float-label {
        position: absolute;
        top: 1rem;
        left: 3.5rem;
        color: #8aa89c;
        transition: all 0.2s ease;
        pointer-events: none;
        font-size: 1.125rem;
    }
    
    .input-with-addon input[type="number"]:focus + .float-label,
    .input-with-addon input[type="number"]:not(:placeholder-shown) + .float-label {
        top: -0.5rem;
        left: 3.5rem;
        font-size: 0.75rem;
        color: #00b248;
        background-color: #fff;
        padding: 0 0.5rem;
    }
}

/* --- Added Dark Mode Support with creative elements --- */
@media (prefers-color-scheme: dark) {
    .modal-overlay {
        background-color: transparent; /* Changed to transparent */
        /* Removed background pattern to keep it transparent */
    }
    
    .modal-content {
        background-color: #1a2721;
        box-shadow: 
            0 15px 35px rgba(0, 0, 0, 0.3),
            0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .modal-content::before {
        opacity: 0.2;
    }
    
    .modal-title {
        color: #e0f2e9;
    }
    
    .modal-title::after {
        background: linear-gradient(90deg, #00c853, rgba(0, 200, 83, 0.3));
    }
    
    .modal-close-btn::before,
    .modal-close-btn::after {
        background-color: #e0f2e9;
    }
    
    .modal-body p {
        color: #a5c2b7;
    }
    
    .modal-body label {
        color: #c5e0d6;
    }
    
    .modal-body input[type="number"] {
        background-color: #243530;
        border-color: #2d413b;
        color: #e0f2e9;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .modal-body input[type="number"]:focus {
        border-color: #00c853;
        box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0);
    }
    
    .input-group-addon {
        background-color: #1f2e29;
        border-color: #2d413b;
        color: #c5e0d6;
    }
    
    #amount-hint {
        color: #8aa89c;
    }
    
    .modal-footer {
        background-color: #1d2d27;
    }
    
    .modal-footer::before {
        opacity: 0.2;
    }

    /* PayPal button in dark mode - maintain yellow for consistency with light mode if desired, or adapt */
    /* For this example, keeping it yellow but you might want to adjust for dark themes */
    .paypal-checkout-btn {
        /* If you want a different look for the yellow button in dark mode, adjust here. */
        /* For instance, slightly desaturate yellow or use a darker shade of blue text */
         /* color: #1c75bc; */ /* Example: A slightly lighter blue for dark mode text */
    }

    .paypal-checkout-btn:focus {
        box-shadow: 
            0 0 0 3px rgba(255, 196, 58, 0.6), /* Slightly more opaque focus ring for dark mode */
            0 4px 6px rgba(0, 0, 0, 0.2), /* Darker shadows for dark mode */
            0 1px 3px rgba(0, 0, 0, 0.15);
    }

    .paypal-checkout-btn.loading::before {
      border: 3px solid rgba(4, 69, 175, 0.4); /* Darker shade of blue for spinner track in dark mode */
      border-top-color: #1c75bc; /* Slightly lighter blue for spinner itself in dark mode */
    }
    
    .payment-logos-wrapper {
        background: linear-gradient(to right, rgba(0, 200, 83, 0.05), rgba(0, 200, 83, 0.02), rgba(0, 200, 83, 0.05));
    }
    
    .accepted-cards-container::before {
        background: #1d2d27;
        color: #8aa89c;
    }
    
    .payment-logo-svg {
        filter: grayscale(20%) brightness(0.9);
        opacity: 0.9;
    }
    
    .payment-logo-svg:hover {
        filter: grayscale(0%) brightness(1.1);
        opacity: 1;
    }
    
    /* Dark mode specific animations */
    @keyframes shimmer-dark {
        0% { transform: translateX(-100%); background: linear-gradient(90deg, transparent, #00c853, transparent); }
        100% { transform: translateX(100%); background: linear-gradient(90deg, transparent, #00c853, transparent); }
    }
    
    .modal-body label.animated::after {
        animation: shimmer-dark 2s infinite;
    }
}

/* --- Added custom scrollbar for longer content --- */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f8f5;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 178, 72, 0.3);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 178, 72, 0.5);
}

/* --- Security badge --- */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #8aa89c;
}

.security-badge svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* --- Input focus highlight effect --- */
.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: #00b248;
    transition: width 0.3s ease;
}

.modal-body input[type="number"]:focus ~ .input-highlight {
    width: 100%;
}
/* --- END: Creatively Redesigned Payment Modal --- */
/* --- END OF FILE styles.css --- */
