@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Courier New', Courier, monospace;
  background-color: #fff;
  color: #333;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

header {
  background: #232323;
  color: white;
  padding: 30px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
}

nav a:hover {
  text-decoration: underline;
}

/* --- STARTSEITEN-BILD --- */
.bild-container {
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.bild-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(65%);
}

.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 36px;
  font-weight: bold;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
  text-align: center;
}

/* --- TO-DO FORM --- */
.input-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px auto;
  padding: 0 20px;
}

input[type="text"], input[type="date"] {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: 100%;
  max-width: 300px;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

button:hover {
  background-color: #388E3C;
}

/* --- TO-DO LISTEN --- */
.section {
  margin: 40px 30px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.todo-item {
  background: #f6f6f6;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.todo-text.completed {
  text-decoration: line-through;
  color: gray;
}

.todo-actions button {
  padding: 6px 12px;
  font-size: 0.9rem;
  margin-top: 5px;
  border-radius: 6px;
}

/* --- KALENDER --- */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.controls button {
  background: #aeaeae;
  border: 1px solid black;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1rem;
}

#month-label {
  font-size: 1.5rem;
  font-weight: bold;
}

.header-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 10px;
  max-width: 1200px;
  margin: 0 auto 10px;
  gap: 4px;
}

.header-days div {
  text-align: center;
  font-weight: bold;
  background: #888;
  color: white;
  padding: 10px 0;
  border-radius: 10px;
}

/* Tagzellen */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  max-width: 1200px;
  padding: 0 10px 40px;
  margin: 0 auto;
}

.day {
  background: white;
  border: 1.5px solid #333;
  border-radius: 10px;
  min-height: 100px;
  padding: 6px;
  font-size: 14px;
  position: relative;
}

.day.empty {
  background: transparent;
  border: none;
}

.date {
  font-weight: bold;
}

.todo-entry {
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  display: inline-block;
  word-break: break-word;
  cursor: pointer;
}

.todo-entry.open {
  background: #B2F2BB;
  color: #000;
}

.todo-entry.done {
  background: #FFB3B3;
  color: #333;
  text-decoration: line-through;
}

/* --- FOOTER --- */
footer {
  background: #858585;
  color: white;
  text-align: center;
  padding: 30px 10px;
  margin-top: auto;
}

.footer-link {
  color: white;
  text-decoration: none;
  display: inline-block;
  margin: 5px 10px 0;
}

.footer-link:hover {
  text-decoration: underline;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .calendar {
    grid-template-columns: repeat(5, 1fr);
  }

  .header-days {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  .calendar {
    grid-template-columns: repeat(3, 1fr);
  }

  .header-days {
    grid-template-columns: repeat(3, 1fr);
  }

  .day {
    min-height: 90px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .calendar {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-days {
    grid-template-columns: repeat(2, 1fr);
  }

  .day {
    min-height: 80px;
    font-size: 11px;
  }

  .overlay-text {
    font-size: 24px;
  }
}

.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 30px 20px;
}

.auth-form {
  background: #f9f9f9;
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.auth-form h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
}

.auth-form .emoji {
  font-size: 1.5rem;
  margin-right: 8px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-sizing: border-box;
  background: #eef4ff;
}

.auth-form button {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
  margin-top: 10px;
}

.auth-form button:hover {
  background-color: #388e3c;
}

.auth-link {
  margin-top: 16px;
  font-size: 0.9rem;
}

.auth-link a {
  color: #3f51b5;
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}
