* {
  text-align: center;
  font-family: "Kanit", sans-serif;
}

body.index {
  background: #0a0a0a;
  color: white;
  margin: 0;
}

body.about {
  background: #1b1b1b;
  color: white;
  margin: 0;
}

.pic {
  width: 200px;
  height: 320px;
  margin-top: 30px;
}

.yt {
  margin-top: 20px;
  height: 320px;
}

table, th, td {
  border:3px solid #3c3c3c;
}

/* === ตารางเรียน SCMS === */
.tb {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.tb table {
  width: 550px;
  border-collapse: collapse;
  background: #1f1f1f;
  border-radius: 12px;
  overflow: hidden;
}

.tb th {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  padding: 14px;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.tb td {
  padding: 12px;
  border-bottom: 1px solid #2f2f2f;
  color: #e5e5e5;
  font-size: 15px;
}

.tb tbody tr:nth-child(even) {
  background: #2a2a2a;
}

.tb tbody tr:hover {
  background: #3a3a3a;
  transition: background 0.3s;
}

.tb tfoot .footer {
  background: #151515;
  color: #a5a5a5;
  font-size: 14px;
  padding: 12px;
  font-style: italic;
  border-top: 1px solid #3c3c3c;
}



.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

nav {
  display: flex;
  justify-content: center;
  padding: 10px;
  margin: 0 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-left: 10%;
  margin-right: 10%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  color: #a44afc;
  font-size: 25px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 400;
  transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #6e4fdd;
  padding-bottom: 3px;
}

.menu-toggle {
  display: none;
  font-size: 26px;
  color: white;
  cursor: pointer;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 100px;
}

.block-main {
  display: inline-block;
  background: #bfc3ce;
  color: #4a46ff;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 14px;
  padding: 6px 20px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.title {
  font-size: 45px;
  color: white;
  margin: 0 0 5px 0;
}

.title-2 {
  font-size: 60px;
  color: #a64afc;
  margin: 0;
}

.title-3 {
  color: #444444;
  margin-top: 5;
}

.title-about {
  font-size: 35px;
}

.gradient-text {
  background: linear-gradient(90deg, #a64afc, #2528dd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.card-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  gap: 10px;
  color: #a64afc;
  margin-bottom: 12px;
}

.card-icon h2 {
  font-size: 18px;
  color: #ffffff;
  margin: 0;
}

.card {
  background: #222222;
  padding: 24px;
  border-radius: 16px;
  width: 280px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  animation:
    typing-infinite 8s steps(40, end) infinite,
    blink-caret 0.75s step-end infinite;
  display: inline-block;
  margin: 0;
}
.btn {
  position: relative;
  font-size: 17px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1em 2.5em;
  display: inline-block;
  cursor: pointer;
  border-radius: 6em;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
  font-weight: 500;
  color: white;
  background: linear-gradient(to bottom right, #6366f1, #8b5cf6);
  min-width: 180px;
  box-sizing: border-box;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.btn::after {
  content: "";
  display: inline-block;
  height: 100%;
  width: 100%;
  border-radius: 100px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  transition: all 0.4s;
}

.btn::after {
  background: linear-gradient(to bottom right, #6366f1, #8b5cf6);
}

.btn:hover::after {
  transform: scaleX(1.4) scaleY(1.6);
  opacity: 0;
}

.btn2 {
  background: transparent;
  position: relative;
  padding: 1em 2.5em;
  display: inline-block;
  align-items: center;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #6366f1;
  border-radius: 6em;
  outline: none;
  overflow: hidden;
  color: #6366f1;
  transition: color 0.3s 0.1s ease-out;
  text-align: center;
  min-width: 180px;
  box-sizing: border-box;
}

.btn2 span {
  margin: 10px;
}

.btn2::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  content: '';
  border-radius: 50%;
  display: block;
  width: 20em;
  height: 20em;
  left: -5em;
  text-align: center;
  transition: box-shadow 0.5s ease-out;
  z-index: -1;
}

.btn2:hover {
  color: #fff;
  border: 1px solid #6366f1;
}

.btn2:hover::before {
  box-shadow: inset 0 0 0 10em #6366f1;
}
.btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.icon-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin: 40px 0 0 0;
}

.icon-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  color: #6c6c7a;
  font-size: 2.5rem;
  transition: background 0.2s, color 0.2s;
  border: none;
  outline: none;
  text-decoration: none;
}

.icon-btn.active,
.icon-btn:hover {
  background: #f3f4ff;
  color: #6c63ff;
}

footer {
  background: #1a1a1a;
  padding: 60px 20px 20px;
  margin-top: 100px;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #33333380;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 40px;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.footer-logo {
  color: #a64afc;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 15px 0;
}

.footer-section h4 {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
}

.footer-description,
.footer-contact {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #6e4fdd;
}
.footer-links a.active {
  color: #6e4fdd;
  padding-bottom: 3px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

.footer-social a {
  color: #9ca3af;
  font-size: 20px;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #6366f1;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.footer-bottom p {
  margin: 5px 0;
}

.footer-bottom a {
  color: #6366f1;
  text-decoration: none;
}

@keyframes typing-infinite {
  0%, 100% { width: 0 }
  50%, 90% { width: 100% }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    right: 50px;
    background: #111;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border-radius: 10px;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
  
  body {
    background: #0a0a0a;
    color: white;
    margin: 0;
  }
}