/* styles.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    color: #1a1a1a;
}

header {
    width: 100%;
    padding: 1rem 2rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

nav {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
}

nav a {
    text-decoration: none;
    color: #5f6368;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
    background-color: #e3f2fd; /* Lighter blue hover color */
    color: #1967d2;
}

nav a.active {
    background-color: #d1e3f8; /* Darker tone for active state */
    color: #1a1a1a; /* Keeps text color consistent with hover */
}

main {
    padding: 2rem;
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.alt-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 2.5rem;
    color: #333;
}

.alt-code:hover {
    background-color: #f4f4f4;
}

.alt-code span {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.grid-item {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.grid-item:hover {
    transform: scale(1.05);
}

.grid-item h2 {
    margin-top: 1rem;
    font-size: 1.25rem;
}

.grid-item p {
    color: #555;
    font-size: 0.9rem;
}

.icon {
    font-size: 3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Remove underline from links */
a {
    text-decoration: none;  /* This removes the underline */
    color: inherit;         /* Ensures the link color matches the surrounding text */
}

a:hover {
    color: #1967d2;         /* Optional: Add a color change on hover */
}

footer {
    text-align: center;
    background-color: #333;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* Styling for the pop-up message */
.popup {
    position: fixed;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Shift the element back by 50% of its own width and height */
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px; /* Slightly bigger padding for visibility */
    border-radius: 5px;
    font-size: 1.2rem;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease-in-out; /* Smooth fade-in and fade-out transition */
    z-index: 1000; /* Ensure it appears on top */
}

/* Show the pop-up (fade in) */
.popup.show {
    opacity: 1;
}

/* Hide the pop-up (fade out) */
.popup.hide {
    opacity: 0;
}