/**
 * 神子花の守護神診断『花守』
 * プラグイン用スタイルシート
 */

/* ============================================
   フォーム
============================================ */

/* フォーム全体 */
.hanamori-form {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.hanamori-title {
    color: #fff;
    font-size: 1.8em;
    text-align: center;
    margin: 0 0 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hanamori-form .toptxt {
    color: #fff;
    font-size: 1.4em;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 300;
    line-height: 1.8;
}

.detail-badge {
    display: inline-block;
    background: rgba(255,215,0,0.3);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-top: 10px;
}

/* フォーム要素 */
.hanamori-form .form {
    margin-bottom: 25px;
    text-align: center;
}

.hanamori-form select {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background: #fff;
    margin: 0 5px;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hanamori-form select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.hanamori-form select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* チェックボックス */
.hanamori-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.hanamori-form label {
    color: #fff;
    font-size: 16px;
    vertical-align: middle;
}

/* 性別選択 */
.hanamori-form .gender-select {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.hanamori-form .gender-select > label {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
}

.hanamori-form .radio-group {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.hanamori-form .radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.hanamori-form .radio-group label {
    cursor: pointer;
    font-size: 16px;
}

/* 送信ボタン */
.hanamori-form .submitBtn {
    text-align: center;
    margin-top: 30px;
}

.hanamori-form .send {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.hanamori-form .send:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

.hanamori-form .send:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   結果表示
============================================ */

.hanamori-result {
    max-width: 800px;
    margin: 60px auto;
    padding: 0;
}

.hanamori-result .result-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px 20px 0 0;
}

.hanamori-result .result-header h2 {
    font-size: 2em;
    color: #8b4513;
    margin: 0 0 15px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hanamori-result .birth-info {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

/* 神様カード */
.hanamori-result .kami-card {
    background: #fff;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}

.hanamori-result .kami-main-info {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.hanamori-result .kami-title {
    font-size: 1.2em;
    margin: 0 0 20px 0;
    font-weight: 300;
    opacity: 0.9;
}

.hanamori-result .kami-name {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 25px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.3;
}

.hanamori-result .kami-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hanamori-result .suukon-badge,
.hanamori-result .element-badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hanamori-result .suukon-badge {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.hanamori-result .element-badge {
    color: #fff;
}

/* 詳細情報 */
.hanamori-result .kami-details {
    padding: 40px;
}

.hanamori-result .detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.hanamori-result .detail-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.hanamori-result .detail-icon {
    font-size: 2em;
    margin-right: 20px;
    min-width: 50px;
    text-align: center;
}

.hanamori-result .detail-content {
    flex: 1;
}

.hanamori-result .detail-content h4 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 1.1em;
    font-weight: bold;
}

.hanamori-result .detail-content p {
    margin: 0;
    color: #333;
    font-size: 1em;
    line-height: 1.7;
}

/* 詳細版専用セクション */
.hanamori-result .detail-section-header {
    text-align: center;
    margin: 40px 0 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
}

.hanamori-result .detail-section-header h3 {
    margin: 0;
    color: #8b4513;
    font-size: 1.5em;
    font-weight: bold;
}

/* プレミアム情報 */
.hanamori-result .detail-item.premium {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    border: 2px solid #667eea;
}

.hanamori-result .detail-item.premium .detail-content h4 {
    color: #4a5568;
}

.hanamori-result .detail-item.premium .detail-content p strong {
    color: #667eea;
    font-size: 1.2em;
}

.hanamori-result .detail-item.diagnosis {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* 言霊の特別スタイル */
.hanamori-result .detail-item.kotodama {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: 2px solid #f5576c;
}

.hanamori-result .kotodama-text {
    font-size: 1.2em !important;
    font-weight: bold;
    color: #8b4513 !important;
    font-style: italic;
}

/* 説明文の特別スタイル */
.hanamori-result .detail-item.description {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.hanamori-result .detail-item.description .detail-content p {
    font-size: 1.05em;
}

/* もう一度診断するボタン */
.hanamori-result .result-actions {
    text-align: center;
    margin: 40px 0;
}

.hanamori-result .btn-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.hanamori-result .btn-back:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

/* ============================================
   レスポンシブ対応
============================================ */

@media (max-width: 768px) {
    .hanamori-form {
        margin: 30px 20px !important;
        padding: 35px 25px !important;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
    
    .hanamori-result {
        margin: 20px 20px 60px 20px !important;
        padding: 0 !important;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
    
    .hanamori-title {
        font-size: 1.4em;
        line-height: 1.4;
    }
    
    .hanamori-form .toptxt {
        font-size: 1.2em;
        padding: 0 5px;
        margin-bottom: 25px;
    }
    
    .hanamori-form .form {
        padding: 0 5px;
        margin-bottom: 20px;
    }
    
    .hanamori-form select {
        min-width: 60px;
        padding: 10px 12px;
        font-size: 14px;
        margin: 5px 3px;
    }
    
    .hanamori-form .gender-select {
        margin: 20px 5px;
        padding: 18px 15px;
    }
    
    .hanamori-form .radio-group {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .hanamori-form .submitBtn {
        margin-top: 25px;
        padding: 0 5px;
    }
    
    .hanamori-form .send {
        width: 100%;
        padding: 14px 30px;
        font-size: 16px;
    }
    
    .hanamori-result .result-header {
        padding: 30px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .hanamori-result .result-header h2 {
        font-size: 1.6em;
        line-height: 1.4;
    }
    
    .hanamori-result .birth-info {
        font-size: 1em;
    }
    
    .hanamori-result .kami-main-info {
        padding: 30px 20px;
    }
    
    .hanamori-result .kami-name {
        font-size: 1.8em;
        line-height: 1.4;
        word-break: keep-all;
    }
    
    .hanamori-result .kami-meta {
        gap: 10px;
    }
    
    .hanamori-result .suukon-badge,
    .hanamori-result .element-badge {
        font-size: 0.95em;
        padding: 8px 18px;
    }
    
    .hanamori-result .kami-details {
        padding: 25px 20px 40px 20px;
    }
    
    .hanamori-result .detail-item {
        flex-direction: column;
        padding: 18px 15px;
        margin-bottom: 20px;
    }
    
    .hanamori-result .detail-icon {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 1.8em;
    }
    
    .hanamori-result .detail-content h4 {
        font-size: 1em;
    }
    
    .hanamori-result .detail-content p {
        font-size: 0.95em;
        line-height: 1.8;
    }
    
    .hanamori-result .kotodama-text {
        font-size: 1.1em !important;
    }
    
    .hanamori-result .result-actions {
        margin: 40px 20px 50px 20px;
        padding-bottom: 30px;
    }
    
    .hanamori-result .btn-back {
        padding: 14px 35px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
    }
}

/* 小さいスマホ用（iPhone SE など） */
@media (max-width: 375px) {
    .hanamori-form {
        margin: 25px 15px !important;
        padding: 30px 20px !important;
        width: calc(100% - 30px);
        max-width: calc(100% - 30px);
    }
    
    .hanamori-result {
        margin: 15px 15px 50px 15px !important;
        width: calc(100% - 30px);
        max-width: calc(100% - 30px);
    }
    
    .hanamori-title {
        font-size: 1.2em;
    }
    
    .hanamori-form .toptxt {
        font-size: 1.1em;
    }
    
    .hanamori-form select {
        min-width: 55px;
        padding: 8px 10px;
        font-size: 13px;
        margin: 3px 2px;
    }
    
    .hanamori-form .gender-select {
        padding: 15px 12px;
    }
    
    .hanamori-result .result-header h2 {
        font-size: 1.4em;
    }
    
    .hanamori-result .kami-name {
        font-size: 1.6em;
    }
    
    .hanamori-result .kami-details {
        padding: 20px 15px 35px 15px;
    }
    
    .hanamori-result .detail-item {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    .hanamori-result .result-actions {
        margin: 35px 15px 45px 15px;
    }
}

/* ============================================
   アニメーション
============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hanamori-form,
.hanamori-result {
    animation: fadeIn 0.6s ease-out;
}

.hanamori-result .detail-item {
    animation: fadeIn 0.8s ease-out;
}

.hanamori-result .detail-item:nth-child(1) { animation-delay: 0.1s; }
.hanamori-result .detail-item:nth-child(2) { animation-delay: 0.2s; }
.hanamori-result .detail-item:nth-child(3) { animation-delay: 0.3s; }
.hanamori-result .detail-item:nth-child(4) { animation-delay: 0.4s; }
.hanamori-result .detail-item:nth-child(5) { animation-delay: 0.5s; }
.hanamori-result .detail-item:nth-child(6) { animation-delay: 0.6s; }
.hanamori-result .detail-item:nth-child(7) { animation-delay: 0.7s; }
.hanamori-result .detail-item:nth-child(8) { animation-delay: 0.8s; }
.hanamori-result .detail-item:nth-child(9) { animation-delay: 0.9s; }
.hanamori-result .detail-item:nth-child(10) { animation-delay: 1.0s; }