/* Solver Cards UI Section Styles */

:root {
  --bg-gradient-light: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fef3c7 100%);
  --bg-gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
  --card-bg-light: rgba(255, 255, 255, 0.9);
  --card-bg-dark: rgba(30, 41, 59, 0.8);
  --text-primary-light: #1e293b;
  --text-primary-dark: #f8fafc;
  --text-secondary-light: #64748b;
  --text-secondary-dark: #94a3b8;
  --border-light: rgba(255, 255, 255, 0.2);
  --border-dark: rgba(255, 255, 255, 0.1);
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-dark: rgba(0, 0, 0, 0.2);
  --btn-primary-light: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --btn-primary-dark: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  --business-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --education-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --health-gradient: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  --startup-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --healthcare-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

body.dark-mode {
  --bg-gradient: var(--bg-gradient-dark);
  --card-bg: var(--card-bg-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --border: var(--border-dark);
  --shadow: var(--shadow-dark);
  --btn-primary: var(--btn-primary-dark);
}

body:not(.dark-mode) {
  --bg-gradient: var(--bg-gradient-light);
  --card-bg: var(--card-bg-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --border: var(--border-light);
  --shadow: var(--shadow-light);
  --btn-primary: var(--btn-primary-light);
}

/* Solver Card Styles */

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


.solver-section {
  padding: 60px 20px;
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-gradient, var(--bg-gradient-light));
  background-size: 200% 200%;
  animation: gradientAnimation 15s ease infinite;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow, var(--shadow-light));
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, box-shadow 0.3s ease; 
}


/* Floating background elements */
.solver-section::before,
.solver-section::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

body.dark-mode .solver-section::before,
body.dark-mode .solver-section::after {
  background: rgba(255, 255, 255, 0.05);
}

.solver-section::before {
  top: -50px;
  left: -50px;
  animation: floatingIcons 8s ease-in-out infinite;
}

.solver-section::after {
  bottom: -50px;
  right: -50px;
  animation: floatingIcons 10s ease-in-out infinite;
}

.solver-section h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  display: inline-block;
  background: linear-gradient(90deg, var(--text-primary, #1e293b), #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  override-colors: transparent;
  letter-spacing: -0.5px;
  transition: background 0.3s ease;
}

body.dark-mode .solver-section h2 {
  background: linear-gradient(90deg, var(--text-primary, #f8fafc), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
}

.solver-section .tagline {
  font-size: 18px;
  color: var(--text-secondary, #64748b);
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
  font-weight: 400;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.5s;
  transition: color 0.3s ease;
}

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

/* Buttons Container */
.buttons-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* For medium screens and above, display buttons in row format */
@media (min-width: 768px) {
  .buttons-container {
    flex-direction: row;
    max-width: 800px;
  }
  
  .buttons-container .glow-button {
    width: auto;
    margin-bottom: 0;
  }
}

/* For extra large screens, make solver-section even wider */
@media (min-width: 1200px) {
  .solver-section {
    max-width: 1100px;
    width: 100%;
  }
}



/* Divider with "or" text */
.divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.8s;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border, #e2e8f0);
  transition: all 0.3s ease, border-color 0.3s ease;
}

.divider:hover::before,
.divider:hover::after {
  border-color: #3b82f6;
}

body.dark-mode .divider:hover::before,
body.dark-mode .divider:hover::after {
  border-color: #60a5fa;
}

.divider-text {
  padding: 0 15px;
  color: var(--text-secondary, #64748b);
  font-size: 14px;
  transition: all 0.3s ease, color 0.3s ease;
}

.divider:hover .divider-text {
  color: #3b82f6;
}

body.dark-mode .divider:hover .divider-text {
  color: #60a5fa;
}



/* Logo Circle */
.logo-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-circle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.logo-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(90deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logo-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
}

/* Glow Button Styles */


.glow-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  background: white;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: fadeIn 1s ease forwards 1s;
}

.glow-button::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 3px;
  border-radius: 30px;
  background: conic-gradient(from 0deg, #ff5e00, #ffb000, #ffe600, #00b7ff, #0040ff, #7a00ff, #ff00d9, #ff0073, #ff5e00);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
  /* animation: rotate 4s linear infinite; */
  pointer-events: none;
}

.glow-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Common Animation */

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.button-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(90deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.button-icon i {
  color: white;
  font-size: 18px;
}

/* Google Sign-up Button */
.google-signup {
  /* background: var(--card-bg, white); */
  color: var(--text-primary, #1e293b);
  border-radius: 30px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
  transition: all 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px var(--shadow, rgba(0, 0, 0, 0.05));
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1s;
}

.google-signup::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 3px;
  z-index: 0;
}

body.dark-mode .google-signup::before {
  opacity: 0.8;
}

.google-signup:hover {
  background: var(--card-bg, #f8fafc);
  box-shadow: 0 8px 15px var(--shadow, rgba(0, 0, 0, 0.1));
  transform: translateY(-3px);
  color: #3b82f6;
}

body.dark-mode .google-signup:hover {
  color: #60a5fa;
}

.google-signup:hover::before {
  left: 100%;
}

.google-signup:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px var(--shadow, rgba(0, 0, 0, 0.05));
}

.google-signup img {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  transition: all 0.3s ease;
}

.google-signup:hover img {
  transform: rotate(360deg);
}

/* Login and Signup Modals */
.login-modal,
.signup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
}

body.dark-mode .login-modal,
body.dark-mode .signup-modal {
  background: rgba(0, 0, 0, 0.8);
}

.login-modal.active,
.signup-modal.active {
  display: flex;
  animation: modalFadeIn 0.4s ease forwards;
  visibility: visible;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--card-bg, white);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 35px;
  box-shadow: 0 20px 40px var(--shadow, rgba(0, 0, 0, 0.2));
  position: relative;
  transform: translateY(30px);
  opacity: 0;
  animation: modalContentSlideIn 0.5s ease 0.1s forwards;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body:not(.dark-mode) .modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

body.dark-mode .modal-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

@keyframes modalContentSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.3s ease, color 0.3s ease, background 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  transform: rotate(90deg);
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  background: linear-gradient(90deg, var(--text-primary, #1e293b), #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-emphasis-color: transparent;
  transition: background 0.3s ease;
}

body.dark-mode .modal-title {
  background: linear-gradient(90deg, var(--text-primary, #f8fafc), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
}

.login-form,
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.3s forwards;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: formItemFadeIn 0.5s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.4s; }
.form-group:nth-child(2) { animation-delay: 0.5s; }

@keyframes formItemFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  transition: all 0.3s ease, color 0.3s ease;
}

/* Input wrapper with icon */
.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary, #64748b);
  transition: all 0.3s ease;
}

.input-wrapper input:focus + .icon {
  color: #3b82f6;
}

body.dark-mode .input-wrapper input:focus + .icon {
  color: #60a5fa;
}

.form-group input {
  width: 100%;
  padding: 12px 16px 12px 45px; /* Added left padding for icon */
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-primary, #1e293b);
  transition: all 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
  background: var(--card-bg, rgba(255, 255, 255, 0.8));
  box-shadow: 0 2px 4px var(--shadow, rgba(0, 0, 0, 0.02));
}

body.dark-mode .form-group input {
  background: rgba(30, 41, 59, 0.8);
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: var(--card-bg, white);
}

body.dark-mode .form-group input:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-group:focus-within label {
  color: #3b82f6;
}

body.dark-mode .form-group:focus-within label {
  color: #60a5fa;
}

.login-btn,
.signup-btn {
  background: var(--btn-primary, linear-gradient(135deg, #3b82f6 0%, #2563eb 100%));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  margin-top: 15px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  animation: formItemFadeIn 0.5s ease 0.6s forwards;
}

.login-btn::before,
.signup-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.6s ease;
}

.login-btn:hover,
.signup-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

body.dark-mode .login-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .solver-section {
    padding: 40px 20px;
    border-radius: 15px;
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 30px auto;
  }
  
  .solver-section h2 {
    font-size: 36px;
  }
  
  .solver-section .tagline {
    font-size: 16px;
    max-width: 400px;
  }
  
  .card-icon {
    width: 65px;
    height: 65px;
  }
  
  .card h3 {
    font-size: 18px;
  }
  
  .modal-content {
    max-width: 380px;
    padding: 30px;
  }
  
  .buttons-container {
    gap: 20px;
  }
  
  .logo-circle {
    width: 100px;
    height: 100px;
  }
  
  .logo-image {
    width: 70px;
    height: 70px;
  }
  
  .glow-button {
    padding: 12px 24px;
    font-size: 15px;
  }
  
  .button-icon {
    width: 32px;
    height: 32px;
  }
  
  .button-icon i {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .cards-grid {
    gap: 15px;
  }
  
  .card {
    padding: 25px 15px;
  }
  
  .card-icon {
    width: 60px;
    height: 60px;
    padding: 15px;
  }
  
  .google-signup {
    max-width: 280px;
    padding: 12px 24px;
  }
  
  .modal-content {
    max-width: 340px;
    padding: 25px;
  }
  
  .modal-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .solver-section {
    padding: 30px 15px;
    border-radius: 12px;
  }
  
  .solver-section h2 {
    font-size: 32px;
  }
  
  .solver-section .tagline {
    font-size: 15px;
    margin-bottom: 30px;
  }
  
  .card {
    padding: 25px 20px;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .card:hover {
    transform: translateY(-5px) scale(1.02);
  }
  
  .google-signup {
    max-width: 250px;
    font-size: 15px;
  }
  
  .login-modal.active,
  .signup-modal.active {
    display: flex !important;
  }
  
  .modal-content {
    width: 90%;
    max-width: 300px;
    padding: 20px;
  }
  
  .form-group input {
    padding: 10px 14px;
    font-size: 15px;
  }
  
  .login-btn {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .solver-section {
    padding: 25px 15px;
    margin: 20px 15px;
    width: calc(100% - 30px);
  }
  
  .solver-section h2 {
    font-size: 28px;
  }

  .solver-section .tagline {
    font-size: 15px;
    margin-bottom: 25px;
  }
  
  .logo-circle {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
  }
  
  .logo-image {
    width: 60px;
    height: 60px;
  }
  
  .glow-button {
    padding: 10px 20px;
    font-size: 14px;
    width: 90%;
  }
  
  .button-icon {
    width: 30px;
    height: 30px;
  }
  
  .button-icon i {
    font-size: 14px;
  }
  
  .buttons-container {
    gap: 15px;
    margin-bottom: 25px;
  }
}

@media (max-width: 380px) {
  .solver-section h2 {
    font-size: 28px;
  }
  
  .solver-section .tagline {
    font-size: 14px;
    margin-bottom: 25px;
  }
  
  .card-icon {
    width: 55px;
    height: 55px;
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .card h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }
  
  .card p {
    font-size: 14px;
  }
  
  .google-signup {
    max-width: 220px;
    font-size: 14px;
    padding: 10px 20px;
  }
  
  .google-signup img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }
  
  .modal-title {
    font-size: 22px;
  }
  
  .form-group label {
    font-size: 13px;
  }
  
  .form-group input {
    font-size: 14px;
  }
  
  .login-btn {
    font-size: 15px;
  }
}