* { box-sizing: border-box;}
body { font-family: 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; }
header { background: #222; color: white; padding: 2rem 0; text-align: center; }
nav a { margin: 0 10px; color: #ddd; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.container { width: 90%; max-width: 1000px; margin: 2rem auto; }

h2 { margin-bottom: 1rem; }
.project-card {
  display: flex;
  background: white;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.project-card img {
  width: 150px;
  object-fit: cover;
}

.project-card div {
  padding: 1rem;
}

form input, form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
}

button {
  padding: 0.7rem 1.2rem;
  background: #222;
  color: white;
  border: none;
  cursor: pointer;
}

footer {
  text-align: center;
  background: #333;
  color: white;
  padding: 20px 0;
  animation: fadeIn 2s ease-in;
}
footer:hover {
  background: #222;
}

.canvas {
  width: 300px;
  height: 300px;
  perspective: 1000px;
  position: relative;
  margin: 20px auto;
  top: 100px;
}
.face {
  user-select: none;          
  -webkit-user-select: none;   
  -moz-user-select: none;     
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 191, 255, 0.3);
  border: 2px solid rgba(0, 191, 255, 0.7);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  color: black;
  transform: rotateZ(90deg);
}

.wheel-wrapper {
  width: 250px;
  height: 150px;
  transform: rotateZ(10deg) rotateX(-20deg) rotateY(20deg) ;
  transform-style: preserve-3d;
}

.wheel {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 2s ease;
}



input, button {
  margin: 5px;
  padding: 10px;
  font-size: 1rem;
}

body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}
#toggle-theme {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  color: #333;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
#toggle-theme:hover {
  transform: scale(1.05);
  background: #eee;
}
body.dark-mode #toggle-theme {
  background: #333;
  color: white;
}


.projects{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.project-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  background: hsla(51, 100%, 50%, 0.3); /* gold hue with 30% opacity */

}
body.dark-mode .project-card{
  
  background: #1e1e1e;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s;
}
body.dark-mode .project-card:hover {
  background: rgba(255, 215, 0, 0.5); /* tăng từ 0.3 lên 0.5 để nổi bật hơn */
  color: black;
}

nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 30px 0;
}

nav a {
  text-decoration: none;
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
  opacity: 1;
}

nav:hover a {
  opacity: 0.5; /* làm mờ tất cả khi hover vào nav */
}

nav a:hover {
  text-decoration: underline;
  color: gold;
  transform: scale(1.2);
  opacity: 1; /* giữ sáng cho link được hover */
}

