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

body{
    background:#171717;
    color:white;
    font-family: Times New Roman;
    
    padding-top:50px;
}

header{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:25px 50px;

    background:#222;

    position:sticky;
    top:46px;
    z-index:100;
}

header input{
    width:250px;
    padding:10px;
    border:none;
    border-radius:30px;
}

.profiles{

    display:grid;

    grid-template-columns:repeat(auto-fit, 300px);

    justify-content:center;

    gap:30px;

    padding:40px;

    max-width:1400px;
    margin:0 auto;

}

.profile-card{

    background:#252525;

    border-radius:20px;

    padding:30px;

    text-decoration:none;
    color:white;

    transition:.25s;

    box-shadow:0 10px 25px rgba(0,0,0,.4);

    text-align:center;
    
    display:flex;
    flex-direction:column;

}

.profile-card:hover{

    transform:translateY(-8px);

    box-shadow:0 20px 40px rgba(0,0,0,.6);

}

.avatar{

    width:120px;
    height:120px;

    object-fit:cover;

    border-radius:50%;

    border:4px solid white;

    display:block;
    margin:0 auto 20px auto;

}

.profile-card h2{

    margin-bottom:15px;

}

.profile-card p{

    line-height:1.6;
    color:#d0d0d0;

}

.tags{

    display:flex;
    justify-content:center;
    flex-wrap:wrap;

    gap:8px;

    margin-top:20px;
    
    margin-top:auto;
    padding-top:20px;

}

.tag{

    padding:6px 12px;

    border-radius:999px;

    background:#353535;

    color:#d0d0d0;

    font-size:0.8rem;

    font-weight:400;

    transition:.2s;

}

.tag.primary{

    background:#4d8cff;

    color:white;

    font-weight:700;

    letter-spacing:.3px;

}


.nav-btn {
    width: 60px;
    height: 60px;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    background: #444;
    color: white;
    transition: 0.3s;
}

.nav-btn:hover {
    background: #666;
}

/* Style the topnav */
ul.topnav {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  background-color: #333333;
  
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  
  z-index: 1000;
}

/* Style links in topnav */
ul.topnav li a {
  display: block;
  color: #f1f1f1;
  padding: 14px 16px;
  text-decoration: none;
}

.character-section{
    margin:60px auto;
    max-width:1400px;
}

.section-title{

    font-size:2rem;

    margin-bottom:30px;

    padding-bottom:10px;

    border-bottom:3px solid #4d8cff;

    color:white;

}

/* Dark background */

.popup{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.8);

    z-index:2000;

    justify-content:center;

    align-items:center;

}

/* Visible popup */

.popup.active{

    display:flex;

}

/* Window */

.popup-content{

    background:#252525;

    color:white;

    width:700px;

    max-width:90%;

    max-height:85vh;

    overflow-y:auto;

    border-radius:20px;

    padding:35px;

    position:relative;

}

/* Close button */

.close{

    position:absolute;

    top:15px;

    right:20px;

    font-size:2rem;

    cursor:pointer;

}

.popup-content {
    background: #252525;
    color: white;

    width: 700px;
    max-width: 90%;
    max-height: 85vh;

    overflow-y: auto;

    border-radius: 20px;

    padding: 40px 50px;   /* More padding on the sides */

    position: relative;
}

.popup-content p {
    line-height: 1.8;      /* More breathing room */
    margin-bottom: 1.4em;  /* Space between paragraphs */
    text-align: left;      /* Much easier to read */
}