
/* DIRECTORY PAGE */

.directory {
    flex: 1;
    width: 100%;
    padding: 55px 5% 75px;
}

.directory-content {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

/* TOPLINE */

.directory-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-bottom: 14px;
    border-bottom: 1px solid #333;
    color: #777;
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
}

/* HEADING */

.directory-heading {
    margin: 55px 0 45px;
}

.directory-heading-label {
    margin-bottom: 15px;
    color: #9b4949;
    font-family: "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 2px;
}

.directory h1 {
    margin: 0 0 18px;
    color: var(--text);
    font-family: "Courier New", monospace;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: normal;
    letter-spacing: 2px;
}

.directory-description {
    max-width: 650px;
    margin: 0;
    color: #999;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.8;
}

/* SEARCH PANEL */

.directory-search-panel {
    width: 100%;
    background: #101010;
    border: 1px solid #333;
}

.search-panel-header {
    min-height: 48px;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: #151515;
    border-bottom: 1px solid #333;
    font-family: "Courier New", monospace;
}

.panel-index {
    margin-right: 8px;
    color: #8d3939;
    font-size: 11px;
}

.panel-title {
    color: #ccc;
    font-size: 11px;
    letter-spacing: 1.5px;
}

.panel-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8bba8b;
    font-size: 10px;
    letter-spacing: 1px;
}

.panel-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #75a875;
    box-shadow: 0 0 7px #75a875;
}

/* SEARCH CONTENT */

.search-panel-content {
    padding: 35px 30px;
}

.search-label {
    display: block;
    margin-bottom: 14px;
    color: #888;
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
}

.search-container {
    width: 100%;
}

.search-address {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: "Courier New", monospace;
    font-size: 12px;
}

.address-prefix {
    color: #8d3939;
}

.url {
    color: #777;
}

/* INPUT FORM */

#searchForm {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    background: #080808;
    border: 1px solid #444;
    transition: border-color 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: #8d3939;
}

.search-prompt {
    padding-left: 15px;
    color: #a34747;
    font-family: "Courier New", monospace;
    font-size: 16px;
}

#word {
    width: 100%;
    min-width: 0;
    padding: 15px 12px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: "Courier New", monospace;
    font-size: 13px;
}

#word::placeholder {
    color: #555;
}

#searchForm button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-width: 125px;
    padding: 0 20px;
    background: #351414;
    border: 1px solid #683030;
    color: #eee;
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease,
                border-color 0.2s ease;
}

#searchForm button:hover {
    background: #512020;
    border-color: #a34747;
}

.button-arrow {
    font-size: 16px;
    transition: transform 0.2s ease;
}

#searchForm button:hover .button-arrow {
    transform: translateX(4px);
}

/* ERROR MESSAGE */

#error {
    min-height: 0;
    margin-top: 0;
    color: var(--red);
    font-family: "Courier New", monospace;
    font-size: 12px;
    text-align: left;
    line-height: 1.6;
}

#error:not(:empty) {
    margin-top: 18px;
    padding: 12px 15px;
    background: #1b0c0c;
    border-left: 2px solid var(--red);
}

/* PANEL FOOTER */

.search-panel-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px 22px;
    background: #0b0b0b;
    border-top: 1px solid #292929;
    color: #666;
    font-family: "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 1px;
}

/* BOTTOM INFORMATION */

.directory-bottom-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 35px;
    color: #666;
    font-family: "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 1px;
    text-align: center;
}

.directory-info-line {
    width: 45px;
    height: 1px;
    background: #393939;
}

/* WATCHER - DIRECTORY FREEZE */

.directory-freeze-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #080808;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Courier New", monospace;
}

.freeze-message {
    text-align: center;
    color: #777;
    font-size: 12px;
    letter-spacing: 3px;
}

.freeze-loader {
    width: 120px;
    height: 2px;
    background: #252525;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
}

.freeze-loader::after {
    content: "";
    position: absolute;
    width: 35%;
    height: 100%;
    background: #a33a3a;
    animation: freezeLoading 1.5s infinite ease-in-out;
}

@keyframes freezeLoading {
    from {
        left: -35%;
    }

    to {
        left: 100%;
    }
}

/* RESPONSIVE */

@media (max-width: 650px) {

    .directory {
        padding: 35px 20px 55px;
    }

    .directory-topline {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .directory-heading {
        margin: 40px 0 35px;
    }

    .directory h1 {
        font-size: clamp(28px, 8vw, 40px);
    }

    .directory-description {
        font-size: 12px;
    }

    .search-panel-content {
        padding: 25px 18px;
    }

    #searchForm {
        flex-direction: column;
    }

    #searchForm button {
        min-height: 45px;
        width: 100%;
    }

    .search-panel-footer {
        font-size: 8px;
    }

    .directory-bottom-info {
        font-size: 8px;
        gap: 8px;
    }

    .directory-info-line {
        width: 20px;
    }
}

@media (max-width: 380px) {

    .directory-topline {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-panel-header {
        padding: 0 13px;
    }

    .panel-title {
        font-size: 9px;
    }

    .search-panel-footer {
        flex-direction: column;
    }

}
