/* --- Global Styles & Fonts --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.6;
}

/* --- Header --- */
header {
    background: linear-gradient(90deg, #2c3e50, #34495e);
    color: white;
    padding: 25px 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 500;
}

main {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 25px;
}

/* --- Filter Form --- */
.filter-form {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.filter-form label {
    font-weight: 600;
    color: #4b4f56;
}

.filter-form select {
    padding: 10px 15px;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    font-size: 1em;
    background-color: #f5f6f7;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.filter-form button {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-form button[type="submit"] {
    background-color: #3498db;
    color: white;
}

.filter-form button[type="submit"]:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.filter-form button[type="button"] {
    background-color: #95a5a6;
    color: white;
}

.filter-form button[type="button"]:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}


/* --- Prompt Grid Layout --- */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* --- Prompt Card --- */
.prompt-item {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prompt-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* AQUI ESTÃO AS MUDANÇAS PARA A IMAGEM E O LINK */
.prompt-image-link {
    display: block;
    overflow: hidden; /* Mantém o efeito de zoom dentro dos limites */
}

.prompt-image {
    width: 100%;
    height: 200px; /* <<-- AQUI A MUDANÇA: Altura da miniatura reduzida */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease; /* Transição suave para o zoom */
}

.prompt-image-link:hover .prompt-image {
    transform: scale(1.08); /* Efeito de zoom sutil ao passar o mouse */
    cursor: pointer;
}
/* FIM DAS MUDANÇAS */


.prompt-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* --- Metadata Tags --- */
.prompt-meta {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    color: #fff;
}

.tag-genero {
    background-color: #e74c3c;
}

.tag-modelo {
    background-color: #8e44ad;
}

/* --- Prompt Text Container --- */
.prompt-text-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.prompt-text {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9em;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* --- Copy Button --- */
.copy-btn {
    margin-top: auto;
    width: 100%;
    padding: 12px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #27ae60;
}

.copy-btn.copied {
    background-color: #1abc9c;
}


/* --- Footer & Utility --- */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 25px;
    background-color: #ffffff;
    color: #7f8c8d;
    border-top: 1px solid #e0e0e-0;
}

.no-results {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    text-align: center;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    main {
        padding: 0 15px;
    }
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
}