.flash {
  opacity: 1;
  animation: fadeout 4s ease forwards;
}

@keyframes fadeout {
  0% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; display: none; }
}
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.close-button {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1em;
  margin-top: 1.5em;
}

.form-buttons button {
  min-width: 120px;
}
.modal-content h2 {
    margin-top: 0;
}

.modal-content ul {
    padding-left: 1.2rem;
}

.modal-content ul li {
    margin-bottom: 0.5em;
}
#fullscreenBtn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #444;
}

#fullscreenBtn:hover {
    color: #000;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f4;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    color: #333;
}

@media (min-aspect-ratio: 16/9) {
  body {
    background-size: 100% auto;
  }
}

@media (max-aspect-ratio: 4/3) {
  body {
    background-size: auto 100%;
  }
}

.container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2em;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 5vh auto;
    /* inherit base text color */
}

.form-group {
    margin-bottom: 1.2em;
}

label {
    display: block;
    margin-bottom: 0.3em;
    font-weight: 600;
    color: #333;
}

input[type="datetime-local"],
input[type="number"],
input[type="time"],
input[type="text"],
textarea {
    width: 100%;
    padding: 0.6em;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    color: #333;
}

select,
input[type="file"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    border: 1px solid #bbb;
    border-radius: 6px;
    padding: 0.6em 1em;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #333;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
}

select:focus,
input[type="file"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
    outline: none;
}

select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'%3E%3Cpath fill='%23666' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6em center;
    background-size: 0.65em auto;
    padding-right: 2em;
}

button {
    background-color: #007bff;
    color: white;
    padding: 0.6em 1.2em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

button:hover {
    background-color: #0056b3;
}

h1, h2 {
    text-align: center;
    font-weight: 600;
}

#countdown {
    position: fixed;
    bottom: 2em;
    right: 2em;
    width: auto;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.85);
    padding: 1.5em;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1000;
}

#restart_message {
    text-align: center;
    margin-top: 2em;
}
.kofi-footer {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.kofi-footer a {
  color: #ffd700;
  text-decoration: underline;
}

/* Improved branding-bar for alignment and spacing */
.branding-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.branding-bar img {
    height: 36px;
    margin-right: 1rem;
}

.branding-bar span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.branding-bar .language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-right: 1.5em;
}

.big-time {
    font-size: 1.2em;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    display: inline-block;
}
.toast {
  visibility: hidden;
  min-width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 1em;
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 1em;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, visibility 0.5s;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

.pause-indicator {
    font-size: 2rem;
    animation: pulse 2s infinite;
    margin-bottom: 0.5em;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.big-note {
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
    max-width: 80%;
    margin: 0 auto;
    color: #444;
}

.note-card {
    background: #fff8e1;
    padding: 1rem 1.5rem;
    margin: 1rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    text-align: center;
    font-size: 1rem;
    color: #5d4037;
    font-style: italic;
    border-left: 5px solid #ffb300;
}

.flash-messages {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  width: auto;
  max-width: 90%;
}

.flash {
  padding: 0.75em 1.5em;
  margin-bottom: 1em;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  color: #fff;
  text-align: center;
}

.flash-success {
  background-color: #28a745;
}

.flash-danger {
  background-color: #dc3545;
}

.flash-warning {
  background-color: #ffc107;
  color: #212529;
}

.flash-info {
  background-color: #17a2b8;
}

.nav-link {
  text-decoration: none;
  color: #222;
  margin-left: 1em;
  font-weight: 500;
  font-size: 1rem;
}

.nav-link:hover {
  color: #007bff;
}

.nav-link i {
  margin-right: 0.3em;
}

@media screen and (min-width: 1024px) {
  #countdown {
    font-size: 1.5rem;
  }

  .big-time {
    font-size: 2.2rem;
  }

  .big-note {
    font-size: 1.6rem;
  }

  #countdown button {
    font-size: 1.1rem;
    padding: 0.8em 1.5em;
  }

  .note-card {
    font-size: 1.2rem;
  }
}