/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
    'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  overflow: hidden;
}

/* Page Container */
.page-container {
  width: 1920px;
  height: 1080px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 64px;
  overflow-y: auto;
}

/* Home Page Styles */
.home-container {
  max-width: 1400px;
  width: 100%;
}

.home-header {
  text-align: center;
  margin-bottom: 64px;
  animation: fadeInUp 0.8s ease-out;
}

.home-header h1 {
  font-size: 48px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.home-header p {
  font-size: 18px;
  color: #6b7280;
}

/* Error Cards Grid */
.error-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.error-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
  text-decoration: none;
  color: inherit;
  display: block;
}

.error-card[data-delay='0'] {
  animation-delay: 0s;
}
.error-card[data-delay='0.1'] {
  animation-delay: 0.1s;
}
.error-card[data-delay='0.2'] {
  animation-delay: 0.2s;
}
.error-card[data-delay='0.3'] {
  animation-delay: 0.3s;
}
.error-card[data-delay='0.4'] {
  animation-delay: 0.4s;
}

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

.error-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.card-content {
  padding: 32px;
}

.card-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  transition: transform 0.6s ease;
}

.error-card:hover .card-icon {
  transform: rotate(360deg);
}

.card-icon .icon {
  width: 40px;
  height: 40px;
  color: #e31e24;
}

.card-text {
  text-align: center;
}

.card-code {
  font-size: 42px;
  font-weight: 700;
  color: #e31e24;
  margin-bottom: 12px;
}

.card-title {
  font-size: 16px;
  color: #374151;
}

.card-border {
  height: 6px;
  background-color: #e31e24;
}

/* Info Section */
.info-section {
  text-align: center;
  animation: fadeIn 0.8s ease-out 0.6s backwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.info-box {
  display: inline-block;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 32px;
  border: 1px solid #e5e7eb;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.info-icon {
  width: 24px;
  height: 24px;
  color: #e31e24;
}

.info-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.info-list {
  text-align: left;
  color: #6b7280;
}

.info-list p {
  font-size: 15px;
  margin: 8px 0;
}

/* Footer */
.footer {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #e5e7eb;
  background: white;
  animation: fadeIn 0.6s ease-out 0.8s backwards;
}

.footer p {
  font-size: 14px;
  color: #9ca3af;
}

/* Error Page Styles */
.error-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 64px;
}

.error-container {
  max-width: 1400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

/* Error Left Side */
.error-left {
  flex: 1;
  max-width: 650px;
  animation: slideInLeft 0.8s ease-out 0.2s backwards;
}

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

.error-code-container {
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
  animation: scaleIn 0.8s ease-out 0.3s backwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.error-code {
  font-size: 180px;
  line-height: 1;
  font-weight: 700;
  color: #e31e24;
  letter-spacing: -0.05em;
  position: relative;
}

.error-code-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(227, 30, 36, 0.4), transparent);
  filter: blur(50px);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

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

.error-title {
  font-size: 42px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.error-description {
  font-size: 18px;
  color: #6b7280;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

.error-suggestion {
  background: #fef2f2;
  border-left: 4px solid #e31e24;
  padding: 16px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease-out 0.7s backwards;
}

.error-suggestion p {
  font-size: 15px;
  color: #374151;
}

.error-suggestion-label {
  color: #e31e24;
  font-weight: 600;
}

.error-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out 0.8s backwards;
}

.btn {
  height: 56px;
  padding: 0 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.btn-primary {
  background: #e31e24;
  color: white;
}

.btn-primary:hover {
  background: #c11119;
  transform: scale(1.05);
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 2px solid #d1d5db;
}

.btn-secondary:hover {
  border-color: #e31e24;
  background: #f9fafb;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.error-help {
  font-size: 14px;
  color: #6b7280;
  animation: fadeIn 0.6s ease-out 1s backwards;
}

.error-help a {
  color: #e31e24;
  text-decoration: none;
}

.error-help a:hover {
  text-decoration: underline;
}

/* Error Right Side */
.error-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 0.8s ease-out 0.4s backwards;
}

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

.error-illustration {
  position: relative;
  width: 500px;
  height: 500px;
}

.error-circle-1 {
  position: absolute;
  inset: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 30, 36, 0.3), transparent);
  animation: pulseCircle1 4s ease-in-out infinite;
}

@keyframes pulseCircle1 {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.2);
  }
}

.error-circle-2 {
  position: absolute;
  inset: 75px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 79, 0.3), transparent);
  animation: pulseCircle2 4s ease-in-out infinite 0.5s;
}

@keyframes pulseCircle2 {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.15);
  }
}

.error-icon-container {
  position: absolute;
  inset: 110px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border: 3px solid rgba(227, 30, 36, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.error-icon-inner {
  animation: rotateGentle 4s ease-in-out infinite;
}

@keyframes rotateGentle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

.error-icon-container svg {
  width: 140px;
  height: 140px;
  color: #e31e24;
  stroke-width: 1.5;
}

/* Floating Dots */
.floating-dot {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.floating-dot-1 {
  width: 16px;
  height: 16px;
  background: #e31e24;
  top: 15%;
  right: 10%;
  animation: floatDot1 5s ease-in-out infinite;
}

@keyframes floatDot1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -20px);
  }
}

.floating-dot-2 {
  width: 12px;
  height: 12px;
  background: #ff4d4f;
  bottom: 20%;
  left: 15%;
  animation: floatDot2 4s ease-in-out infinite 0.5s;
}

@keyframes floatDot2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, 15px);
  }
}

.floating-dot-3 {
  width: 10px;
  height: 10px;
  background: #e31e24;
  opacity: 0.7;
  top: 45%;
  right: 5%;
  animation: floatDot3 4.5s ease-in-out infinite 1s;
}

@keyframes floatDot3 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(8px, -15px);
  }
}

/* Animated Lines */
.error-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.error-line {
  stroke-dasharray: 6 6;
  animation: drawLine 2s ease-out 1s backwards;
}

@keyframes drawLine {
  from {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 0.3;
  }
}

/* Responsive Adjustments */
@media (max-width: 1920px) {
  .page-container {
    width: 100vw;
    height: 100vh;
  }
}

@media (max-width: 1440px) {
  .navbar-content {
    max-width: 1200px;
  }

  .home-container,
  .error-container {
    max-width: 1200px;
  }

  .error-code {
    font-size: 140px;
  }

  .error-title {
    font-size: 36px;
  }

  .error-illustration {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 1024px) {
  .navbar-content {
    padding: 0 32px;
  }

  .navbar-menu {
    gap: 24px;
    font-size: 14px;
  }

  .error-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .error-container {
    flex-direction: column;
    gap: 40px;
  }

  .error-left,
  .error-right {
    max-width: 100%;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}
