/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    box-sizing: border-box;
}

header {
    background: maroon;
    color: white;
    padding: 10px 0;
    text-align: center;
}

h1 {
    margin: 0;
}

nav {
    margin: 20px 0;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
}

nav a:hover {
    text-decoration: underline;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

.tool {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

main {
    padding: 1rem;
    text-align: center;
}

main form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

main form label {
    font-size: 1rem;
}

#generatedPassword {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: maroon;
}

#conversionResult {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: maroon;
    word-wrap: break-word;
}

/* Navigation bar styles */
.navbar {
    background-color: maroon;
    padding: 1rem;
    text-align: center;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap into multiple rows */
    justify-content: center; /* Center the items */
    gap: 1rem; /* Add spacing between items */
}

.navbar ul li {
    display: inline-block;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.navbar ul li a:hover {
    background-color: #a83232; /* Slightly darker maroon for hover effect */
}

/* Tools section styles */
.tools-section {
    padding: 2rem;
    text-align: center;
}

.tools-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: maroon;
}

/* Tools table styles */
.tools-table {
    width: 80%;
    margin: 0 auto;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tools-table th,
.tools-table td {
    border: 1px solid #ddd;
    padding: 10px 15px;
    text-align: left;
}

.tools-table th {
    background-color: maroon;
    color: white;
    font-weight: bold;
    text-align: center;
}

.tools-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.tools-table tr:hover {
    background-color: #f1f1f1;
}

.tools-table td a {
    color: maroon;
    text-decoration: none;
    font-weight: bold;
}

.tools-table td a:hover {
    text-decoration: underline;
}

/* Footer styles */
footer {
    background-color: maroon;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* JSON Formatter styles */
textarea {
    width: 80%;
    margin: 1rem auto;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

#jsonOutput {
    margin-top: 1rem;
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Color Picker styles */
#colorForm {
    text-align: center;
    margin-top: 2rem;
}

#colorInput {
    margin: 1rem 0;
    width: 100px;
    height: 50px;
    border: none;
    cursor: pointer;
}

#colorDetails {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: maroon;
}

/* Regex Tester styles */
#regexForm {
    text-align: center;
    margin-top: 2rem;
}

#regexInput,
#testString {
    width: 80%;
    margin: 1rem auto;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

#regexResult {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    word-wrap: break-word;
}