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

body {
    font-family: Arial, sans-serif;
    background-color: #303030; /*Trying somthing new*/
    color: #f5f5f5;
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
}

header {
    background-color: #219ebc; /* Secondary */
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

header img {
    margin-left: 20px;
}

nav {
    flex: 1;
    text-align: right;
    margin-right: 50px;
}

.nav-btn {
    display: inline-block;
    background-color: #5a189a; /* Accent 1 */
    color: white;
    padding: 10px 20px; 
    margin: 5px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.nav-btn:hover {
    background-color: #001d3d;
    box-shadow: 0 0 25px #dbb42c; /* Accent 2 */
    color: white;
}

#about {
    background-color: #555555;
    color: #f5f5f5;
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    border-radius: 10px;
    border: 5px solid #5a189a;
}

button {
    background-color: #5a189a; /* Accent 1 */
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

button:hover {
    background-color: #001d3d;
    box-shadow: 0 0 25px #dbb42c; /* Accent 2 */
    color: white;
}

footer {
    background-color: #219ebc; /* Secondary */
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.card {
  background: #222;
  padding: 10px;
  margin: 10px;
  cursor: pointer;
  border-left: 4px solid #219ebc;
}

main {
    max-width: 900px;
    margin: 20px auto;
    padding: 10px;
}
.flex-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
#characterList {
    flex: 1 1 40%;
   min-width: 250px;
}

#details {
    flex: 1 1 55%;
    background: #222;
    padding: 15px;
    border-radius: 10px;
    min-width: 250px;
}

#details label {
    margin-top: 10px;
    font-weight: bold;
    display: block;
}

#details input, 
#details textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #000;
    color: #f5f5f5;
}

#details textarea {
    resize: vertical;
    min-height: 60px;
}

/* Buttons side by side */
#details button {
    width: 48%;
    margin-top: 15px;
    margin-right: 4%;
}

#details button:last-child {
    margin-right: 0;
}

.card:hover {
    background: #333;
    transform: scale(1.02);
    transition: 0.2s;
}

section {
    margin-top: 20px;
}

#searchInput {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 2px solid #219ebc;
    outline: none;
    font-size: 1rem;
    background-color: #222;
    color: #f5f5f5;
}

#searchInput:focus {
    border-color: #5a189a;
    box-shadow: 0 0 8px #5a189a;
}

@media (max-width: 768px) {
    .flex-container {
        flex-direction: column; /* stack list + details vertically */
    }

    #characterList, #details {
        flex: 1 1 100%;
    }

    #details .form-row {
        display: flex;
        gap: 20px;
    }

    #details .form-row input,
    #details .form-row textarea {
        flex: 1;
    }

    nav {
        flex: 1;
        text-align: center;
    }
}