/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ベースコンテナ */
.zodiac-wrapper {
    min-height: 100vh;
    background: #2B0056;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* 上部からのレイアウトに変更 */
    padding-top: 5vh; /* 上部の余白を5%に設定 */
}

/* アニメーション */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes starFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
    50% { transform: translate(-10px, -15px) rotate(180deg); opacity: 1; }
}

@keyframes starFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    50% { transform: translate(15px, -20px) rotate(-180deg); opacity: 0.8; }
}

@keyframes starFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.9; }
    50% { transform: translate(-5px, -10px) rotate(90deg); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* メインコンテナ */
.main-container {
    width: 90%;
    max-width: 400px;
    background: rgba(74, 20, 140, 0.5);
    border-radius: 25px;
   padding: 15px; /* パディングを縮小 */
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    margin-top: 2vh; /* 上マージンを調整 */
}

/* タイトルセクション */
.title-container {
    text-align: center;
    margin: 0 auto;
    padding: 0; /* パディングを削除 */
}

.main-title {
    font-size: 2.2rem;
    background: linear-gradient(45deg, #FFD700, #FFF7CC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 0.3rem 0; /* 下のマージンを減らす */
    font-weight: bold;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
    animation: glowEffect 2s infinite alternate;
}

@keyframes glowEffect {
    from {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.7),
            0 0 20px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 215, 0, 0.3);  /* 黄金色の外光を追加 */
    }
    to {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 0.7),
            0 0 25px rgba(255, 255, 255, 0.4),
            0 0 35px rgba(255, 255, 255, 0.3),
            0 0 50px rgba(255, 215, 0, 0.2);  /* 黄金色の外光を追加 */
    }
}


.subtitle {
    font-size: 0.85rem; /* フォントサイズを少し小さく */
    color: #FFFFFF;
    margin: 0 0 2vh 0; /* 下マージンを調整 */
    padding: 0;
}


/* 入力フォームグループ */
.date-input-wrapper:first-child {
    margin-top: 15px;  /* 最初の入力フォームの上部マージンを追加 */
}

.date-input-wrapper {
    margin-bottom: 12px; /* フォーム間の余白を調整 */
}

/* ラベル部分 */
.input-label {
    position: relative;  /* 重なりの制御用 */
    width: auto;        /* 幅を内容に合わせる */
    padding: 12px;
    background: #9333EA;
    border-radius: 15px 15px 0 0;  /* 上部のみ角丸に */
    color: white;
    text-align: center;
    font-size: 15px;
    margin: 0;          /* マージンを削除 */
    display: inline-block;
    z-index: 2;         /* 入力欄より前面に表示 */
}

/* 日付入力フィールド */
.date-input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 15px 15px 15px;
    color: #FFFFFF !important; 
    font-size: 16px;
    height: 50px;  /* 固定の高さを設定 */
    box-sizing: border-box;
    -webkit-text-fill-color: #FFFFFF;  
    -webkit-appearance: none;  /* ネイティブのスタイルを削除 */
    appearance: none;
}

/* プレースホルダーのスタイル */
.date-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* 入力時のスタイル */
.date-input:focus,
.date-input:active,
.date-input:not(:placeholder-shown) {  /* プレースホルダーが表示されていない状態 */
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF;
}

/* カレンダーアイコンを白色に */
.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);  /* カレンダーアイコンを白色に */
    opacity: 0.7;
}


/* ボタン */
.submit-button {
    width: 100%;
    padding: 12px;
    background: #9333EA;
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 15px;
    cursor: pointer;
    margin-top: 12px;
    margin-bottom: 8px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 結果表示 */
.result-container {
    animation: fadeIn 0.5s ease-out;
    background: white;
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
}

.signs-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sign-info {
    text-align: center;
}

.sign-name {
    font-size: 18px;
    color: #4A148C;
    font-weight: 600;
    margin-bottom: 4px;
}

/* 星座の性質表示 */
.sign-element {
    font-size: 16px;
    color: #9933CC;     /* 紫色に変更 */
    margin-top: 4px;
   font-weight: 900;
}

.heart-icon {
    margin: 0 10px;
    color: #E91E63;
}

/* 相性レベル表示（上部） */
.compatibility-level {
    font-size: 34px;          /* フォントサイズをさらに大きく */
    color: #e4007f;          
    text-align: center;
    margin: 25px 0;
    font-weight: 1000;         /* より太く */
}

/* 相性度表示（下部） */
.compatibility-score {
    font-size: 26px;          /* フォントサイズを合わせる */
    color: #9933CC;           /* 紫色に統一 */
    text-align: center;
    margin: 20px 0;
    font-weight: 700;         /* より太く */
}

/* 詳細セクション全体のスタイル */
.compatibility-detail {
    background: rgba(243, 232, 255, 0.2);  /* より薄い背景色 */
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid rgba(153, 51, 204, 0.1);
}

/* 詳細タイトル */
.detail-title {
    color: #9933CC;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: left;
}

/* 詳細テキスト */
.detail-text {
    color: #330066;
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 0.05em;
}

/* 余分な要素を非表示に */
.compatibility-detail::before,
.compatibility-detail::after {
    display: none;
}

/* エラーメッセージ */
.error-message {
    color: #ff4081;
    text-align: center;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* 注意書きテキスト */
.note-text {
    color: #FFFFFF;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
    opacity: 0.7;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .main-container {
        width: 95%;
        padding: 25px 15px;
    }
}

/* モバイル対応 */
@media (max-width: 480px) {
    .date-input {
        font-size: 16px;  /* iOSでズームを防ぐ */
    }
}