body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: #f9f9f9;
    color: #333;
}

header {
    background-color: #2d2d2d;
    color: white;
    padding: 1em;
    text-align: center;
    font-size: 1.5em;
}



.toolkit-banner {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}


#toolkit-filters {
    background: rgba(248, 248, 252, 0.9);
    backdrop-filter: blur(5px);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    /* subtle depth */
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.toolkit-button {
    background-color: #f5f5f5;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.toolkit-button:hover {
    background-color: #eee;
    border-color: #aaa;
}

.toolkit-button.active {
    background-color: #d6d6f8;
    border-color: #6a5acd;
    color: #222;
    font-weight: 500;
}

.toolkit-button.clear {
    background-color: #fcebea;
    border-color: #f5c6cb;
    color: #721c24;
    font-weight: 600;
}

#app-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1em;
    padding: 2em;
}

.app-card {
    background-color: white;
    border-radius: 8px;
    padding: 1em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    text-align: center;
}

.app-card:hover {
    transform: translateY(-5px);
}

.app-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5em;
    object-fit: contain;
}


#app-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 1.5em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

#app-popup img {
    max-width: 80px;
    display: block;
    margin: 0 auto 1em;
}

#app-popup.visible {
    display: block;
}

#popup-description {
    margin-top: 1em;
    font-size: 1em;
    line-height: 1.4em;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    color: #555;
    cursor: pointer;
    z-index: 1101;
}


#popup-prompt {
    background: #f3f3f3;
    padding: 1em;
    margin: 1em 0;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 4px;
    max-height: 200px;
    overflow: auto;
}

.popup-banner {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
}

#popup-controls {
    display: flex;
    gap: 1em;
    margin-top: 1em;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 0.6em 1.2em;
    font-size: 1em;
    background-color: #0074d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #005fa3;
}

#close-popup {
    background-color: #d9534f;
}

#close-popup:hover {
    background-color: #b52b27;
}

#example-box {
    background-color: #eef2f5;
    padding: 1em;
    margin-top: 1em;
    border-left: 4px solid #0074d9;
    border-radius: 4px;
}

#example-box.hidden {
    display: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 0.75rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.toast.hidden {
    display: none;
}

.example-section {
    background-color: #f9f9ff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.example-section h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.example-label {
    font-weight: bold;
    margin-right: 0.5rem;
}

.example-icon {
    font-size: 1.2rem;
}

#toast.show {
    display: block;
}

.popup-header-outer {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.popup-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#popup-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.popup-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* center text vertically to icon */
}

#popup-title {
    font-size: 1.6rem;
    margin: 0;
    color: #333;
    line-height: 1.2;
    transform: translateY(4px);
}

@media screen and (max-width: 600px) {
    #app-container {
        grid-template-columns: 1fr;
        padding: 1em;
    }

    .app-card {
        padding: 1em 0.5em;
    }

    .popup-header-inner {
        flex-direction: column;
        align-items: center;
    }

    #popup-icon {
        margin-bottom: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    #app-popup {
        padding: 1em;
        width: 95%;
    }

    #popup-title {
        font-size: 1.2rem;
    }

    button {
        font-size: 0.9rem;
        padding: 0.5em 1em;
    }
}
