* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  background-repeat: no-repeat;
  background-position: center;
  background-image: radial-gradient(circle, #c0e979, #96d923);
}

.warning {
  position: relative;
  background-color: #6DA807;
  border: 1px solid #6DA807;
  border-radius: 10px;
  box-shadow: 1vw 3vh 10vh rgba(109, 168, 7, 0.8);
  background-size: 3em 3em;
  background-image: linear-gradient(-45deg, transparent 0em, transparent 0.8em, #96D923 0.9em, #96D923 2.1em, transparent 2.1em, transparent 2.9em, #96D923 3.1em);
  -webkit-animation: warning-animation 750ms infinite linear;
  -moz-animation: warning-animation 750ms infinite linear;
  animation: warning-animation 750ms infinite linear;
}
@-webkit-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@-moz-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
.warning:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  border-radius: 10px;
  background-image: linear-gradient(to bottom, #6DA807, rgba(171, 226, 77, 0.6) 15%, transparent 60%, #6DA807);
}

.container {
  width: 20vw;
  min-width: 200px;
  max-width: 400px;
}
.container .warning {
  height: 3vh;
  min-height: 30px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .container {
    width: 40vw;
    min-width: 180px;
  }
  .container .warning {
    height: 4vh;
    min-height: 25px;
  }
}

@media screen and (max-width: 480px) {
  .container {
    width: 60vw;
    min-width: 150px;
  }
  .container .warning {
    height: 4vh;
    min-height: 20px;
  }
}

@media screen and (max-width: 360px) {
  .container {
    width: 70vw;
    min-width: 120px;
  }
}
