body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 20px;
    background-color: #f5f5f5;
    color: #333;
    /* ダークでミステリアスな宇宙的背景に変更 */
    background-image: url('https://images.unsplash.com/photo-1566345984367-fa2ba5cedc17?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    position: relative;
}

/* 星のきらめき効果用のオーバーレイ */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: -1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 40px;
}

h1 {
    font-size: 42px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 0 0 20px rgba(150, 150, 255, 0.5);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(to right, transparent, #f0c755, transparent);
}

.container {
    background-color: rgba(20, 20, 40, 0.8);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 25px rgba(100, 100, 255, 0.2);
    padding: 30px;
    border: 1px solid rgba(120, 120, 200, 0.3);
    backdrop-filter: blur(5px);
    color: #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.container:hover {
    /* transform: translateY(-5px); */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(100, 100, 255, 0.3);
}

/* 入力フィールドの共通スタイル */
.name-input, .group-input, .gender-select {
    margin-bottom: 25px;
}

.name-input label, .group-input label, .gender-select > label {
    font-size: 18px;
    display: block;
    margin-bottom: 12px;
    color: #f0c755;
    font-weight: 500;
}

.name-input input, .group-input input {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    margin-top: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid #f0c755;
}

.name-input input:focus, .group-input input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(240, 199, 85, 0.4);
}

.name-input input::placeholder, .group-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 性別選択のスタイル */
.gender-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.gender-option {
    flex: 1;
    min-width: 120px;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option label {
    display: block;
    padding: 12px 15px;
    text-align: center;
    background-color: rgba(30, 30, 60, 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #e0e0e0;
    border: 1px solid transparent;
}

.gender-option label:hover {
    background-color: rgba(50, 50, 80, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.gender-option input[type="radio"]:checked + label {
    background-color: rgba(60, 60, 100, 0.9);
    color: #f0c755;
    border: 1px solid #f0c755;
    box-shadow: 0 0 15px rgba(240, 199, 85, 0.3);
}

.question {
    margin-bottom: 30px;
}

.question h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #f0c755;
    text-align: center;
    font-weight: bold;
    position: relative;
    padding-bottom: 12px;
}

.question h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(240, 199, 85, 0.6), transparent);
}

.choices-container {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    margin-top: 20px;
    height: 200px;
}

.choice {
    flex: 1;
    padding: 30px 30px;
    min-height: 120px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.4s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: pre-line;
    background-color: rgba(30, 30, 60, 0.7);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    position: relative;
    overflow: hidden;
    font-size: 20px;
}

.choice::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #8e6b2b, #f0c755);
    transform: scaleX(0);
    transition: transform 0.4s;
    transform-origin: left;
}

.choice:hover {
    background-color: rgba(50, 50, 80, 0.9);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(240, 199, 85, 0.3);
}

.choice:hover::before {
    transform: scaleX(1);
}

.choice.selected {
    background-color: rgba(60, 60, 100, 0.9);
    box-shadow: 0 0 20px rgba(240, 199, 85, 0.5);
    transform: translateY(-3px);
    border-top: 3px solid #f0c755;
}

.choice.selected::before {
    transform: scaleX(1);
}

.parameters {
    margin-top: 25px;
    display: none;
}

.parameter {
    margin-bottom: 20px;
}

.parameter-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.parameter-name span {
    font-size: 16px;
    color: #f0c755;
}

.parameter-bar {
    height: 12px;
    background-color: rgba(30, 30, 60, 0.7);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.parameter-value {
    height: 100%;
    background: linear-gradient(to right, #8e6b2b, #f0c755);
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    transition: width 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.result {
    display: none;
    text-align: center;
}

.result h2 {
    font-size: 32px;
    color: #f0c755;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(240, 199, 85, 0.3);
}

.job-card {
    border-radius: 12px;
    padding: 40px 30px;
    margin: 30px 0;
    background-color: rgba(40, 40, 80, 0.8);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(240, 199, 85, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.job-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(240, 199, 85, 0.05) 0%, rgba(20, 20, 40, 0) 70%);
    z-index: -1;
}

.job-title {
    font-size: 36px;
    margin: 15px 0;
    color: #f0c755;
    text-shadow: 0 0 10px rgba(240, 199, 85, 0.3);
    letter-spacing: 1px;
}

.job-icon {
    font-size: 70px;
    margin-bottom: 20px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.job-desc {
    margin: 25px auto;
    line-height: 1.8;
    font-size: 18px;
    max-width: 90%;
    color: #e0e0e0;
}

.job-params {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.job-param {
    margin: 0;
    font-size: 16px;
    background-color: rgba(30, 30, 60, 0.7);
    color: #f0c755;
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid rgba(240, 199, 85, 0.3);
    box-shadow: 0 0 10px rgba(240, 199, 85, 0.2);
    transition: all 0.3s;
}

.job-param:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 199, 85, 0.3);
}

.buttons {
    margin-top: 30px;
    text-align: center;
}

button {
    padding: 14px 32px;
    font-size: 18px;
    background: linear-gradient(135deg, #8e6b2b, #f0c755);
    color: #14142a;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(240, 199, 85, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

button:hover {
    background: linear-gradient(135deg, #f0c755, #8e6b2b);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(240, 199, 85, 0.5);
}

button:hover::before {
    left: 100%;
}

button:disabled {
    background: linear-gradient(135deg, #4a4a4a, #666666);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

button.secondary {
    background: linear-gradient(135deg, #323a45, #6c757d);
    margin-right: 15px;
    color: #fff;
}

button.secondary:hover {
    background: linear-gradient(135deg, #6c757d, #323a45);
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.question-number {
    text-align: center;
    margin-bottom: 20px;
    color: #f0c755;
    font-weight: bold;
    font-size: 18px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    border-radius: 20px;
    background-color: rgba(30, 30, 60, 0.7);
    box-shadow: 0 0 10px rgba(240, 199, 85, 0.2);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* アニメーション追加 */
.tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin-top: 5px;
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

.pulse-animation {
    animation: pulse-button 1.5s infinite;
}

@keyframes pulse-button {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(240, 199, 85, 0.6); }
    100% { transform: scale(1); }
}

.selected-animation {
    animation: choice-selected 0.5s;
}

@keyframes choice-selected {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(240, 199, 85, 0.7); }
    100% { transform: scale(1); }
}

.reveal-animation {
    animation: icon-reveal 1.5s;
}

@keyframes icon-reveal {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.param-reveal {
    animation: slide-in 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.desc-reveal {
    animation: fade-in 1s ease forwards;
    opacity: 0;
}

@keyframes slide-in {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ローディング */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 30, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
    color: #f0c755;
}

.loading-spinner i {
    font-size: 50px;
    margin-bottom: 20px;
}

.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(20, 20, 40, 0.9);
    border: 2px solid #ff6b6b;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    color: #fff;
    max-width: 80%;
}

.error-message i {
    font-size: 40px;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.error-message button {
    margin-top: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
}

.result-intro {
    font-size: 18px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

/* レスポンシブデザイン改善 */
@media (max-width: 600px) {

    body {
        padding: 0 10px;
        height: 100vh;
    }

    main {
        padding: 50px 0;
    }
    

    .choices-container {
        flex-direction: column;
        height: auto;
    }
    
    .choice {
        margin-bottom: 15px;
    }
    
    .job-params {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .job-param {
        width: 80%;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .container {
        padding: 20px;
    }

    .group-input,
    .name-input,
    .gender-select,
    .buttons {
        margin-bottom: 10px;
    }

    input[type="text"] {
        padding: 10px;
    }



 
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    button {
        font-size: 14px;
        padding: 12px;
    }
        
    button.secondary {
        margin-right: 0;
    }
    
    .gender-options {
        flex-direction: column;
    }

    .gender-option label {
        padding: 10px;
        font-size: 14px;
      }
    
    .gender-option {
        width: 100%;
    }
}