/* General styles */
body {
    font-family: sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #282c34;
    color: #e6e6e6;
}

html, body {
    height: 100%;
}

nav {
    background-color: #363b44;
    padding: 0rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #61dafb;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    width: 3rem;
    height: 3rem;
}

.title {
    font-weight: bold;
    font-size: 1.5rem;
    color: #61dafb;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    /*align-items: center;
    justify-content: center;
    padding: 2rem;*/
    justify-content: center;
}

.content {
    text-align: center;
}

.highlighted-text {
    color: #61dafb;
}

.cta-button {
    padding: 0.3rem 1.5rem;
    background-color: #61dafb;
    color: #282c34;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border: 2px solid #61dafb;
}

.cta-button:hover {
    background-color: #75e2fb;
}

footer {
    background-color: #363b44;
    padding: 0.5rem;
    text-align: center;
    border-top: 2px solid #61dafb;
}

.powered-by {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.tutorials-dojo {
    color: #61dafb;
    text-decoration: none;
}

.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #61dafb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

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

#errorMessage {
    display: none;
    color: #ff6b6b;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
}

/* Updated timer and control container: row layout with spacing */
#timerAndStopContainer {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

/* Styling for the "Open in New Tab" button */
.open-new-tab {
    padding: 0.75rem 1.5rem;
    background-color: #61dafb;
    color: #282c34;
    border: 2px solid #61dafb;
    cursor: pointer;
    font-weight: bold;
}

.open-new-tab:hover {
    background-color: #75e2fb;
}

.stop-button {
    background-color: red;
    color: white;
    font-weight: bold;
    border: 2px solid red;

}

.stop-button:hover {
    background-color: darkred;
}

.timer-display {
    color: #e6e6e6;
    font-size: 1.2rem;
    font-weight: bold;
}

.iframe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 87%;
    margin-top: 71px;
    z-index: 100;
    background: #282c34;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#iframeSection {
  position: relative;
  height: 100%;
  width: 100%;
}

/* User selection styles */
.user-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.user-input {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #404040;
    border-radius: 4px;
    background-color: #2d2d2d;
    color: #e6e6e6;
    width: 300px;
}

.user-input:focus {
    outline: none;
    border-color: #89d1f5;
}

.user-input::placeholder {
    color: #808080;
}

.cta-button:disabled {
    background-color: #404040;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Thank You Page Styles */
.thank-you-container {
    text-align: center;
    padding: 2rem;
    background-color: #363b44;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.thank-you-container h1 {
    font-size: 2.5rem;
    color: #61dafb;
    margin-bottom: 1rem;
}

.thank-you-container p {
    font-size: 1.2rem;
    color: #e6e6e6;
    margin-bottom: 2rem;
}

.thank-you-container .cta-button {
    display: inline-block;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-align: center;
}


/* Modal styles for confirmation dialog */
.modal {
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none; /* hidden by default */
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
  }
  
  .modal-content {
    background-color: #363b44;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
  
  .modal-content h2 {
    margin-top: 0;
    color: #61dafb;
  }
  
  .modal-content p {
    color: #e6e6e6;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }
  
  .modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }
  
  .modal-actions .cta-button {
    flex: 1;
  }

/* Loading screen */
#ideLoader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: monospace;
  color: white;
}

@keyframes typing {
  from { width: 0 }
  to { width: 26ch; }
}

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

.typing-loader {
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  font-family: monospace;
  font-size: 1.2rem;
  color: white;
  border-right: 2px solid white;
  width: 0;
  animation: typing 2s steps(26, end) forwards, blink 0.7s step-end infinite;
  margin-top: 1rem;
  text-align: center;
}
