/* AERO Style Color Palette */
:root {
    --primary-color: #007BFF; /* Blue accent */
    --secondary-color: #6c757d; /* Grey for secondary text */
    --background-start: #e0e0e0; /* Light grey for subtle gradient */
    --background-end: #f0f0f0;
    --card-bg: rgba(255, 255, 255, 0.7); /* Translucent white for cards */
    --card-border: rgba(255, 255, 255, 0.3); /* Lighter border for glass effect */
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Soft shadow */
    --text-color: #343a40; /* Dark text */
    --light-text-color: #6c757d;
    --input-bg: rgba(255, 255, 255, 0.5); /* Translucent input background */
    --input-border: rgba(0, 0, 0, 0.1);
    --focus-border: #0056b3;
    --button-bg: linear-gradient(145deg, #007BFF, #0056b3); /* Gradient for buttons */
    --button-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    --button-hover-bg: linear-gradient(145deg, #0056b3, #007BFF);
    --border-radius: 8px;
}

/* General Styles */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; /* Modern sans-serif stack */
    margin: 0;
    background: linear-gradient(135deg, var(--background-start), var(--background-end));
    color: var(--text-color);
    line-height: 1.4; /* Tighter line height */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 10px; /* Reduced body padding */
    overflow-y: auto; /* Allow scrolling if content overflows */
}

/* Header */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 0.8em 15px; /* Reduced header padding */
    text-align: center;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    margin-bottom: 15px; /* Reduced margin */
}

header h1 {
    margin: 0 0 8px 0; /* Reduced margin */
    font-weight: 600;
    font-size: 1.6em; /* Slightly smaller title */
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 2px 8px; /* Reduced margin */
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 3px 0;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.9em; /* Slightly smaller nav links */
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Main Content (empty now, just a message) */
main {
    flex-grow: 1;
    padding: 15px; /* Consistent padding */
    max-width: 1400px;
    margin: 0 auto; /* No top/bottom margin, let flex handle it */
    display: flex; /* Changed to flex for centering message */
    justify-content: center;
    align-items: center;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
    backdrop-filter: blur(5px); /* AERO blur effect */
    -webkit-backdrop-filter: blur(5px); /* Safari support */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    width: 90%;
    max-width: 600px; /* Max width for modal content */
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.close-button {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tool Section (now used inside modal) */
.tool-section {
    background-color: transparent; /* No background for tool section inside modal */
    border: none; /* No border for tool section inside modal */
    box-shadow: none; /* No shadow for tool section inside modal */
    padding: 0; /* No padding for tool section inside modal */
    display: flex;
    flex-direction: column;
    transition: none; /* No transform/shadow transition */
}

.tool-section:hover {
    transform: none;
    box-shadow: none;
}

.tool-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.tool-card {
    display: flex;
    flex-direction: column;
}

/* Form Elements */
.input-group {
    margin-bottom: 12px;
    display: flex; /* Make input group a flex container */
    align-items: center; /* Align items vertically */
    gap: 10px; /* Space between input and button */
}

.input-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.85em;
    flex-shrink: 0; /* Prevent label from shrinking */
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group textarea,
.input-group select,
.input-group input[type="color"] {
    flex-grow: 1; /* Allow input to take available space */
    width: auto; /* Override default width */
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 0.9em;
    color: var(--text-color);
    background-color: var(--input-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"],
input[type="number"],
textarea,
select,
input[type="color"] {
    width: 100%; /* Default width for elements not in flex input-group */
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus,
input[type="color"]:focus {
    outline: none;
    border-color: var(--focus-border);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

textarea {
    resize: vertical;
    min-height: 50px;
}

.color-preview {
    width: 100%;
    height: 40px;
    border: 1px solid var(--input-border);
    margin-top: 10px;
    border-radius: var(--border-radius);
}

button {
    background: var(--button-bg);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--button-shadow);
}

button:hover {
    background: var(--button-hover-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.copy-btn {
    background: var(--secondary-color);
    color: white;
    padding: 6px 10px; /* Smaller padding for copy button */
    font-size: 0.8em; /* Smaller font for copy button */
    text-transform: none;
    box-shadow: none;
}

.copy-btn:hover {
    background: #5a6268;
    box-shadow: none;
}

.copy-btn svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    fill: currentColor;
}

.disclaimer {
    font-size: 0.75em;
    color: var(--light-text-color);
    margin-top: 10px;
    line-height: 1.2;
}

/* Footer */
footer {
    text-align: center;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    margin-top: auto;
    font-size: 0.8em;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* Specific tool adjustments */
#password-hasher .tool-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#password-hasher .input-group {
    margin-bottom: 0;
}

#password-hasher button {
    width: 100%;
    margin-top: 5px;
}

#password-hasher hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin: 15px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    header {
        padding: 0.6em 10px;
        margin-bottom: 10px;
    }
    header h1 {
        font-size: 1.4em;
    }
    nav ul li {
        margin: 2px 5px;
    }
    main {
        padding: 10px;
        gap: 10px;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .tool-section {
        padding: 15px;
    }
    .tool-section h2 {
        font-size: 1.1em;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .input-group {
        margin-bottom: 10px;
        flex-direction: column; /* Stack input and button on small screens */
        align-items: flex-start;
    }
    .input-group input, .input-group textarea, .input-group select {
        width: 100%;
    }
    .input-group button {
        width: auto; /* Allow button to size to content */
        margin-top: 5px; /* Space between stacked input and button */
    }
    button {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    textarea {
        min-height: 40px;
    }
    .color-preview {
        height: 30px;
    }
    footer {
        padding: 10px;
        font-size: 0.75em;
    }
    .modal-content {
        width: 95%;
        padding: 15px;
    }
}