/**
 * 相性診断モジュール スタイル
 */

/* コンテナ */
.wts-compatibility-container {
    max-width: 800px;
    margin: 0 auto;
}

.wts-compatibility-wrapper {
    background: white;
    border-radius: var(--wts-radius-lg);
    padding: 40px;
    box-shadow: var(--wts-shadow-lg);
}

/* ヘッダー */
.wts-compatibility-header {
    text-align: center;
    margin-bottom: 40px;
}

.wts-type-icon {
    font-size: 48px;
    display: inline-block;
    margin-right: 10px;
    animation: icon-bounce 2s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.wts-compatibility-description {
    font-size: 16px;
    color: var(--wts-text-secondary);
    margin-top: 10px;
}

/* 入力フォーム */
.wts-input-container {
    margin-bottom: 30px;
}

.wts-input-group {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
}

@media (max-width: 768px) {
    .wts-input-group {
        grid-template-columns: 1fr;
    }
    
    .wts-vs-symbol {
        text-align: center;
        margin: 20px 0;
    }
}

.wts-input-item {
    flex: 1;
}

.wts-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--wts-text-primary);
    margin-bottom: 8px;
}

.wts-label-icon {
    font-size: 20px;
}

.wts-input,
.wts-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--wts-radius-sm);
    font-size: 16px;
    transition: all 0.3s;
}

.wts-input:focus,
.wts-select:focus {
    outline: none;
    border-color: var(--wts-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wts-vs-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--wts-secondary);
    position: relative;
}

.wts-vs-symbol span {
    background: var(--wts-gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

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

/* 画像アップロード */
.wts-image-upload {
    text-align: center;
}

.wts-upload-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--wts-gradient-main);
    color: white;
    border: none;
    border-radius: var(--wts-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.wts-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--wts-shadow-md);
}

.wts-image-preview {
    margin-top: 10px;
    width: 150px;
    height: 150px;
    border: 2px dashed #e0e0e0;
    border-radius: var(--wts-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 10px auto 0;
}

.wts-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* ボタンコンテナ */
.wts-button-container {
    text-align: center;
    margin-top: 30px;
}

.wts-check-button {
    font-size: 18px;
    padding: 15px 40px;
    position: relative;
    overflow: hidden;
}

.wts-button-icon {
    font-size: 24px;
    margin-right: 10px;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* ローディング */
.wts-compatibility-loading {
    text-align: center;
    padding: 60px 0;
}

.wts-loading-heart {
    position: relative;
    width: 100px;
    height: 90px;
    margin: 0 auto 30px;
}

.wts-heart-container {
    position: relative;
    width: 100px;
    height: 90px;
    animation: heart-shake 1s ease-in-out infinite;
}

@keyframes heart-shake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.wts-heart {
    position: absolute;
    width: 50px;
    height: 45px;
    left: 25px;
    top: 0;
}

.wts-heart:before,
.wts-heart:after {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    width: 26px;
    height: 40px;
    background: var(--wts-secondary);
    border-radius: 50px 50px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.wts-heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

.wts-heart:nth-child(2) {
    animation: heart-beat 1s ease-in-out infinite;
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.wts-loading-text {
    font-size: 18px;
    color: var(--wts-text-secondary);
    animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 結果表示 */
.wts-compatibility-result {
    animation: result-fade-in 0.8s ease;
}

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

/* スコア表示 */
.wts-score-container {
    text-align: center;
    margin-bottom: 40px;
}

.wts-score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.wts-score-svg {
    transform: rotate(-90deg);
}

.wts-score-bg,
.wts-score-progress {
    fill: none;
    stroke-width: 10;
}

.wts-score-bg {
    stroke: #f0f0f0;
}

.wts-score-progress {
    stroke: url(#gradient);
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 2s ease;
}

.wts-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.wts-score-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--wts-primary);
}

.wts-score-percent {
    font-size: 24px;
    color: var(--wts-text-secondary);
}

.wts-score-rating {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wts-rating-emoji {
    font-size: 36px;
    animation: emoji-bounce 2s ease-in-out infinite;
}

@keyframes emoji-bounce {
    0%, 100% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.wts-rating-text {
    font-weight: 600;
    color: var(--wts-text-primary);
}

/* レーダーチャート */
.wts-radar-container {
    max-width: 400px;
    margin: 0 auto 40px;
    background: var(--wts-bg-light);
    padding: 20px;
    border-radius: var(--wts-radius-md);
}

/* メッセージ */
.wts-message-container {
    margin-bottom: 40px;
}

.wts-message-box,
.wts-advice-box {
    background: var(--wts-bg-light);
    padding: 24px;
    border-radius: var(--wts-radius-md);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.wts-message-box::before,
.wts-advice-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--wts-gradient-main);
}

.wts-message-box h3,
.wts-advice-box h4 {
    margin: 0 0 10px;
    color: var(--wts-primary);
}

.wts-compatibility-message,
.wts-compatibility-advice {
    line-height: 1.6;
    color: var(--wts-text-secondary);
}

/* アクション */
.wts-result-actions {
    text-align: center;
}

.wts-retry-button {
    margin-bottom: 20px;
}

/* シェアボタン */
.wts-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.wts-share-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wts-share-twitter {
    background: #000000;
}

.wts-share-facebook {
    background: #1877f2;
}

.wts-share-line {
    background: #00B900;
    font-size: 12px;
}

.wts-share-button:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--wts-shadow-lg);
}

/* 履歴 */
.wts-compatibility-history {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.wts-history-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--wts-text-primary);
}

.wts-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wts-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--wts-bg-light);
    border-radius: var(--wts-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.wts-history-item:hover {
    background: #e8e8e8;
    transform: translateX(5px);
}

.wts-history-names {
    font-weight: 500;
    color: var(--wts-text-primary);
}

.wts-history-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wts-history-score-value {
    font-weight: 700;
    color: var(--wts-primary);
}

.wts-history-date {
    font-size: 12px;
    color: var(--wts-text-muted);
}

.wts-no-history {
    text-align: center;
    color: var(--wts-text-muted);
    font-style: italic;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .wts-compatibility-wrapper {
        padding: 20px;
    }
    
    .wts-score-circle {
        width: 150px;
        height: 150px;
    }
    
    .wts-score-value {
        font-size: 36px;
    }
    
    .wts-radar-container {
        padding: 10px;
    }
}