@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* 短歌をホバーした時の回転 */
.wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
}

.card {
  position: relative;
  cursor: pointer;
  width: 30%;
  height: 330px;
  padding: 1rem;
  box-sizing: border-box;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  text-align: center;
  transition: 0.5s;
  box-shadow: 0 0 10px #555;
}

.card-front {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(80%);
  transform: rotateY(0deg);
}

.card-back {
  padding: 2rem 1rem;
  color: white;
  box-sizing: border-box;
  transform: rotateY(180deg);
  background-color: #353535;
}


.card:hover .card-front {
  transform: rotateY(-180deg);
}

.card:hover .card-back {
  transform: rotateY(0deg);
}


.card-title {
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  /* font-weight: bold; */
}

.card-description {
  margin: 1rem 0 4rem;
  line-height: 1.5;
}

.card-link {
  padding: 1rem;
  color: #fff;
  text-decoration: none;
  border: 2px solid #fff;
  transition: all .5s;
}

.card-link:hover {
  background-color: #fff;
  color: #333;
}

.icon-container {
  position: relative;
  display: inline-block;
}

.icon-label {
  position: absolute;
  left: 100%;
  bottom: 50%;
  transform: translateY(50%);
  visibility: hidden;
  opacity: 0;
  background-color: #555;
  color: white;
  text-align: center;
  padding: 5px 10px;
  border-radius: 6px;
  transition: visibility 0s, opacity 0.5s linear;
  white-space: nowrap;
}

.icon-label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent #555 transparent transparent;
}

.icon-container:hover .icon-label {
  visibility: visible;
  opacity: 1;
}
