@import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
    --primary-color: #FFC0CB; /* Pink */
    --secondary-color: #FF69B4; /* HotPink */
    --accent-color: #FF1493; /* DeepPink */
    --background-color: #FFF0F5; /* LavenderBlush */
    --text-color: #333;
    --white-color: #fff;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* ページのコンテンツを上揃えに変更 */
    min-height: 100vh;
    padding: 20px;
}

#app-container {
    width: 100%;
    max-width: 800px;
}

.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

header {
    background-color: var(--primary-color);
    padding: 20px;
    text-align: center;
    color: var(--white-color);
}

header h1 {
    font-family: 'Mochiy Pop One', sans-serif;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1rem;
}

main {
    padding: 30px;
}

h2 {
    font-family: 'Mochiy Pop One', sans-serif;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
}

.privacy-warning {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.privacy-warning p {
    margin: 5px 0;
}

#form-start .user-inputs {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.user-input {
    width: 48%;
    background: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
}

.user-input h3, .relationship-input h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-align: center;
}

input[type="text"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.relationship-input {
    margin-bottom: 30px;
}

button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

#page-questions p {
    text-align: center;
    margin-bottom: 20px;
}

#questions-container .question {
    background: #f9f9f9;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--secondary-color);
}

.answers-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.answer-box {
    width: 100%;
}

.answer-box h3 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 5px;
}

.char-counter {
    font-size: 0.8rem;
    text-align: right;
    color: #888;
    margin-bottom: 10px;
}

.share-container {
    margin-top: 30px;
    text-align: left;
}

.share-url-box {
    margin-bottom: 15px;
}

.share-url-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--secondary-color);
}

.share-input-group {
    display: flex;
}

.share-input-group input {
    width: 70%;
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.share-input-group button {
    width: 30%;
    padding: 10px;
    font-size: 0.9rem;
    display: inline-block;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#btn-get-report {
    margin-top: 20px;
}

#report-container .report {
    background: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

#report-container h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

#btn-restart {
    margin-top: 20px;
    background-color: var(--primary-color);
}

#loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--secondary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    color: #aaa;
}

@media (max-width: 600px) {
    #form-start .user-inputs, .answers-container {
        flex-direction: column;
    }
    .user-input, .answer-box {
        width: 100%;
    }
    .share-input-group input {
        width: 60%;
    }
    .share-input-group button {
        width: 40%;
    }
}

.question-block {
    background: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

#questions-container .question {
    background: none;
    padding: 0;
    margin-bottom: 15px;
}

.answers-container {
    margin-top: 0;
}

/* Report Container Styles */
#report-container {
    background-color: #fffafc;
    border-radius: 12px;
    padding: 25px 40px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: #5c5c5c;
}

#report-container h1,
#report-container h2,
#report-container h3,
#report-container h4 {
    font-family: 'Georgia', serif;
    color: #d16091;
    border-bottom: 2px solid #fceef5;
    padding-bottom: 8px;
    margin-top: 24px;
    margin-bottom: 16px;
}

#report-container h1 { font-size: 2em; }
#report-container h2 { font-size: 1.6em; }
#report-container h3 { font-size: 1.3em; }
#report-container h4 { font-size: 1.1em; color: #ea86b6; }


#report-container p {
    line-height: 1.9;
    font-size: 1.05em;
    margin-bottom: 1.2em;
}

#report-container a {
    color: #ea86b6;
    text-decoration: none;
    border-bottom: 1px dotted #ea86b6;
    transition: all 0.3s;
}

#report-container a:hover {
    color: #d16091;
    border-bottom-style: solid;
}

#report-container blockquote {
    background-color: #fdf5f9;
    border-left: 5px solid #ea86b6;
    margin: 1.5em 10px;
    padding: 1em 1.5em;
    color: #7a7a7a;
    font-style: italic;
}

#report-container ul,
#report-container ol {
    padding-left: 25px;
    margin-bottom: 1.2em;
}

#report-container li {
    margin-bottom: 0.8em;
    line-height: 1.8;
}

#report-container code {
    background-color: #fceef5;
    color: #c5397f;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

#report-container pre {
    background-color: #fceef5;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

#report-container pre code {
    background-color: transparent;
    padding: 0;
}

#report-container strong {
    color: #d16091;
    font-weight: 700;
}

.description.card {
    background-color: var(--white-color);
    border-left: 10px solid var(--primary-color);
}

.description {
    color: var(--text-color);
    padding: 30px 30px 30px 40px;
    text-align: left;
}

.description h2 {
    color: var(--secondary-color);
    text-shadow: none;
    text-align: left;
}

.description p {
    font-size: 1rem;
    line-height: 1.8;
}

.links {
    padding: 30px 30px 30px 40px;
}

.links h2 {
    color: var(--secondary-color);
    text-shadow: none;
    text-align: left;
}

.links ul {
    list-style: none;
    padding: 0;
}

.links li {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.7;
}

.links a {
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}