body, html {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 500;
    color: #2f2f2f;
    font-style: normal;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2f2f2f;
    padding: 20px;
    font-family: "Zen Maru Gothic", serif;
    font-weight: 700;
}
.title-icon {
    width: 100px;
    height: 100px;
}

.content {
    flex: 1;
    padding: 20px;
}
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.top-section {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}
.section {
    flex: 1;
    padding: 70px 20px 20px;
    border: 0px solid #ddd;
    margin: 0 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center; 
}
.section h2 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
    padding: 10px;
    color: white;
    text-align: center;
    border-radius: 8px;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
}
.section:nth-child(1) h2 {
    background-color: #6B8E23;
    border-radius: 8px 8px 0 0; 
}

.section:nth-child(2) h2 {
    background-color: #4F6D7A;
    border-radius: 8px 8px 0 0; 
}

.section:nth-child(3) h2 {
    background-color: #a13329;
    border-radius: 8px 8px 0 0; 
}

.section:nth-child(4) h2 {
    background-color: #e06c3a;
    border-radius: 8px 8px 0 0; 
}


.stage-selection {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    gap: 20px; 
    width: 100%;
}

.background-preview {
    margin-top: 10px;
}

.background-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.forground-preview {
    margin-top: 10px;
}

.forground-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.preview {
    width: 640px;
    height: 360px;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    position: relative;
}
.preview img {
    max-width: 100%;
    max-height: 100%;
}
.generate-button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.generate-button-container button {
    height: 50px;
    font-size: 18px;
    font-weight: medium;
    color: white;
    background-color: #5D3A6D;
    border: none;
    border-radius: 8px;
    width: 150px;
    cursor: pointer;
    text-align: center;
}

.generate-button-container button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.generate-button-container button:hover:enabled {
    background-color: #4B2F59;
}

#removeForgroundButton {
    font-size: 12px;
    padding: 5px 10px;
}

.icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 100px;
    height: 100px;
}
.stage {
    width: 200px;
    height: 150px;
    margin: 10px;
}

button, select, .file-input-wrapper {
    font-family: "Zen Maru Gothic", serif;
    font-size: 16px;
    padding: 10px 15px;
    border: 0px solid #ccc;
    border-radius: 8px;
    background-color: #ccc;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover, select:hover, .file-input-wrapper:hover {
    background-color: #717171;
    color: #fff;
}


select {
    appearance: none; 
    padding-right: 40px; 
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-family: "Zen Maru Gothic", serif;
    font-size: 16px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #ccc;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

select:hover {
    background-color: #717171;
    color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    font-family: "Zen Maru Gothic", serif;
    font-size: 16px;
    font-weight: 400;
    padding: 10px 15px;
    border-radius: 8px;
    background-color: #ccc;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-wrapper .file-input-label {
    display: inline-block;
    color: inherit;
}

.file-input-wrapper:hover {
    background-color: #717171;
    color: #fff;
}

.footer {
    color: #666;
    text-align: center;
    padding: 10px;
    font-family: "Zen Maru Gothic", serif;
    font-weight: 400;
}

.terms-section {
    background-color: #f9f9f9;
    border-radius: 8px; 
    padding: 20px;
    margin: 40px auto;
    /* max-width: 800px;  */
}
.terms-section h2 {
    font-family: "Zen Maru Gothic", serif;
    font-weight: 700;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center; 
}
.terms-list {
    list-style-type: disc;
    font-weight: 400;
    padding-left: 20px;
    font-size: 1em;
}

.terms-list li {
    margin-bottom: 10px;
}

.rule-icon-type {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    gap: 10px;
    align-items: flex-start;
}

.rule-icon-type label {
    font-weight: 400;
    display: flex;
    align-items: center;
}

.icon-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hand-drawn-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.radio-label-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.annotation {
    font-size: 12px; 
    color: #666;
    margin-top: 2px;
    margin-left: 24px;
}