/**
 * 推しキャラ診断モジュール スタイル
 */

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

/* スタート画面 */
.wts-diagnosis-start {
    text-align: center;
    padding: 60px 20px;
}

.wts-start-content {
    background: white;
    border-radius: var(--wts-radius-lg);
    padding: 40px;
    box-shadow: var(--wts-shadow-lg);
    position: relative;
    overflow: hidden;
}

.wts-diagnosis-title {
    margin-bottom: 20px;
    animation: title-glow 2s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(99, 102, 241, 0.5); }
    50% { text-shadow: 0 0 20px rgba(99, 102, 241, 0.8); }
}

.wts-diagnosis-description {
    font-size: 18px;
    color: var(--wts-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.wts-start-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.wts-deco-star,
.wts-deco-heart,
.wts-deco-sparkle {
    position: absolute;
    font-size: 24px;
    animation: float 6s ease-in-out infinite;
}

.wts-deco-star {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.wts-deco-heart {
    top: 20px;
    right: 20px;
    animation-delay: 2s;
}

.wts-deco-sparkle {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(10px) rotate(5deg); }
}

.wts-start-button {
    font-size: 20px;
    padding: 15px 40px;
    margin: 20px 0;
}

.wts-start-icon {
    font-size: 24px;
    margin-right: 10px;
    display: inline-block;
    animation: sparkle 2s infinite;
}

.wts-diagnosis-info {
    margin-top: 20px;
    color: var(--wts-text-muted);
    font-size: 14px;
}

/* プログレスバー */
.wts-progress-bar {
    background: #f0f0f0;
    height: 30px;
    border-radius: var(--wts-radius-full);
    position: relative;
    margin-bottom: 40px;
    overflow: hidden;
}

.wts-progress-fill {
    height: 100%;
    background: var(--wts-gradient-main);
    border-radius: var(--wts-radius-full);
    width: 0%;
    transition: width 0.5s ease;
}

.wts-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: var(--wts-text-primary);
    font-size: 14px;
}

/* 質問画面 */
.wts-questions-container {
    background: white;
    border-radius: var(--wts-radius-lg);
    padding: 40px;
    box-shadow: var(--wts-shadow-md);
    min-height: 400px;
}

.wts-question {
    animation: question-slide-in 0.5s var(--wts-ease-bounce);
}

@keyframes question-slide-in {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.wts-question-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--wts-text-primary);
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.4;
}

.wts-choices {
    display: grid;
    gap: 15px;
}

.wts-choice-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: var(--wts-radius-md);
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s var(--wts-ease-bounce);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    color: var(--wts-text-primary);
}

.wts-choice-card:hover {
    border-color: var(--wts-primary);
    transform: translateX(10px);
    box-shadow: var(--wts-shadow-md);
}

.wts-choice-card:active {
    transform: scale(0.98);
}

.wts-choice-card.selected {
    background: var(--wts-gradient-main);
    color: white;
    border-color: transparent;
}

.wts-choice-icon {
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.wts-choice-card:hover .wts-choice-icon,
.wts-choice-card.selected .wts-choice-icon {
    opacity: 1;
}

.wts-question-navigation {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.wts-prev-button {
    font-size: 16px;
}

/* ローディング画面 */
.wts-diagnosis-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.wts-loading-content {
    text-align: center;
}

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

.wts-circle-outer,
.wts-circle-inner {
    position: absolute;
    border-radius: 50%;
    border: 3px solid;
}

.wts-circle-outer {
    width: 100%;
    height: 100%;
    border-color: var(--wts-primary);
    animation: rotate 3s linear infinite;
}

.wts-circle-inner {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-color: var(--wts-secondary);
    animation: rotate 2s linear infinite reverse;
}

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

.wts-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wts-sparkle {
    position: absolute;
    font-size: 20px;
    animation: sparkle-orbit 4s linear infinite;
    animation-delay: calc(var(--i) * 0.5s);
}

@keyframes sparkle-orbit {
    0% {
        transform: rotate(calc(var(--i) * 45deg)) translateX(100px) rotate(calc(var(--i) * -45deg));
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(calc(var(--i) * 45deg + 360deg)) translateX(100px) rotate(calc(var(--i) * -45deg - 360deg));
        opacity: 0;
    }
}

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

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

/* 結果画面 */
.wts-diagnosis-result {
    animation: result-fade-in 0.8s ease;
}

@keyframes result-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.wts-result-header {
    text-align: center;
    margin-bottom: 40px;
}

.wts-result-subtitle {
    font-size: 18px;
    color: var(--wts-text-secondary);
    margin-top: 10px;
}

.wts-result-content {
    margin-bottom: 40px;
}

/* 結果カード */
.wts-result-card {
    background: white;
    border-radius: var(--wts-radius-lg);
    overflow: hidden;
    box-shadow: var(--wts-shadow-lg);
    margin-bottom: 20px;
    animation: result-card-appear 0.6s var(--wts-ease-bounce);
}

@keyframes result-card-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wts-result-card.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
}

.wts-result-card.rank-1 .wts-character-name,
.wts-result-card.rank-1 .wts-character-series {
    color: white;
}

.wts-result-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--wts-primary);
    box-shadow: var(--wts-shadow-md);
}

.wts-character-content {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 20px;
}

.wts-character-image {
    width: 150px;
    height: 150px;
    background: #f0f0f0;
    border-radius: var(--wts-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.wts-character-info {
    flex: 1;
}

.wts-character-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--wts-text-primary);
    margin-bottom: 5px;
}

.wts-character-series {
    font-size: 14px;
    color: var(--wts-text-secondary);
    margin-bottom: 15px;
}

.wts-character-description {
    line-height: 1.6;
    margin-bottom: 15px;
}

.wts-match-rate {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--wts-gradient-main);
    color: white;
    border-radius: var(--wts-radius-full);
    font-weight: 600;
}

.wts-match-rate-value {
    font-size: 24px;
}

/* スコア詳細（高性能アルゴリズム用） */
.wts-score-details {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--wts-radius-md);
}

.wts-score-details h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--wts-text-secondary);
}

.wts-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
}

.score-label {
    color: var(--wts-text-secondary);
}

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

/* 分析セクション（高性能アルゴリズム用） */
.wts-analysis {
    margin-top: 20px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--wts-radius-md);
    border-left: 4px solid var(--wts-primary);
}

.wts-analysis-section {
    margin-bottom: 15px;
}

.wts-analysis-section:last-child {
    margin-bottom: 0;
}

.wts-analysis-section h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--wts-primary);
}

.wts-analysis-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wts-analysis-section li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.wts-analysis-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--wts-success);
    font-weight: bold;
}

.wts-analysis-section p {
    margin: 0;
    line-height: 1.6;
    color: var(--wts-text-primary);
}

/* ランク1の結果カード用の調整 */
.wts-result-card.rank-1 .wts-score-details {
    background: rgba(255, 255, 255, 0.2);
}

.wts-result-card.rank-1 .score-label {
    color: rgba(255, 255, 255, 0.8);
}

.wts-result-card.rank-1 .score-value {
    color: white;
}

.wts-result-card.rank-1 .wts-analysis {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: white;
}

.wts-result-card.rank-1 .wts-analysis-section h4 {
    color: white;
}

.wts-result-card.rank-1 .wts-analysis-section p,
.wts-result-card.rank-1 .wts-analysis-section li {
    color: white;
}

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

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

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

.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);
    box-shadow: var(--wts-shadow-lg);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .wts-questions-container {
        padding: 20px;
    }
    
    .wts-question-text {
        font-size: 20px;
    }
    
    .wts-choice-card {
        font-size: 14px;
        padding: 15px;
    }
    
    .wts-character-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .wts-character-image {
        margin: 0 auto;
    }
}