@charset "UTF-8";

body::before {
    display: none;
}

.card-wrapper {
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    min-height: 480px;
}

.card {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 30%;
    height: 70%;
    min-width: 340px;
    max-height: 480px;
    padding: 30px 20px;
    background: rgb(117 97 97 / 36%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card h2 {
    text-align: center;
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    margin: 15px 0;
}

.input-group input {
    width: 100%;
    padding: 14px 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    background-color: transparent;
    color: white;
    font-size: 14px;
    outline: none;
    position: relative;
    z-index: 1;
}

.input-group label {
    position: absolute;
    top: 14px;
    left: 12px;
    color: #ccc;
    font-size: 14px;
    background-color: rgba(31, 28, 44, 0.8);
    padding: 0 4px;
    transition: all 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown):valid+label {
    top: -8px;
    font-size: 12px;
    color: #fff;
}

button {
    padding: 14px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

button:hover {
    background: #45a049;
}

.card p {
    text-align: center;
    font-size: 14px;
    margin: 20px 0 0 0;
}

.card a {
    color: #ffeb3b;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

.card-back {
    transform: rotateY(180deg);
}

.card-wrapper.flipped {
    transform: rotateY(180deg);
}

/* スマホ＆横画面対応 */
@media screen and (max-width: 500px),
screen and (max-height: 480px) {
    .card {
        padding: 25px 15px;
    }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
    .card {
        height: 85%;
        font-size: .8em;
        translate: -50% -60%;
    }

    .card * {
        padding: 10px;
        margin: 0;
    }

    .card p {
        margin: 0;
    }
}