/* LoL セリフ当てクイズ - スタイルシート */

:root {
    --primary-color: #C89B3C;
    --secondary-color: #0397AB;
    --accent-color: #D13639;
    --bg-dark: #010A13;
    --bg-card: #1E2328;
    --text-light: #A09B8C;
    --text-white: #F0E6D2;
    --success-color: #00D084;
    --error-color: #D13639;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #010A13 0%, #0A1428 100%);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
}

/* ヘッダー（共通スタイルと統合） */
header {
    background: rgba(1, 10, 19, 0.9);
    border-bottom: 2px solid var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: 0 2px 10px rgba(200, 155, 60, 0.3);
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(200, 155, 60, 0.5);
    font-weight: 700;
}

/* ナビゲーション（共通スタイルと統合） */
.main-nav {
    background: rgba(1, 10, 19, 0.8);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(200, 155, 60, 0.2);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(200, 155, 60, 0.1);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* 画面遷移 */
.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

/* タイトル */
.game-title {
    font-size: 2.5rem;
    text-align: center;
    margin: 40px 0 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.game-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 30px;
}

/* 統計カード */
.stats-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    border: 1px solid rgba(200, 155, 60, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 進捗メッセージ */
.progress-message {
    text-align: center;
    padding: 15px;
    background: rgba(200, 155, 60, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 30px;
    color: var(--text-white);
}

/* ボタン */
.btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #D4AF37);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 155, 60, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-white);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(200, 155, 60, 0.1);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), #E74C3C);
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(209, 54, 57, 0.4);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.3rem;
}

/* 遊び方 */
.how-to-play {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.how-to-play h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.how-to-play ul {
    list-style: none;
    padding: 0;
}

.how-to-play li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-light);
}

.how-to-play li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* クイズ画面 */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-back {
    background: var(--bg-card);
    color: var(--text-white);
    border: 1px solid rgba(200, 155, 60, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(200, 155, 60, 0.1);
    transform: translateX(-3px);
}

.quiz-info {
    color: var(--text-light);
    font-size: 1rem;
}

/* セリフカード */
.quote-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 2px solid rgba(200, 155, 60, 0.3);
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.quote-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-white);
    font-style: italic;
}

/* 選択肢 */
.choices {
    display: grid;
    gap: 15px;
}

.choice-btn {
    background: var(--bg-card);
    color: var(--text-white);
    border: 2px solid rgba(200, 155, 60, 0.3);
    padding: 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.choice-btn:hover {
    background: rgba(200, 155, 60, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.choice-btn.correct {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.choice-btn.incorrect {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.choice-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 結果画面 */
.result-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    margin-top: 40px;
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.result-answer {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 30px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(200, 155, 60, 0.05);
    border-radius: 8px;
}

.result-stat-item {
    text-align: center;
}

.result-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.result-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.generation-notice {
    background: linear-gradient(135deg, var(--accent-color), #E74C3C);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

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

/* キャラ生成画面 */
.screen-title {
    text-align: center;
    font-size: 2rem;
    margin: 40px 0 30px;
    color: var(--primary-color);
}

.generation-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#character-canvas,
#character-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    margin: 20px 0;
    cursor: pointer;
    /* 画像として保存しやすくする */
    user-select: none;
    -webkit-user-select: none;
}

/* 長押しメニューを有効化（img要素の場合） */
#character-image {
    -webkit-touch-callout: default;
    -webkit-user-drag: auto;
}

/* キャンバスは右クリックメニューを有効化 */
#character-canvas {
    -webkit-touch-callout: default;
}

.generation-info {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 10px;
}

.generation-actions {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.generation-stats {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.generation-stats div {
    margin: 5px 0;
}

/* コレクション画面 */
.collection-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.collection-stats {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    color: var(--text-light);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.collection-item {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.collection-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(200, 155, 60, 0.3);
}

.collection-item canvas {
    width: 100%;
    height: auto;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 8px;
}

.collection-item-info {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
}

.collection-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-white);
}

#modal-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 20px;
}

.modal-info {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }

    .stats-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    #character-canvas,
    #modal-canvas {
        width: 100%;
    }
}
