/* Swiss Ranking Front Styles */

.swiss-ranking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fce4ec;
    border-radius: 10px;
    font-family: sans-serif;
}

/* スタート画面 */
.swiss-ranking-start {
    text-align: center;
    padding: 40px 20px;
}

.swiss-ranking-start-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #303f5a;
    margin-bottom: 15px;
}

.swiss-ranking-start-description {
    color: #666;
    margin-bottom: 20px;
}

.swiss-ranking-start-message {
    font-size: 1.2em;
    color: #e91e63;
    margin-bottom: 30px;
    line-height: 1.6;
}

.swiss-ranking-start-btn {
    background: #e91e63;
    color: #fff;
    border: none;
    padding: 18px 60px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.3);
}

.swiss-ranking-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

/* ヘッダー */
.swiss-ranking-header {
    text-align: center;
    margin-bottom: 20px;
}

.swiss-ranking-title {
    background: #303f5a;
    color: #fff;
    padding: 15px 40px;
    font-size: 1.5em;
    font-weight: bold;
    display: inline-block;
    border-radius: 0 0 30px 30px;
    position: relative;
}

.swiss-ranking-title::before,
.swiss-ranking-title::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: #303f5a;
}

.swiss-ranking-title::before {
    left: -20px;
    border-radius: 0 20px 0 0;
}

.swiss-ranking-title::after {
    right: -20px;
    border-radius: 20px 0 0 0;
}

.swiss-ranking-description {
    margin-top: 15px;
    color: #666;
}

/* プログレスバー */
.swiss-ranking-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.progress-text {
    color: #e91e63;
    font-weight: bold;
    white-space: nowrap;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e91e63, #f48fb1);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-percent {
    color: #666;
    white-space: nowrap;
    font-size: 0.9em;
}

/* バトルエリア */
.swiss-ranking-battle {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 20px;
}

.swiss-ranking-item-card {
    flex: 1;
    max-width: 300px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.swiss-ranking-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.swiss-ranking-item-card:active {
    transform: scale(0.98);
}

.swiss-ranking-item-card .item-image {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
}

.swiss-ranking-item-card .item-name {
    padding: 15px 10px 5px;
    font-weight: bold;
    text-align: center;
    font-size: 1.1em;
}

.swiss-ranking-item-card .item-category {
    padding: 0 10px 15px;
    text-align: center;
    color: #888;
    font-size: 0.85em;
}

.swiss-ranking-vs {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #e91e63;
}

/* 指示テキスト */
.swiss-ranking-instruction {
    text-align: center;
    color: #666;
    font-size: 0.95em;
}

/* 結果表示 */
.swiss-ranking-result {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.swiss-ranking-result h3 {
    margin: 0 0 20px;
    color: #303f5a;
    font-size: 1.4em;
}

.result-list {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 25px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-rank {
    font-size: 1.3em;
    font-weight: bold;
    color: #e91e63;
    min-width: 40px;
}

.result-rank.rank-1 {
    color: #ffd700;
    font-size: 1.5em;
}

.result-rank.rank-2 {
    color: #c0c0c0;
}

.result-rank.rank-3 {
    color: #cd7f32;
}

.result-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: bold;
}

.result-category {
    font-size: 0.85em;
    color: #888;
}

/* 結果ボタン */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.swiss-ranking-share-x {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.swiss-ranking-share-x:hover {
    background: #333;
}

.swiss-ranking-share-fb {
    background: #1877f2;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.swiss-ranking-share-fb:hover {
    background: #166fe5;
}

.swiss-ranking-retry {
    background: #e91e63;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.swiss-ranking-retry:hover {
    background: #c2185b;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .swiss-ranking-container {
        padding: 15px 10px;
        border-radius: 10px;
    }
    
    .swiss-ranking-battle {
        gap: 10px;
    }
    
    .swiss-ranking-item-card {
        max-width: 140px;
    }
    
    .swiss-ranking-item-card .item-name {
        font-size: 0.9em;
        padding: 10px 5px 3px;
    }
    
    .swiss-ranking-item-card .item-category {
        font-size: 0.75em;
        padding: 0 5px 10px;
    }
    
    .swiss-ranking-vs {
        font-size: 1.2em;
        padding: 0 5px;
    }
    
    .swiss-ranking-progress {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .progress-bar {
        order: 3;
        width: 100%;
        flex: none;
    }
    
    .swiss-ranking-title {
        font-size: 1.2em;
        padding: 12px 25px;
    }
    
    .swiss-ranking-start {
        padding: 30px 15px;
    }
    
    .swiss-ranking-start-title {
        font-size: 1.4em;
    }
    
    .swiss-ranking-start-message {
        font-size: 1em;
    }
    
    .swiss-ranking-start-btn {
        padding: 15px 40px;
        font-size: 1.1em;
    }
}

/* ========================================
   カラーテーマ
   ======================================== */

/* スタンダード（standard）- 紫系 */
.swiss-ranking-container.theme-standard {
    background: #f8f9ff;
}
.theme-standard .swiss-ranking-start-title,
.theme-standard .swiss-ranking-title {
    color: #667eea;
}
.theme-standard .swiss-ranking-start-message {
    color: #764ba2;
}
.theme-standard .swiss-ranking-start-btn,
.theme-standard .swiss-ranking-item-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}
.theme-standard .swiss-ranking-progress {
    background: #eef1ff;
}

/* ロマンティック（romantic）- ピンク系 */
.swiss-ranking-container.theme-romantic {
    background: #fff5f8;
}
.theme-romantic .swiss-ranking-start-title,
.theme-romantic .swiss-ranking-title {
    color: #e84393;
}
.theme-romantic .swiss-ranking-start-message {
    color: #fd79a8;
}
.theme-romantic .swiss-ranking-start-btn,
.theme-romantic .swiss-ranking-item-card {
    background: linear-gradient(135deg, #e84393 0%, #fd79a8 100%);
    box-shadow: 0 5px 20px rgba(232, 67, 147, 0.3);
}
.theme-romantic .swiss-ranking-progress {
    background: #ffe3ec;
}

/* ビジネス（business）- ネイビー×ゴールド */
.swiss-ranking-container.theme-business {
    background: #f8f9fa;
}
.theme-business .swiss-ranking-start-title,
.theme-business .swiss-ranking-title {
    color: #2c3e50;
}
.theme-business .swiss-ranking-start-message {
    color: #c9a227;
}
.theme-business .swiss-ranking-start-btn,
.theme-business .swiss-ranking-item-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 5px 20px rgba(44, 62, 80, 0.3);
}
.theme-business .swiss-ranking-progress {
    background: #eef0f2;
}

/* シンプル（simple）- モノトーン */
.swiss-ranking-container.theme-simple {
    background: #f5f5f5;
}
.theme-simple .swiss-ranking-start-title,
.theme-simple .swiss-ranking-title {
    color: #333333;
}
.theme-simple .swiss-ranking-start-message {
    color: #666666;
}
.theme-simple .swiss-ranking-start-btn,
.theme-simple .swiss-ranking-item-card {
    background: linear-gradient(135deg, #333333 0%, #666666 100%);
    box-shadow: 0 5px 20px rgba(51, 51, 51, 0.3);
}
.theme-simple .swiss-ranking-progress {
    background: #e8e8e8;
}

/* パステル（pastel）- 淡い紫×青 */
.swiss-ranking-container.theme-pastel {
    background: #f8f7ff;
}
.theme-pastel .swiss-ranking-start-title,
.theme-pastel .swiss-ranking-title {
    color: #a29bfe;
}
.theme-pastel .swiss-ranking-start-message {
    color: #74b9ff;
}
.theme-pastel .swiss-ranking-start-btn,
.theme-pastel .swiss-ranking-item-card {
    background: linear-gradient(135deg, #a29bfe 0%, #74b9ff 100%);
    box-shadow: 0 5px 20px rgba(162, 155, 254, 0.3);
}
.theme-pastel .swiss-ranking-progress {
    background: #f0efff;
}

/* ナチュラル（natural）- グリーン系 */
.swiss-ranking-container.theme-natural {
    background: #f5faf7;
}
.theme-natural .swiss-ranking-start-title,
.theme-natural .swiss-ranking-title {
    color: #27ae60;
}
.theme-natural .swiss-ranking-start-message {
    color: #2ecc71;
}
.theme-natural .swiss-ranking-start-btn,
.theme-natural .swiss-ranking-item-card {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.3);
}
.theme-natural .swiss-ranking-progress {
    background: #e8f5ec;
}
