*, *::before, *::after {
    box-sizing: border-box;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #090c10;
    font-family: Arial, sans-serif;
    color: #e6e6e6;
    overflow-x: hidden;
}

header {
    width: 100%;
    margin: 5px 0;
    text-align: center;
    color: #e6e6e6;
}

header h1 {
    margin: 5px 0;
    font-size: 36px;
}

header h2 {
    margin: 5px 0;
    font-size: 18px;
    color: #CC0000;
}

header h3 {
    margin: 5px 0;
    font-size: 18px;
}

header p {
    margin: 5px 0;
    font-size: 12px;
}

.title-block {
    margin-top: 16px;
    margin-bottom: 8px;
}

.motto-block {
    margin-bottom: 14px;
}

.description-block {
    margin-bottom: 4px;
}

.contact-block {
    margin-bottom: 16px;
}

.stats-block {
    margin-bottom: 16px;
}

.search-block {
    margin-bottom: 8px;
}

.sort-block {
    margin-bottom: 8px;
}

.navigation-block {
    margin-bottom: 16px;
}

.website-container {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 16px auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.website-row {
    display: flex;
    width: 334px;
    min-width: 334px;
    height: 268px;
    min-height: 268px;
    margin: 0;
    border: 1px solid #3e0731;
    flex-direction: column;
    flex-shrink: 0;
    align-items: center;
    position: relative;
    background: #2b0825;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    overflow: visible;
}

.website-name {
    display: flex;
    margin-top: 12px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #e6e6e6;
    font-weight: bold;
    text-align: center;
}

.website-name a {
    color: inherit;
    text-decoration: none;
}

.favicon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
}

.first-tags-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

.second-tags-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
}

.uptime-30d-tag,
.uptime-7d-tag,
.uptime-24h-tag,
.status-tag,
.users-tag,
.org-tag,
.country-tag {
    display: inline-block;
    margin: 0 4px;
    height: 16px;
    line-height: 16px;
    padding: 0 8px;
    position: relative;
    border-radius: 3px;
    color: #e6e6e6;
    font-size: 11px;
    font-weight: normal;
    cursor: pointer;
}

.uptime-30d-tag {
    background-color: #69145a;
}

.uptime-7d-tag {
    background-color: #69145a;
}

.uptime-24h-tag {
    background-color: #69145a;
}

.status-tag.blue,
.users-tag.blue,
.org-tag.blue {
    background-color: #00CCCC;
    color: #000000;
    font-weight: bold;
}

.status-tag.red,
.users-tag.red,
.org-tag.red {
    background-color: #CC0000;
    font-weight: bold;
}

.country-tag {
    padding: 0;
}

.country-tag img.country-flag {
    height: 16px;
    width: auto;
    border-radius: 3px;
    vertical-align: middle;
    display: block;
}

.status-chart {
    background: #20061b;
    margin-top: 16px;
    margin-bottom: 16px;
}

.status-line {
    display: inline-block;
    width: 5px;
    height: 24px;
    margin: 0;
    position: relative;
    cursor: pointer;
}

.search-input {
    width: 334px;
    height: 30px;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid #00CCCC;
    border-radius: 5px;
    background-color: #0B020A;
    color: #e6e6e6;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #CC0000;
    outline: none;
}

.sort-controls {
    display: flex;
    justify-content: center;
}

.sort-select {
    width: 334px;
    height: 30px;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid #3e0731;
    background-color: #2b0825;
    border-radius: 5px;
    color: #e6e6e6;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e6e6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5em;
    transition: background-color 0.3s, border-color 0.3s;
}

.sort-select:hover {
    background-color: #3e0731;
}

.sort-select:focus {
    outline: none;
    border-color: #00CCCC;
}

.sort-select option {
    background-color: #2b0825;
    color: #e6e6e6;
}

.time-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.time-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #3e0731;
    background-color: #2b0825;
    border-radius: 5px;
    color: #e6e6e6;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.time-nav-button:hover {
    background-color: #3e0731;
}

.time-nav-button:focus {
    outline: none;
    border-color: #00CCCC;
}

.time-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.time-display {
    width: 258px;
    height: 30px;
    padding: 6px 12px;
    background-color: #2b0825;
    border: 1px solid #3e0731;
    border-radius: 5px;
    color: #e6e6e6;
    text-align: center;
    font-size: 14px;
}

.tooltip {
    display: inline-block;
    padding: 5px;
    margin: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    z-index: 1;
    transform: translateX(-50%);
    background-color: #0B020A;
    border-radius: 5px;
    color: #e6e6e6;
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0s, opacity 0.3s linear;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-style: solid;
    border-color: #0B020A transparent transparent transparent;
}

.status-line:hover .tooltip,
.uptime-30d-tag:hover .tooltip,
.uptime-7d-tag:hover .tooltip,
.uptime-24h-tag:hover .tooltip,
.status-tag:hover .tooltip,
.users-tag:hover .tooltip,
.org-tag:hover .tooltip,
.country-tag:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 600px) {
    html, body {
        overflow-x: hidden;
    }
    
    .website-container {
        margin-left: auto;
        margin-right: auto;
    }
    
    .website-row {
        flex: 0 0 334px;
    }    
}
