@import "https://fonts.googleapis.com/css?family=Press%20Start%202P";

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

body, html {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    line-height: 1.6;
    background-color: #221; /* Main dark background */
    color: #DDDDDD; /* Default light text color */
    text-transform: uppercase;
    padding: 20px;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

#content {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background-color: #1a1a1a; /* Darker content background */
    border: 2px solid #4FAF44; /* Retro green border */
    box-shadow: 0 0 10px rgba(79, 175, 68, 0.3); /* Subtle green glow */
    border-radius: 0; /* Sharp corners for retro feel */
}

a {
    color: #F6EB14;
    text-decoration: none;  
    display: inline-block;
    padding: 5px 10px;
    transition: color 0.2s, background-color 0.2s;
}

a:hover {
    color: #F6EB14;
    background-color: rgba(79, 175, 68, 0.15);
}
h1 {
    font-size: 1.8rem; /* Adjusted for retro style */
    color: #F6EB14;    /* Retro yellow */
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 0 3px #F6EB14;
}

input[type="text"],
input[type="email"] {
    font-family: 'Press Start 2P', monospace;
    padding: 10px;
    border: 2px solid #888;
    background-color: #333;
    color: #DDDDDD;
    border-radius: 0;
    margin-right: 10px;
    width: auto; /* Allow natural width or control via parent */
    font-size: 0.8rem;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus {
    border-color: #F6EB14;
}

#button-container {
    display: flex;
    justify-content: center; 
    align-items: center; /* Align span vertically */
    margin-top: 20px; 
    gap: 10px; /* Space between buttons */
}

#button-container span {
    font-size: 0.7rem; /* Smaller font for "Last update" */
    align-self: center;
    color: #F6EB14;
}

button {
    font-family: 'Press Start 2P', monospace;
    padding: 10px 20px;
    background-color: #4FAF44; /* Retro green */
    color: #FFFFFF;
    border: 2px solid #888; /* Consistent border style */
    border-radius: 0;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color 0.2s, border-color 0.2s;
}

button:hover {
    background-color: #3A8E3A;
    border-color: #2F732F;
}

.close {
    cursor: pointer;
    margin-left: 8px; /* Increased margin */
    font-size: 0.9rem; /* Slightly larger close icon */
    position: relative;
    top: 0; /* Adjusted alignment */
    left: 0;
    color: #F6EB14;
}

.close:hover {
    color: #FF0000; /* Bright red for hover */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 0.75rem; /* Smaller font for table data */
    border: 2px solid #4FAF44; /* Table border */
}

th, td {
    padding: 10px; /* Adjusted padding */
    border: 1px solid #3a703a; /* Darker green for inner borders */
    text-align: left;
}

th {
    background-color: #3A8E3A; /* Darker green for headers */
    color: #F6EB14; /* Yellow header text */
    font-weight: normal; /* Press Start 2P is already boldish */
}

tr:nth-child(even) {
    background-color: #2a2a2a; /* Darker row striping */
}

tr:nth-child(odd) {
    background-color: #1f1f1f; /* Slightly lighter dark row striping */
}

tr:hover {
    background-color: #333; /* Hover effect for rows */
}

#filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border: 2px solid #4FAF44;
    padding: 10px;
    border-radius: 0;
    margin-bottom: 20px; /* Added margin */
}

#tags {
    display: flex;
    flex-wrap: wrap;
}

.tag, .tag-pill { /* Combined styling for tags and pills */
    font-family: 'Press Start 2P', monospace;
    background-color: #F6EB14; /* Yellow background */
    color: #221; /* Dark text for contrast */
    border-radius: 0;
    padding: 8px 10px;
    margin: 5px 5px 0px 0px;
    font-size: 0.7rem; /* Smaller font for tags */
    text-transform: uppercase;
    border: 1px solid #D9CF10;
    display: inline-block; /* ADDED: Ensures pills behave like blocks within the line, aiding wrapping */
}

.loader {
    border: 5px solid #333; 
    border-top: 5px solid #F6EB14; /* Yellow spinner */
    border-radius: 50%;
    width: 40px; /* Adjusted size */
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 25px auto; 
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Saved Searches Table - make it consistent */
#savedSearchesTable {
    width: 90%; /* Wider for consistency */
    margin: 25px auto;
    font-size: 0.7rem; /* Consistent small font */
}

#savedSearchesTable th, #savedSearchesTable td {
    padding: 8px;
}

#savedSearchesTable button {
    padding: 6px 12px;
    font-size: 0.7rem; 
}

#savedSearchesTable .delete-button {
    background-color: #F65A5A; /* Brighter retro red */
    border-color: #D94040;
}

#savedSearchesTable .delete-button:hover {
    background-color: #D94040;
    border-color: #B83030;
}

#savedSearchesTable .search-button {
    background-color: #5C6BC0; /* Keeping a distinct blue but can be themed too */
    /* If full retro theme for this button is desired:
    background-color: #4FAF44;
    border-color: #3A8E3A; */
}

#savedSearchesTable .search-button:hover {
    background-color: #3F51B5;
     /* If full retro theme for this button is desired:
    background-color: #3A8E3A;
    border-color: #2F732F; */
}

#saveSearchContainer {
    margin-top: 25px;
    text-align: center;
}

/* Ensure no other styles override the base font and colors unintentionally */
input, select, textarea, button {
    font-family: 'Press Start 2P', monospace;
}
