*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    background:#f5f7fb;
    color:#222;
}

.container{
    max-width:720px;
    margin:40px auto;
    padding:20px;
}

h1{
    text-align:center;
    font-size:48px;
}

h2{
    text-align:center;
    margin-top:10px;
    font-size:34px;
}

.subtitle{
    text-align:center;
    margin:12px 0 30px;
    color:#666;
}

input[type=text]{
    width:100%;
    padding:15px;
    border:1px solid #ddd;
    border-radius:12px;
    font-size:18px;
}

.gender{
    display:flex;
    justify-content:center;
    gap:30px;
    margin:20px 0;
}

button{
    width:100%;
    padding:16px;
    border:none;
    border-radius:12px;
    background:#111827;
    color:#fff;
    font-size:18px;
    cursor:pointer;
    transition:.2s;
}

button:hover{
    background:#374151;
}

.hidden{
    display:none;
}

.card{
    margin-top:30px;
    background:white;
    border-radius:18px;
    padding:30px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.korean-name{
    text-align:center;
    font-size:56px;
    font-weight:700;
    margin-top:15px;
}

.romanization{
    text-align:center;
    color:#666;
    font-size:24px;
    margin-bottom:20px;
}

.card h4{
    margin-top:20px;
    margin-bottom:8px;
}

.card p{
    line-height:1.7;
}

.buttons{
    display:flex;
    gap:12px;
    margin-top:25px;
}

.buttons button{
    flex:1;
}

/* Certificate */

.certificate{
    margin-top:30px;
    padding:40px 30px;
    border:4px solid #d4af37;
    border-radius:20px;
    background:linear-gradient(180deg,#fffdf5,#fff8e8);
    text-align:center;
}

.cert-title{
    font-size:26px;
    font-weight:700;
    line-height:1.5;
    color:#444;
}

.cert-name{
    margin-top:25px;
    font-size:56px;
    font-weight:700;
    color:#111827;
}

.cert-roman{
    margin-top:10px;
    font-size:28px;
    color:#666;
}

.cert-meaning{
    margin-top:25px;
    font-size:22px;
    font-style:italic;
    color:#444;
}

.cert-footer{
    margin-top:40px;
    font-size:16px;
    color:#888;
    letter-spacing:1px;
}

#loading{
    text-align:center;
    margin-top:20px;
    font-size:18px;
    color:#666;
}

hr{
    margin:25px 0;
    border:none;
    border-top:1px solid #e5e7eb;
}

@media(max-width:600px){

    .container{
        padding:15px;
    }

    .korean-name{
        font-size:42px;
    }

    .romanization{
        font-size:20px;
    }

    .cert-name{
        font-size:42px;
    }

    .buttons{
        flex-direction:column;
    }

}