* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, #e0e7ff, #f0f4ff);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 30px;
}

.container {
  width: 100%;
  max-width: 960px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  font-size: 32px;
  background: #6366f1;
  color: white;
  padding: 10px;
  border-radius: 12px;
}

.brand-text h1 {
  font-size: 22px;
  font-weight: bold;
  color: #333;
}

.brand-text p {
  font-size: 14px;
  color: #666;
}

.btn {
  background: linear-gradient(to right, #6366f1, #4f46e5);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
}

.btn:hover {
  background: linear-gradient(to right, #4f46e5, #4338ca);
  transform: translateY(-2px);
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
}

.card {
  height: 120px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border-radius: 16px;
}

.card-front {
  background: white;
  border: 1px solid #eee;
  transform: rotateY(180deg);
  color: #4f46e5;
}

.card-back {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}


.win-screen {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s ease;
}

.win-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.win-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.timer-box {
  background: white;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  text-align: center;
}


