.aimf-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* --- Newsletter Section --- */
.aimf-newsletter-wrapper {
    text-align: center;
    margin-bottom: 20px;
}
#aimf-toggle-newsletter {
    background: #40ae30;
    border: 1px solid #ccc;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 4px;
}
#aimf-newsletter-form {
    border: 1px solid #eee;
    padding: 20px;
    margin-top: 10px;
    background: #f9f9f9;
    text-align: left;
    border-radius: 8px;
    max-width: 500px;
    margin: 2em auto;
    background: white;
    box-shadow: 0 0 0 2px #eee;
}

/* --- Search Header (Minimalistic Search Engine Style) --- */
.aimf-search-header {
    text-align: center;
    padding: 50px 20px 0px;
    margin-bottom: 30px;
}

.aimf-search-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.aimf-search-header p {
    color: #666;
    margin-bottom: 30px;
}

#aimf-search-input {
    width: 100%;
    max-width: 600px;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
    transition: box-shadow 0.3s;
}


.aimf-search-header::after{
    content:"Search within over "var(--models-count)" models\a Last updated: "var(--last-modified);
    white-space: pre;
    display: block;
    opacity: 0.5;
}

#aimf-search-input:focus {
    outline: none;
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.2);
}

/* --- Results Grid --- */
#aimf-results-count {
    text-align: center;
    color: #888;
    margin-bottom: 15px;
}

#aimf-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* --- Model Card --- */
.aimf-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}

.aimf-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transform: translateY(-3px);
}

.aimf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.aimf-card h3 {
    font-size: 1.2rem;
    margin: 0;
    color: #333;
}

.aimf-category {
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
}

.aimf-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1; /* Ensures card height adapts to content but footer stays at bottom */
}

.aimf-tags {
    margin-bottom: 15px;
}

.aimf-tag {
    display: inline-block;
    background-color: #f1f3f5;
    color: #555;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* --- Card Footer --- */
.aimf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    font-size: 0.8rem;
}

.aimf-license {
    color: #888;
}

.aimf-links a {
    margin-left: 10px;
    text-decoration: none;
    color: #0066cc;
}
.aimf-links a:hover {
    text-decoration: underline;
}

#aimf-newsletter-form .tnp-field-button.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

#aimf-newsletter-form .tnp-field-button.loading::after {
  content: "";
  position: absolute;
  left: 115px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid black;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}