/* stylesheet.css */
body {
  background: linear-gradient(to bottom, #0042a6 0%, #07173f 100%);
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

body::before {
  top: 0;
  left: 0;
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  background: url('static/Patterns/Orbits.png');
  background-repeat: repeat;
  background-position: center;
  background-size: cover;
  opacity: 25%;
  z-index: 1;
  pointer-events: none;
}

body > * {
  z-index: 2;
}

input {
  background-color: #07173F;
  color: #ffffff;
  border-radius: 50px;
  border: 2px solid #ffffff;
  padding: 15px 20px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

input:focus {
  outline: none;
  border-color: #E43700;
  box-shadow: 0 0 10px rgba(228, 55, 0, 0.5);
}

#Logo h1 {
  margin: auto;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  padding: 10px;
  font-size: 100px;
  z-index: 2;
  text-align: center;
}

#Bar form {
  margin: auto;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  z-index: 2;
}

/* Search Results Styles */
.results-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 800px;
  height: 70%;
  background: rgba(7, 23, 63, 0.95);
  border: 2px solid #ffffff;
  border-radius: 20px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  backdrop-filter: blur(10px);
}

.results-container.show {
  display: flex;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ffffff;
}

.results-header h3 {
  margin: 0;
  color: #ffffff;
}

#closeResults {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
}

.results-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  color: #ffffff;
}

.result-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  border-left: 4px solid #E43700;
}

.result-title {
  font-family: 'Overpass-SemiBold';
  color: #E43700;
  margin-bottom: 10px;
}

.result-content {
  font-family: 'Overpass-Light';
  line-height: 1.6;
}

/* Loading Indicator */
.loading-hidden {
  display: none;
}

#loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(7, 23, 63, 0.9);
  padding: 30px;
  border-radius: 15px;
  border: 2px solid #ffffff;
  text-align: center;
  z-index: 999;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #E43700;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 0 auto 15px;
  font-family: 'OverPass-Regular';
}

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

/* Modal Pages */
#page1, #page2, #page3 {
  background-color: #07173F;
  color: #ffffff;
  border-radius: 25px;
  border: 2px solid #ffffff;
  margin: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  text-align: left;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  max-height: 80%;
  padding: 30px;
  font-size: 16px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
  overflow-y: auto;
}

#page1.show, #page2.show, #page3.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s linear 0s;
}

.action-button {
  background: #E43700;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Overpass-SemiBold';
  margin-top: 15px;
}

.action-button:hover {
  background: #ff4d1a;
}

#scrapingStatus {
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
}

#togglemenu button {
  background: #07173F;
  color: #ffffff;
  border: 2px solid #ffffff;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 120px;
  z-index: 3;
  font-size: 30px;
  text-align: center;
  font-family: 'JetBrainsMonoNerdFont-Regular';
  cursor: pointer;
  transition: all 0.3s ease;
}

#togglemenu button:hover {
  background: #E43700;
  transform: scale(1.1);
}

#togglemenu a {
  background: #07173F;
  color: #ffffff;
  border: 2px solid #ffffff;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 120px;
  z-index: 3;
  font-size: 20px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#togglemenu a:hover {
  background: #E43700;
  transform: scale(1.1);
}

#togglemenu .barmenu {
  margin-bottom: 10px;
  position: relative;
  z-index: 3;
}

#togglemenu .menuelements {
  align-items: left;
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

#togglemenu .menuelements.show {
  opacity: 1;
  visibility: visible;
  z-index: 3;
  transition: opacity 0.5s ease, visibility 0s linear 0s;
}

/* FONTS */
@font-face {
  font-family: "JetBrainsMonoNerdFont-Regular";
  src: url('static/Fonts/JetBrainsMonoNerdFont-Regular.ttf');
}

@font-face {
  font-family: "FiraSans-ExtraBold";
  src: url('static/Fonts/FiraSans-ExtraBold.otf');
}

@font-face {
  font-family: "Overpass-Regular";
  src: url('static/Fonts/Overpass-Regular.otf');
}

@font-face {
  font-family: "Overpass-SemiBold";
  src: url('static/Fonts/Overpass-SemiBold.otf');
}

@font-face {
  font-family: "Overpass-Light";
  src: url('static/Fonts/Overpass-Light.otf');
}

/* CORE */
h1 {
 font-family: 'FiraSans-ExtraBold';
 color: #ffffff;
}

h2 {
  font-family: 'Overpass-SemiBold';
  color: #E43700;
}

h3 {
  font-family: 'Overpass-Regular';
  color: #ffffff;
}

p {
  font-family: 'Overpass-Light';
  color: #ffffff;
  line-height: 1.6;
}





/* Add to stylesheet.css */
.error-message {
    color: #ff6b6b;
    text-align: left;
}

.troubleshoot {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
}

.troubleshoot ul {
    margin: 10px 0;
    padding-left: 20px;
}

.troubleshoot code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrainsMonoNerdFont-Regular';
}

.sources {
    margin-top: 15px;
    font-size: 0.9em;
    color: #E43700;
    font-family: 'Overpass-SemiBold';
}


/* Mobile-only fixes - won't affect desktop at all */
@media (max-width: 768px) {
    /* Fix logo positioning on mobile */
    #Logo h1 {
        font-size: 60px;
        top: 30%;
        width: 90%;
    }

    /* Fix search bar on mobile */
    #Bar form {
        width: 90%;
        top: 45%;
    }

    #Bar form input {
        width: 100%;
        font-size: 16px;
    }

    /* Fix results popup on mobile */
    .results-container {
        width: 95%;
        height: 80%;
    }

    .results-content {
        padding: 15px;
    }

    /* Fix menu positioning on mobile */
    #togglemenu .menuelements {
        position: fixed;
        bottom: 20px;
        left: 20px;
        flex-direction: row;
    }

    #togglemenu .barmenu {
        position: fixed;
        bottom: 20px;
        right: 20px;
    }

    /* Fix modal popups on mobile */
    #page1, #page2, #page3 {
        width: 95%;
        height: 80%;
        padding: 20px;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    #Logo h1 {
        font-size: 40px;
        top: 25%;
    }

    #Bar form {
        top: 40%;
    }

    #togglemenu button,
    #togglemenu a {
        width: 50px;
        height: 50px;
    }
}
