/*------COMMON STYLE-----*/
* { margin: 0; padding: 0; box-sizing: border-box; }


body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 200;
  background: #fff;
  min-height: 100vh;
}


.grid {
  position: relative;
  width: 90%;
  margin: 50px auto 0 auto;
  opacity: 0;
  flex: 1 0 auto;
  min-height: calc(100vh - 200px); 
  transition: opacity 0.3s ease-in;
}

.grid.loaded {
  opacity: 1;
}

#header-placeholder {
  flex-shrink: 0;
}

#footer-placeholder {
  flex-shrink: 0;
  margin-top: auto;
}

.card {
  position: absolute;
  background: #fff;
  border-radius: 30px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  border-radius: 45px;
  background: rgba(244,244,244,0.5);
  transition: background 0.3s ease;
  z-index: -1;
}

.card:hover::before {
  background: rgba(255,255,255,0.6);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

.mode-dropdown { text-align: center; }

.dropdown-btn {
  background: rgba(255,255,255,0.9);
  color: #1d1d1f;
  padding: 14px 32px;
  border: 2px solid rgba(220,220,235,0.5);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-btn:hover {
  background: #fff;
  border-color: rgba(200,200,235,0.7);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    border-radius: 22px;
    border: 4px solid rgba(220,220,235,0.45);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 0;
    z-index: 2000;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
}

.dropdown-content a {
  color: #1d1d1f;
  padding: 15px 25px;
  text-decoration: none;
  display: block;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 2px solid rgba(220,220,235,0.3);
  cursor: pointer;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: rgba(245,245,255,0.85); padding-left: 35px; }

.title .main-title {
    font-size: 18px;
    font-weight: 300;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 15px;
}

.title .sub-title {
    font-size: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    padding: 10px 16px;
    border-radius: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    width: fit-content;   
    display: block;        
    margin-left: auto;     
    margin-right: auto;    
    text-align: center;    
}




/* ACCORDION */

.accordion-header {
    width: 100%;
    cursor: pointer;
    background: #eee;
    border: none;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 200;
    text-align: left;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #f0f0f5;
}

.accordion-icon {
    float: right;
    font-size: 18px;
    font-weight: 100;
    transition: transform 0.3s ease;
}

.accordion-content {
    display: none; 
    overflow: hidden;
    background: transparent;
    border-radius: 15px;
    margin-top: 10px;
    padding: 0 5px;
}

.accordion-content p {
    color: #000000;
}

.customHyperlink {
    color: #007aff;
    text-decoration: underline;
}




.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: nowrap;
}

.doughnut-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: linear-gradient(105deg, #0010da, #06e4fb);
  border-radius: 90px 90px 20px 20px;
  width: 120px;
  box-sizing: border-box;
}

.doughnut-label {
  margin-top: 8px;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
}


#question {
  width: 100%;
  min-height: 200px;
  font-size: 17px;
  border-radius: 20px;
  padding: 20px 70px 20px 20px;
  box-sizing: border-box;
  border: 3px solid rgb(144, 166, 250);
  overflow-y: auto;
  overflow: hidden;
  box-shadow: 0 -1px 41px rgba(68, 77, 212, 0.22);
}


.progress-fixed {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
  display: block;
  backface-visibility: hidden;
  filter: drop-shadow(inset 0 2px 4px rgba(0,0,0,0.2));
}

.progress-circle {
  fill: none;
  stroke-width: 20;
  stroke-linecap: round;
}

.progress-bg {
  stroke: #f7f4f4;
  stroke-width: 20;
  box-shadow: -11px 2px 29px rgba(69, 71, 139, 0.97) inset
}

.progress-bar {
  transition: stroke-dashoffset 0.3s linear;
  stroke-linecap: round;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #a4a3a3;
  pointer-events: none;
  white-space: nowrap;
  font-size: 25px;
}

#progress-container {
  display: none; 
  justify-content: center;
  align-items: center;
  margin: 60px 0 1px 0;;
}

.button-container {
  display: flex;
  gap: 30px; 
  padding: 30px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.reset-container {
  display: none;
  margin-top: 0px;
  margin-bottom: 0px;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-container {
  margin-top: 0px;
  margin-bottom: 0px;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}


.customButton {
  background: #f4f4f4;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  font-size: 14px;
  padding: 5px 9px 8px 9px;
  margin-right: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.customButton:hover {
  background: linear-gradient(105deg, #0010da, #06e4fb);
  color: #ffffff;
  border: none;
}

.customButton:disabled {
  color: #fa9595;
  border: 1px solid #fa9595;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

#searchAnotherButton {
  font-size: 18px;
  padding: 8px 16px;
  color: #ffffff;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(227deg, #da00ae, #066ffb);
}

#searchAnotherButton:hover {
  background: linear-gradient(105deg, #0010da, #06e4fb);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.customNumber {
  display: inline-block;
  font-size: 30px;
  color: #ffffff;
  padding: 1px 12px 1px 12px;
  background: linear-gradient(105deg, #0010da, #06e4fb);
  border-radius: 50px;
  margin-right: 3px;
}

.history-item {
  margin-bottom: 0px;
  margin-top: 0px;
  padding-bottom: 20px;
  padding: 0px;
  border-radius: 20px;
}

.item-header {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 1px 5px 10px;
  background: transparent;
}

.item-answer {
  margin-top: 10px;
  background: transparent;
}

.followup-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; 
  gap: 0px; 
  margin-top: 20px;
  background: #fffffff;
}


#result {
  position: absolute; 
  font-size: 16px;
  color: #000000;
  margin-top: 0px;
  border: 0px solid #ffffff;
}

.placeholder-text {
  font-size: 30px;
  color: #a4a3a3;
  text-align: center;
  margin-top: 0px;
  background: transparent;
}


#result.thinking,
.placeholder-text {
  font-size: 20px;
  color: #a4a3a3;
  text-align: center;
  font-style: normal;
  border-radius: 20px;
  background: transparent;
}


.thinking-dots {
  display: inline-block;
  width: 30px;
  text-align: left;
}

.thinking-dots.animate::after {
  content: '';
  animation: thinking 1.5s infinite;
}

.thinking-dots.stopped::after {
  content: '...';
  animation: none;
}

@keyframes thinking {
  0% { content: '...'; }
  25% { content: '   '; }
  50% { content: '.  '; }
  75% { content: '.. '; }
  100% { content: '...'; }
}

input[type="text"] {
  width: 100%;
  font-size: 14px;
  padding: 15px 15px 15px 15px;
  margin-bottom: 0.5rem;
  border: 0px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 -1px 41px rgba(0, 0, 0, 0.19);
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.input-wrapper input {
  width: 100%;
  height: auto;
  min-height: 100px;
  font-size: 14px;
  border-radius: 10px;
  border: 0px solid #ccc;
  padding: 0 16px;
  overflow: hidden;
  box-sizing: border-box;
}


.input-wrapper input::placeholder,
.input-wrapper input::-webkit-input-placeholder,
.input-wrapper input:-ms-input-placeholder {
  color: #888;
  font-size: 20px;
}



.input-wrapper button {
  position: absolute;
  right: 15px;
  bottom: 9px;
  transform: translateY(-50%);
  padding: 5px 5px 4px 8px;
  background: linear-gradient(105deg, #c100da, #06e4fb);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
}



.submitButton {
  width: 40px;
  height: 40px;
  background: linear-gradient(105deg, #0010da, #06e4fb);
  padding: 10px 10px 10px 13px;
  font-size: 20px;
  color: #ffffff;
  border: 0px solid #ffffff;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 4px 41px rgba(0, 0, 0, 0.1);
}

.removeButton {
  width: 20px;
  height: 20px;
  font-size: 15px;
  background: #ffffff;
  padding: 0px 0px 0px 1px;
  margin-left: 3px;
  color: #fa9595;
  border: 1px solid #fa9595;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 4px 41px rgba(0, 0, 0, 0.1);
}

.removeButton:hover {
  background: #fa9595;
  color: #ffffff;
  border: none;
}

.resetButton {
  display: none;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(126deg, #0010da, #0ec4e6);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.resetButton:hover {
  background: #000000;
}

.plus-button-container {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

#toggleButton {
  width: 70px;
  height: 70px;
  font-size: 50px;
  margin: 0 auto;
  padding: 8px 10px;
  color: #ffffff;
  border: none;
  border-radius: 10%;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(105deg, #c100da, #06e4fb);
  box-shadow: -8px 1px 46px rgba(53, 153, 181, 0.3);
}

#toggleButton:hover {
  background: linear-gradient(105deg, #0010da, #06e4fb);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

#recent-searches {
  margin-top: 1rem;
  background: #f0f4ff;
  padding: 0.8rem;
  border-radius: 8px;
}

.recent-item {
  margin-bottom: 0.6rem;
  padding: 0.4rem;
  border-bottom: 0px solid #ccc;
}

.latest-result {
  background: #ffffff;
  padding: 1rem;
  margin-bottom: 1rem;
}


.customHyperlink {
  color: #3466d9;
  text-decoration: underline;
  border-radius: 0px;
  position: relative;
  transition: color 0.3s ease;
}

.customHyperlink::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #007acc;
  transition: width 0.3s ease;
}

.customHyperlink:hover {
  text-decoration: none;
  font-size: 16px;
}

.customHyperlink:hover::after {
  width: 100%;
}


.small-progress {
  width: 40px;
  height: 40px;
}

.css-doughnut {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#0010da 0%, #06e4fb 75%, #e0e0e0 75% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.3s ease;
}

.css-doughnut-inner {
  width: 80%;
  height: 80%;
  background: rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.css-doughnut-text {
  font-size: 24px;
  color: #599fc6;
}





/*-------------------Responsive design for search-----------------*/
@media (max-width: 480px) {
  .grid {
    padding: 15px;
  }
  .card {
    font-size: 14px;
    padding: 15px; 
    border-radius: 32px;
  }
  .card::before {
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 30px;
  }
}

@media (max-width: 768px) {
  .grid {
    padding: 20px;
  }
  
  .card {
    font-size: 14px;
    padding: 15px;  
    border-radius: 32px;
  }
  .card::before {
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 30px;
  }
}

@media (max-width: 768px) {

  .css-doughnut {
   width: 50px;
   height: 50px;
  }

  .doughnut-wrapper {
   width: 60px;
   padding: 9px;
  }

  .doughnut-label {
   font-size: 13px;
  }

  .css-doughnut-text {
   font-size: 16px;
  }

}

