* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  padding-top: 60px;
  position: relative;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('Ayangku.jpg') center/cover no-repeat fixed;
  z-index: -1;
}

ul.After {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: red;
  position: fixed;
  top: 0;
  width: 100%;
  font-family: 'Roboto', sans-serif;
  z-index: 1000;
  display: flex;
}

ul.After li a {
  display: block;
  color: white;
  text-align: center;
  padding: 12px 14px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

ul.After li a:hover {
  background-color: black;
  transform: scale(1.2);
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 80px auto 40px;
  padding: 20px;
  text-align: center;
  color: white;
  background-color: rgba(0,0,0,0.4);
  border-radius: 8px;
}

.container h1, .container p {
  margin: 10px 0;
  font-family: 'Poppins', sans-serif;
}

.side-menu {
  position: fixed;
  top: 50px;
  left: 15px;
  width: 200px;
  background-color: #f1f1f1;
  display: none;
  flex-direction: column;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  z-index: 99;
}

.side-menu a {
  padding: 12px;
  text-decoration: none;
  color: black;
  display: block;
  border-bottom: 1px solid #ccc;
}

.side-menu a:hover {
  background-color: rgb(64, 224, 208);
  transform: scale(1.1);
  position: relative;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: cover;
  background: transparent;
  border: none;
  border-radius: 18px; 
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  padding: 0;
}

.modal .close {
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  position: absolute;
  top: 30px;    
  right: 40px;   
  display: none;
  z-index: 1300;
  transition: transform 0.2s ease, color 0.2s ease;
}

.modal[style*="display: flex"] .close {
  display: block;
}

.modal .close:hover {
  transform: scale(1.3);
  color: #ffdddd;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.invalid {
  border: 2px solid red;
}

label {
  display: block;
  margin: 15px 0 5px;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  resize: vertical;
}

button[type="submit"],
#successCloseBtn {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #4CAF50;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover,
#successCloseBtn:hover {
  background-color: darkred;
}

#successMessage {
  text-align: center;
  font-size: 18px;
  padding: 20px 10px;
  background-color: black;
  color: #2e7d32;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#contactModal .modal-content {
  background-color: rgba(0,0,0,0.85);
  padding: 20px;
  border-radius: 10px;
  max-width: 400px;
  color: white;
  position: relative;
}

#contactModal form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#contactModal input,
#contactModal textarea {
  padding: 8px;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
}

#contactModal button[type="submit"] {
  background-color: red;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-self: flex-end;
}

#contactModal button[type="submit"]:hover {
  background-color: darkred;
}

#contactModal .close {
  display: block !important;
  position: absolute;
  top: 8px;
  right: 12px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
  z-index: 1050;
}

#contactModal .close:hover {
  color: #ccc;
}
