body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    box-sizing: border-box;
    margin: 0 15px;
    text-align: center;
}

body.dark-theme {
    color: #fff;
}

body.light-theme {
    color: #000;
}

.initial-background {
    background-color: #0044ff;
}

#site-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.875rem;
}

.cards-flex-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin: 1.25rem auto;
    max-width: 920px;
    width: 90%;
}

.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    min-width: 320px;
    flex: 1;
    border-radius: 8px;
}

.cards-flex-wrapper .card-container {
    max-width: 450px;
}

.card-container:not(.cards-flex-wrapper .card-container) {
    margin: 1.25rem auto;
    max-width: 920px;
    width: 90%;
}

.card-content {
    -webkit-backdrop-filter: saturate(90%) blur(16px);
    backdrop-filter: saturate(90%) blur(16px);
    padding: 1.25rem;
    border-radius: 8px;
}

.card-background,
.card-theme {
    box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px -4px;
}


.code-gen {
    width: 90%;
    max-width: 900px;
    resize: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberat
ion Mono, monospace;
}

.light-theme .code-gen {
    background-color: #FFF;
    color: #000;
}

.dark-theme input.code-gen {
    background-color: #333;
    color: #FFF;
}

code.code-gen {
    padding: 1rem;
    display: block;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}



input.code-gen {
    margin: 1em 0 1em 0;
    border: none; /* Ensure no border */
    outline: none; /* Remove outline on focus */
    -webkit-appearance: none; /* Remove default Safari/Chrome styling */
    -moz-appearance: none; /* Remove default Firefox styling */
    appearance: none; /* Remove default styling */
    width: 18ch; /* Fit 18 monospaced characters */
    text-align: center; /* Center the text */
    align-self: center; /* Center the input itself within flex container */
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.light-theme input.code-gen {
    background-color: #FFF;
    color: #000;
}

.dark-theme input.code-gen {
    background-color: #333;
    color: #FFF;
}

.code-gen-title {
    text-align: center;
    padding-left: 0px;
    padding-bottom: 0px;
    padding-top: 0px;
    margin-top: 1.25rem;
    font-size: 1rem;
    margin-bottom: 1em;
    font-weight: bold;
    border: none;
}

#not-safari-notice {
    margin: 0 auto 0.625rem auto;
    display: inline-block;
    line-height: 1.2;
    text-align: center;
    font-weight: 600;
    padding: 0.3125rem 0.625rem;
    background-color: transparent;
}

h3 {
    font-size: 1.5em;
}

#shareButton svg {
    transform: scale(1.0);
}

.action-button {
    background-color: #007AFF;
    color: white;
    border: none;
    padding: 0.625em 1.25em;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    position: relative; /* Needed for absolute positioning of ::after */
}

.action-button::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor; /* Colors the mask */
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    margin-left: 0.5em; /* Space between text and icon */
}

#shareButton::after {
    mask-image: url('./images/share.svg');
    transform: scale(1.25);
}

#copyButton::after {
    mask-image: url('./images/copy.svg');
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin: 1.25rem auto;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    padding: 0;
    margin-bottom: 1em;
}

footer a {
    text-decoration: none;
    color: inherit;
}

@media screen and (max-width: 512px) {
    body {
        margin-top: 0;
    }

    .cards-flex-wrapper {
        margin-top: 0;
    }

    .card-container {
        margin-top: 0px;
        padding: 0;
    }

    #not-safari-notice {
        font-size: 0.75rem;
    }

    #site-title {
        font-size: 1.5rem;
        margin-bottom: 0.625rem;
    }

    .code-gen {
        width: 86%;
    }
}