:root {
  --primary-color: #00ffff;
  --secondary-color: #ff00ff;
  --background-color: #000000;
  --text-color: #ffffff;
  --accent-color: #ff6b6b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  height: 100%;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: black;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--primary-color);
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.8;
}

.control-panel {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  background-color: rgba(0, 255, 255, 0.1);
  border-radius: 25px;
  padding: 5px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.date-input {
  width: 100%;
  background-color: transparent;
  border: none;
  color: var(--text-color);
  padding: 10px 15px;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.calendar-btn {
  background-color: transparent;
  border: none;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary-color);
}

.explore-button, .random-button {
  background-color: var(--primary-color);
  color: var(--background-color);
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.explore-button:hover, .random-button:hover {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.random-button {
  background-color: var(--secondary-color);
  color: var(--text-color);
  max-width: 400px;
  margin: 0 auto 2rem;
  display: block;
}

.initial-message {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 2rem;
}

.apod-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%;
  overflow: hidden;
}

#apod-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: black;
}

.fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-btn svg {
  fill: var(--text-color);
}

.fullscreen-btn:hover {
  background-color: var(--primary-color);
}

.apod-info {
  padding: 2rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
}

#apod-title {
  font-size: 1.8rem;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

#apod-date {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

#apod-description {
  font-size: 1.1rem;
  line-height: 1.6;
}

.fullscreen-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.fullscreen-view img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.close-fullscreen {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 30px;
  cursor: pointer;
}

.hidden {
  display: none;
}

footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }

  .control-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .date-input-wrapper {
    margin-bottom: 10px;
  }

  .explore-button, .random-button {
    width: 100%;
  }
}