@import url('https://fonts.googleapis.com/css2?family=Aptos:wght@400;700&display=swap');

body {
    font-family: 'Aptos', Arial, sans-serif;
    background: #B9EDED;
    color: #535456;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

button {
    height: 10%;
    width: 100%;
    padding: 10px;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    background-color: #535456;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}
button:hover {
    background-color: #005A9F;
}

.red-button:hover {
    background-color: #f04141;
}

textarea {
    width: 100%;
    height: 100%;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    padding: 10px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid #535456;
    background-color: #FFFFFF;
    resize: none;
}

.shadow-border {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: clamp(1.2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.2rem, 5vw, 2.5rem);
}

p {
    font-size: clamp(1rem, 1.5vw, 1.8rem);
    margin: 0;
}

.squared-div {
    aspect-ratio: 1 / 1;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.squared-div > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header Opening */
#header {
    background: #FFFFFF;
    width: 100%;
    height: 90px;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
}
.logo-link {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 0 0 auto;
}
.logo {
    height: 100%;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}
.title {
    flex: 1;
    text-align: center;
    margin: 0;
}
.counter-div {
    margin: 5px;
}
.counter-div p {
    margin: 5px 8px;
}
/* Header Closing */

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Intro Opening */
.intro {
    width: 70%;
    margin: 40px 20px;
    display: flex;

    flex-direction: row;
    align-items: center;
}
.intro-image-container {
    flex: 1 1 0;
    max-width: 50%;
    display: flex;

    justify-content: center;
    align-items: center;
}
.intro-image {
    max-width: min(100%, 30vw);
    height: auto;
    width: auto;

    object-fit: contain;
    display: block;
    align-self: center
}
.intro-text {
    max-width: 90%;
    flex: 1 1 0;

    display: flex;
    box-sizing: border-box;
    flex-direction: column;
    text-align: center;
}
.intro-text h1 {
    margin: 0 0 clamp(10px, 5vw, 40px) 0;
}
.intro-text p {
    line-height: 2;
    margin: 0;
}
@media (max-width: 1000px) {
    .intro {
        width: 90%;
        flex-direction: column;
        height: auto;
    }
    .intro-image-container {
        max-width: 100%;
    }
    .intro-image,
    .intro-text {
        max-width: 100%;
        width: 100%;
        padding-left: 0;
    }
    .intro-text {
        padding-top: 24px;
    }
}
/* Intro Closing */

/* Creator Opening */
.creator {
    width: 40vw;
    align-items: center;
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#data-field {
    aspect-ratio: 2;
    overflow-y: auto;
}

.creator label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.creator > div {
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.creator input[type="number"] {
    width: 90%;
    padding: 0.75rem;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #F8F9FA;
}

.creator input[type="number"]:focus {
    outline: none;
    border-color: #005A9F;
    box-shadow: 0 0 0 3px rgba(0, 90, 159, 0.1);
}

.creator input[type="number"]:hover {
    border-color: #005A9F;
}

.settings-group {
    position: relative;
    padding: 1rem;
    background: #F8F9FA;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.settings-group label {
    font-size: 0.9rem;
    color: #666;
}

.button-group {
    height: 10%;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.button-group button {
    height: 90%;
}

@media (max-width: 1000px) {
    .creator {
        width: 90vw;
        padding: 1.5rem;
    }

    .creator > div {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
/* Creator Closing */

.disclaimer {
    text-align: center;
    margin: 1rem 0;
}
.disclaimer p {
    font-size: 1rem;
}

/* Output Opening */
#output {
    position: fixed;
    top: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;                 /* hidden by default */
    flex-direction: column;        /* stack children vertically */
    align-items: center;           /* center horizontally */
    justify-content: center;       /* center vertically */
    padding: 20px;                 /* ensure some space from edges */
    overflow-y: auto;
}
#word-cloud {
    width: auto;
    height: auto;
    display: flex;                 /* use flexbox for centering */
    justify-content: center;       /* center horizontally */
    align-items: center;           /* center vertically */
    overflow: hidden;
}
#word-cloud svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: auto;



    object-fit: contain;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
#output button {
    width: 300px;
}
/* Output Closing */