body {
    background: var(--background-primary);
}

.search-form {
    width: min(92%, 840px);
    padding: 3px 3px 3px 10px;
    margin: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 8px;
    z-index: 10;
    border-radius: 50px;
    background: var(--background-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.search-form:focus-within {
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

input.search-form-input {
    margin: 0;
    padding: 12px 14px;
    border: none;
    border-radius: 25px 0 0 25px;
    background: rgba(0, 0, 0, 0);
    box-shadow: none;
    font-size: 16px;
}

input.search-form-input:focus {
    outline: none;
    border: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0);
}

button.search-form-button {
    color: #777;
}

.homepage-box-container-before {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 1;
    box-sizing: border-box;
}

.homepage-box-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0px;
    box-sizing: border-box;
    width: min(95%, 840px);
    margin-bottom: 10px;
    margin-top: 12%;
}

@media (min-width: 768px) {
    .search-form {
        width: min(80%, 840px);
    }
    .homepage-box-container {
        width: min(80%, 840px);
    }
}

@media (min-width: 768px) {
    .homepage-box-container {
        max-width: min(80%, 1000px);
    }
}

.homepage-box-logo-img {
    width: 75px;
    height: auto;
}

.homepage-box-content {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    justify-content: center;
}

.homepage-box-title {
    font-size: 2.65rem;
    margin: 0;
    font-weight: 400;
    color: #FFD700;
    text-shadow:
    0 1px 0 #D4AF37,
    0 -1px 0 #FFF9C4,
    0 0 12px rgba(255, 215, 0, 0.9);
    letter-spacing: 1px;
    line-height: 1;
}

.homepage-box-description {
    font-size: 1.0rem;
    color: #6d6d6d;
    width: 90%;
    font-weight: 200;
}

@media (min-width: 1000px) {
    .homepage-box-title {
        font-size: 2.8rem;
    }

    .homepage-box-description {
        font-size: 1.1rem;
    }

    .homepage-box-logo-img {
        width: 100px;
        height: auto;
    }
}

@media (prefers-color-scheme: dark) {
    .homepage-header {
        background: var(--background-primary);
    }

    .search-form {
        background: #1e1e1e;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    }

    .search-form:focus-within {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    }

    input.search-form-input {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    button.search-form-button {
        color: #a0a0a0;
    }

    .homepage-box-container-before,
    .homepage-box-container {
        background: var(--background-primary);
    }

    .homepage-box-title {
        color: #FFD700;
        text-shadow:
        0 1px 0 #D4AF37,
        0 -1px 0 #FFF9C4,
        0 0 15px rgba(255, 215, 0, 0.7);
    }

    .homepage-box-description {
        color: #b0b0b0;
    }
}

.homepage-app-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0px;
    box-sizing: border-box;
    width: min(95%, 840px);
    margin-top: 35px;
    gap: 20px;
    flex-wrap: wrap;
}

.homepage-app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.1s ease;
    position: relative;
    padding: 4px;
    box-sizing: border-box;
    margin: 0;
}

.homepage-app-tile:hover {
    background-color: #f5f5f5;
}

.homepage-app-icon {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 4px;
}

.homepage-app-icon img, .homepage-app-icon iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.homepage-app-notification-badge {
    position: absolute;
    top: -1px;
    right: -12px;
    background-color: #ff7800;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    text-align: center;
}

.homepage-app-notification-badge[data-count]:not([data-count="0"]) {
    visibility: visible;
}

.homepage-app-name {
    font-size: 13px;
    text-align: center;
    color: #333;
    margin-top: 2px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .homepage-app-tile {
        background-color: #000;
    }
    .homepage-app-tile:hover {
        background-color: #111;
    }
    .homepage-app-name {
        color: #DEDEDE;
    }
}
