:root {
  --student-color: #4361ee;
  --teacher-color: #3a86ff;
  --accent-color: #ff9f1c;
  --gradient-start: #8338ec;
  --gradient-end: #3a86ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow-x: hidden;
}

.portal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.portal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.3;
  z-index: -1;
}

.portal-header {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeInDown 1s ease-out;
}

.portal-header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #333;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(
    to right,
    var(--gradient-start),
    var(--gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-header p {
  font-size: 1.2rem;
  color: #555;
}

.portal-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  animation: fadeInUp 1s ease-out;
}

.portal-button {
  display: grid;
  grid-template-rows: auto auto 1fr;
  grid-gap: 15px;
  width: 350px;
  height: 380px;
  padding: 40px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  z-index: 1;
  backdrop-filter: blur(5px);
}

.portal-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.portal-button:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.portal-button:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.student-button {
  background: linear-gradient(135deg, #4361ee, #3a86ff);
  color: white;
}

.teacher-button {
  background: linear-gradient(135deg, #ff9f1c, #f72585);
  color: white;
}

.button-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 120px;
  font-size: 100px;
  transition: transform 0.3s ease;
  margin-bottom: 0;
}

.portal-button:hover .button-icon {
  transform: scale(1.1) rotate(5deg);
}

.button-title {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 0;
}

.button-description {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
}

.floating {
  animation: floating 3s ease-in-out infinite;
}

.decoration {
  position: absolute;
  z-index: -1;
  opacity: 0.6;
}

.circle-1 {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent-color), transparent);
  top: 10%;
  left: 5%;
  animation: pulse 8s ease-in-out infinite alternate;
}

.circle-2 {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--gradient-start), transparent);
  bottom: 10%;
  right: 5%;
  animation: pulse 6s ease-in-out infinite alternate-reverse;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.2);
    opacity: 0.6;
  }
}

@media (max-width: 900px) {
  .portal-buttons {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .portal-button {
    width: 100%;
    max-width: 320px;
    height: 320px;
  }

  .portal-header h1 {
    font-size: 2.5rem;
  }
}
