.error {
    color: red;
    margin: 10px 0;
    display: none;
}

.loading {
    margin: 10px 0;
    color: #ccc;
    font-style: italic;
}

.search-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-engine-selector {
    min-width: 120px;
    width: auto;
    /* padding: 6px 8px; */
    border: 1px solid #444;
    background-color: #333;
    color: white;
    border-radius: 4px;
    height: 38px;
    box-sizing: border-box;
    align-self: center;
    padding-left: 30px;
    appearance: none;
    background-position: calc(100% - 10px) center, 10px center;
    background-repeat: no-repeat, no-repeat;
    background-size: 12px, 16px;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>"), none;
    cursor: pointer;
    padding-right: 30px;
}

.search-engine-selector option {
    padding-left: 30px;
    background-repeat: no-repeat;
    background-position: 5px center;
    background-size: 16px;
}

.search-engine-selector option.icon-shodan {
    background-image: url('./icons/shodan-icon.png');
}

.search-engine-selector option.icon-censys {
    background-image: url('./icons/censys-icon.png');
}

.search-engine-selector option.icon-google {
    background-image: url('./icons/google-icon.png');
}

.search-engine-selector option.icon-fofa {
    background-image: url('./icons/fofa-icon.png');
}

.search-engine-selector option.icon-zoomeye {
    background-image: url('./icons/zoomeye-icon.png');
}

.search-engine-selector {
    background-position: 5px center, calc(100% - 10px) center;
    background-size: 16px, 12px;
}

.search-engine-selector[value="shodan"] {
    background-image: url('./icons/shodan-icon.png'), url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

.search-engine-selector[value="censys"] {
    background-image: url('./icons/censys-icon.png'), url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

.search-engine-selector[value="google"] {
    background-image: url('./icons/google-icon.png'), url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

.search-engine-selector[value="fofa"] {
    background-image: url('./icons/fofa-icon.png'), url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

.search-engine-selector[value="zoomeye"] {
    background-image: url('./icons/zoomeye-icon.png'), url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

#query-input {
    flex-grow: 1;
    min-width: 250px;
    min-height: 38px;
    max-height: 38px;
    padding: 10px;
    box-sizing: border-box;
    resize: none;
    overflow-y: auto;
}

#generate-button {
    align-self: flex-start;
    width: auto;
    max-width: 200px;
    padding: 8px 16px;
}

.result-container {
    margin-top: 20px;
    background-color: #333;
    border-radius: 8px;
    padding: 15px;
}

.dork-box {
    background-color: #222;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    position: relative;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
}

#generated-dork {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding-right: 50px; /* Make space for the copy button */
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    z-index: 5;
}

.copy-button:hover {
    background-color: #555;
}

.explanation {
    margin-top: 15px;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

/* Adjust responsive behavior */
@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    

    
    #generate-button {
        /* width: 100%; */
        max-width: none;
        align-self: center;
    }
}

/* Improve accessibility and SEO */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Add print styles for better printing */
@media print {
    .search-form button {
        display: none;
    }
    
    .copy-button {
        display: none;
    }
    
    .tool-description {
        page-break-inside: avoid;
    }
} 