.plan-box {
  position: relative;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  color: white;
  overflow: hidden;
  transition: all 0.3s ease;
}

.plan-box:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
}

.plan-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from var(--angle),
    #ff0000,
    #ff8000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #8000ff,
    #ff0000
  );
  animation: rotate var(--speed) linear infinite;
  z-index: -1;
}

.plan-box::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #1a1a1a;
  border-radius: 12px;
  z-index: -1;
}

.box1 {
  --angle: 0deg;
  --speed: 4s;
}

.box2 {
  --angle: 120deg;
  --speed: 4s;
}

.box3 {
  --angle: 240deg;
  --speed: 4s;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotate {
  to {
    --angle: 360deg;
  }
}

.plan-box h2 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  text-align: center;
  word-break: break-word;
  white-space: normal;
  padding-top: 0.5rem;
}

.plan-type-tagline {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-type-tagline.cumulative {
  color: #00ffaa;
}

.plan-type-tagline.non-cumulative {
  color: #00aaff;
}

ul {
  list-style: none;
  margin-bottom: 1rem;
}

ul li {
  margin-bottom: 0.5rem;
  color: #ddd;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.3;
  word-break: break-word;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-total-interest {
    white-space: nowrap;
}

ul li::before {
  content: "•";
  color: #00ffaa;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.price {
  font-size: 1.6rem;
  font-weight: bold;
  background: linear-gradient(45deg, #00ffaa, #00aaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 1rem 0;
  text-align: center;
  word-break: break-word;
  white-space: normal;
}

.duration {
  color: #aab;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  white-space: normal;
}

.highlight {
  color: #00ffaa;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: normal;
  word-break: break-word;
}

button {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(45deg, #00ffaa22, #00aaff22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  word-break: break-word;
}

button:hover {
  background: linear-gradient(45deg, #00ffaa44, #00aaff44);
  transform: translateY(-2px);
}

.buy-button {
  background: linear-gradient(45deg, #00ffaa, #00aaff);
  border: none;
  color: #1a1a1a;
  font-weight: 600;
  margin-top: 0.8rem;
  padding: 1rem 0.8rem;
  font-size: 1rem;
}

.buy-button:hover {
  background: linear-gradient(45deg, #00ffcc, #00ccff);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 255, 170, 0.4);
}

.plan-box.selected {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 255, 170, 0.3);
}

.plan-box.selected::before {
  opacity: 1;
  animation: rotate var(--speed) linear infinite;
}

@media (max-width: 768px) {
  .plan-box h2 {
    font-size: 1.1rem;
  }
  .plan-type-tagline {
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
  }
}