body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

main {
    flex-grow: 1;
}

header h1 {
    font-size: 3em;
    font-weight: bold;
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc;
}

.subtitle {
    font-size: 1.2em;
    color: #f0f0f0;
    margin-bottom: 40px;
}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.search-input {
    width: 70%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #00ffcc;
    background-color: #2a2a2a;
    color: #f0f0f0;
    border-radius: 5px 0 0 5px;
    outline: none;
    border-right: 2px solid #00ffcc;
}

.pagesize-input {
    width: 80px;
    padding: 5px 8px;
    font-size: 1em;
    border: 1px solid #00ffcc;
    background-color: #2a2a2a;
    color: #f0f0f0;
    border-radius: 4px;
    outline: none;
    text-align: center;
    -moz-appearance: textfield;
    appearance: none;
}

.pagesize-input::-webkit-outer-spin-button,
.pagesize-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagesize-container, .subtype-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.options-container label {
    margin: 0;
    cursor: pointer;
}

.search-input::placeholder {
    color: #888;
}

.search-button {
    padding: 15px 25px;
    font-size: 1.1em;
    border: 2px solid #00ffcc;
    background-color: #00ffcc;
    color: #1a1a1a;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    outline: none;
    transition: background-color 0.3s, color 0.3s;
}

.search-button:hover {
    background-color: #1a1a1a;
    color: #00ffcc;
}

footer {
    width: 100%;
    color: #888;
    padding: 20px 0;
    flex-shrink: 0;
}

.results {
    margin-top: 40px;
    text-align: left;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #333;
}

.result-item {
    padding: 15px;
    border-bottom: 1px solid #333;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-card {
    background-color: #252a33;
    border: 1px solid #3c4452;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.card-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.domain-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

.domain-link {
    color: #00ffcc;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.domain-link:hover {
    text-decoration: underline;
}

.external-link-icon {
    font-size: 0.8em;
    vertical-align: top;
    margin-left: 4px;
    display: inline-block;
}

.copy-btn {
    background: #3c4452;
    color: #f0f0f0;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.copy-btn:hover {
    background: #4a5464;
}

.country-flag {
    width: 16px;
    height: auto;
    margin-right: 6px;
    vertical-align: middle;
}

.info-label {
    color: #8b949e;
    margin-right: 5px;
}

.location-info, .isp-info, .asn-info, .title-info, .update-time-info {
    color: #c0c0c0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.asn-info {
    font-family: monospace;
}

.title-info {
    color: #f0f0f0;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.update-time-info .icon {
    margin-right: 6px;
    font-size: 1.1em;
}

.title-info a {
    color: inherit;
    text-decoration: none;
}

.title-info a:hover {
    text-decoration: underline;
}

.card-right {
    display: flex;
    flex-direction: column;
}

.tab-nav {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid #3c4452;
    margin-bottom: 10px;
}

.tab-button {
    background: none;
    border: none;
    color: #a0a0a0;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 1em;
}

.tab-button.active {
    color: #00ffcc;
    border-bottom: 2px solid #00ffcc;
    font-weight: bold;
}

.tab-pane {
    display: none;
    color: #e0e0e0;
    font-family: monospace;
    font-size: 0.9em;
    background-color: #1e2229;
    padding: 15px;
    border-radius: 5px;
}

.tab-pane.active {
    display: block;
}

.tab-pane pre {
    max-height: 200px;
    overflow-y: auto;
    background: #1e2229;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}

.hash-list dt {
    color: #00ffcc;
    font-weight: bold;
}
.hash-list dd {
    margin-left: 20px;
    word-break: break-all;
}

.content-container {
    position: relative;
}

.truncated {
    max-height: 150px;
    overflow: hidden;
    position: relative;
    white-space: pre-wrap;
    word-break: break-all;
    text-align: left;
}

.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, #1e2229, transparent);
}

.show-more-btn {
    background-color: #3c4452;
    color: #f0f0f0;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background-color: #252a33;
    border: 1px solid #3c4452;
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #3c4452;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #00ffcc;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 1.5em;
    cursor: pointer;
}

.modal-content {
    padding: 20px;
    overflow-y: auto;
    color: #e0e0e0;
}

.modal-content pre {
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    font-family: monospace;
    font-size: 0.9em;
    text-align: left;
}

.error {
    color: #ff4d4d;
    background-color: #332222;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ff4d4d;
}

.options-container {
    margin-top: 15px;
    margin-bottom: 20px;
    color: #f0f0f0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.options-container input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
}

#pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-link, .pagination-span {
    padding: 8px 12px;
    margin: 2px;
    border: 1px solid #00ffcc;
    color: #00ffcc;
    background-color: transparent;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-link:hover {
    background-color: #00ffcc;
    color: #1a1a1a;
}

.pagination-link.active {
    background-color: #00ffcc;
    color: #1a1a1a;
    font-weight: bold;
    cursor: default;
}

.pagination-span {
    cursor: default;
    border: none;
}

#results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(650px, 1fr));
    gap: 20px;
}

.syntax-guide-link {
    color: #00ffcc;
    text-decoration: underline;
    cursor: pointer;
}

.pagesize-container, .subtype-container {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    text-align: left;
}


.syntax-modal-content h3 {
    color: #00ffcc;
    border-bottom: 1px solid #3c4452;
    padding-bottom: 5px;
    margin-top: 20px;
}

.syntax-modal-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}

.syntax-modal-content th,
.syntax-modal-content td {
    border: 1px solid #3c4452;
    padding: 8px 12px;
    text-align: left;
}

.syntax-modal-content th {
    background-color: #252a33;
    font-weight: bold;
}

.syntax-modal-content code {
    background-color: #1e2229;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
}

.export-button {
    background-color: transparent;
    color: #00ffcc;
    border: 1px solid #00ffcc;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s;
}

.export-button:hover {
    background-color: #00ffcc;
    color: #1a1a1a;
}

#results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

#results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(650px, 1fr));
    gap: 20px;
    font-size: 0.9em;
    text-align: left;
}

#pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-jump-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 10px;
}

.pagination-input {
    width: 50px;
    padding: 6px;
    text-align: center;
    background-color: #2a2a2a;
    border: 1px solid #00ffcc;
    color: #f0f0f0;
    border-radius: 4px;
    -moz-appearance: textfield;
    appearance: none;
}

.pagination-input::-webkit-outer-spin-button,
.pagination-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-jump-btn {
    padding: 7px 10px;
    border: 1px solid #00ffcc;
    background-color: transparent;
    color: #00ffcc;
    cursor: pointer;
    border-radius: 4px;
}

.pagination-jump-btn:hover {
    background-color: #00ffcc;
    color: #1a1a1a;
}