/* ================================================
   基本設定とカラーパレット
   ================================================ */
:root {
    /* ロゴの色味に合わせたポップなカラーパレット */
    --color-blue: #87CEEB;
    --color-pink: #FFB6C1;
    --color-yellow: #FFE87C;
    --color-cream: #FFFACD;
    --color-lavender: #E6E6FA;
    --color-mint: #98FFE0;
    
    /* メインカラー */
    --primary-color: #FF69B4;
    --secondary-color: #87CEEB;
    --accent-color: #FFD700;
    
    /* テキストカラー */
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    
    /* 背景 */
    --bg-gradient: linear-gradient(135deg, var(--color-blue) 0%, var(--color-pink) 50%, var(--color-yellow) 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    
    /* シャドウ */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
    
    /* アニメーション */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================================================
   全体設定
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Poppins', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 動くドット背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 25px 25px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

/* ================================================
   画面制御
   ================================================ */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.5s ease;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ================================================
   コンテナとカード
   ================================================ */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.5);
    animation: cardPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cardPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ================================================
   ロゴ
   ================================================ */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 100%;
    max-width: 500px;
    height: auto;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.logo-small {
    width: 100%;
    max-width: 300px;
    height: auto;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ================================================
   タイポグラフィ
   ================================================ */
.screen-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.screen-description {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 500;
}

.participants-info {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 105, 180, 0.1);
    border-radius: 15px;
}

.participants-info i {
    margin-right: 8px;
}

/* ================================================
   フォームとインプット
   ================================================ */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

input[type="text"] {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 3px solid var(--secondary-color);
    border-radius: 15px;
    outline: none;
    transition: var(--transition-normal);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.2);
    transform: scale(1.02);
}

/* ================================================
   ボタン
   ================================================ */
.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: 'Noto Sans JP', sans-serif;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #FF1493);
    color: var(--text-light);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #4682B4);
    color: var(--text-light);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(135, 206, 235, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 200px;
}

/* ================================================
   メンバーリスト
   ================================================ */
.member-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--color-lavender), var(--color-mint));
    border-radius: 15px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.member-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.member-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.delete-member-btn {
    background: #FF6B6B;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.delete-member-btn:hover {
    background: #FF5252;
    transform: scale(1.1);
}

/* ================================================
   数字グリッド
   ================================================ */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 10px;
}

.number-button {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--color-cream), var(--color-yellow));
    border: 3px solid var(--accent-color);
    border-radius: 20px;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.number-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.number-button:hover::after {
    width: 150px;
    height: 150px;
}

.number-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.number-button.selected {
    background: linear-gradient(135deg, var(--primary-color), #FF1493);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: scale(1.05);
    animation: pulse 0.6s ease;
}

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

/* ================================================
   結果カード（フリップアニメーション）
   ================================================ */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    padding: 10px;
}

.result-card {
    aspect-ratio: 0.7;
    perspective: 1000px;
    cursor: pointer;
}

.result-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.result-card.flipped .result-card-inner {
    transform: rotateY(180deg);
}

.result-card-front,
.result-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    font-weight: 900;
    border: 4px solid;
}

/* 裏面（数字が見えている状態） */
.result-card-front {
    background: linear-gradient(135deg, var(--color-yellow), var(--accent-color));
    border-color: var(--accent-color);
    color: var(--text-dark);
}

.result-card-front .card-label {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.result-card-front .card-number {
    font-size: 4rem;
    line-height: 1;
}

/* 表面（名前が隠れている状態 → めくると表示） */
.result-card-back {
    background: linear-gradient(135deg, var(--primary-color), #FF1493);
    border-color: var(--primary-color);
    color: var(--text-light);
    transform: rotateY(180deg);
    padding: 20px;
}

.result-card-back .card-label {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.result-card-back .card-name {
    font-size: 1.8rem;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
}

.result-card:hover .result-card-inner {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ================================================
   エフェクト
   ================================================ */
#effect-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.celebration-effect {
    position: absolute;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: celebrate 2s ease-out forwards;
    pointer-events: none;
}

@keyframes celebrate {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ================================================
   スクロールバーのカスタマイズ
   ================================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF1493;
}

/* ================================================
   レスポンシブ対応
   ================================================ */
@media (max-width: 768px) {
    .card {
        padding: 25px;
        border-radius: 20px;
    }
    
    .screen-title {
        font-size: 2rem;
    }
    
    .screen-description {
        font-size: 1rem;
    }
    
    .logo {
        max-width: 300px;
    }
    
    .logo-small {
        max-width: 200px;
    }
    
    .number-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 10px;
    }
    
    .number-button {
        font-size: 1.5rem;
    }
    
    .result-cards {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .result-card-front .card-number {
        font-size: 3rem;
    }
    
    .result-card-back .card-name {
        font-size: 1.4rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
        min-width: auto;
    }
    
    .input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .screen-title {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .number-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .number-button {
        font-size: 1.2rem;
    }
    
    .result-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ================================================
   チュートリアル機能
   ================================================ */

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

@keyframes modalPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-logo {
    margin-bottom: 20px;
}

.modal-logo img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.modal-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-buttons .btn {
    width: 100%;
}

/* チュートリアルコンテナ */
.tutorial-container {
    max-width: 700px;
    margin: 0 auto;
}

/* チュートリアルキャラクター */
.tutorial-character {
    text-align: center;
    margin-bottom: 30px;
    animation: slideInDown 0.6s ease;
}

@keyframes slideInDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.character-img {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

/* 吹き出し */
.speech-bubble {
    position: relative;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px 25px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    max-width: 500px;
    border: 3px solid var(--primary-color);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 20px solid var(--primary-color);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 17px solid var(--card-bg);
}

.speech-bubble p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
}

/* チュートリアルコンテンツ */
.tutorial-content {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 25px;
    min-height: 350px;
}

.tutorial-step {
    display: none;
    animation: fadeInContent 0.5s ease;
}

.tutorial-step.active {
    display: block;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.tutorial-subtitle {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 25px;
    text-align: center;
    color: var(--primary-color);
}

/* Step 1: カードデモ */
.tutorial-cards-demo {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.demo-card {
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-yellow), var(--accent-color));
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    animation: cardWave 1.5s ease-in-out infinite;
}

.demo-card:nth-child(1) { animation-delay: 0s; }
.demo-card:nth-child(2) { animation-delay: 0.2s; }
.demo-card:nth-child(3) { animation-delay: 0.4s; }
.demo-card:nth-child(4) { animation-delay: 0.6s; }

@keyframes cardWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.demo-card.question {
    background: linear-gradient(135deg, var(--primary-color), #FF1493);
    border-color: var(--primary-color);
    color: var(--text-light);
}

/* Step 2: マスターのヒント */
.master-tips {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.tip-box {
    background: linear-gradient(135deg, var(--color-lavender), var(--color-mint));
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

.tip-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

.example-box {
    background: var(--accent-color);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 3px dashed var(--text-dark);
}

.example-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    opacity: 0.7;
}

.example-text {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0;
    text-align: center;
}

/* Step 3: 番号選択デモ */
.tutorial-number-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.tutorial-number-btn {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--color-cream), var(--color-yellow));
    border: 3px solid var(--accent-color);
    border-radius: 20px;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.tutorial-number-btn:hover {
    transform: scale(1.1);
}

.tutorial-number-btn.highlight {
    animation: highlightPulse 1.5s ease-in-out infinite;
    border-width: 5px;
}

@keyframes highlightPulse {
    0%, 100% {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
}

.tutorial-number-btn.selected {
    background: linear-gradient(135deg, var(--primary-color), #FF1493);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.tutorial-hint {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 20px;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Step 4: カードフリップデモ */
.tutorial-result-area {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.tutorial-card {
    width: 200px;
    height: 280px;
    perspective: 1000px;
    cursor: pointer;
}

.tutorial-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.tutorial-card.flipped .tutorial-card-inner {
    transform: rotateY(180deg);
}

.tutorial-card-front,
.tutorial-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    font-weight: 900;
    border: 4px solid;
    padding: 20px;
}

.tutorial-card-front {
    background: linear-gradient(135deg, var(--color-yellow), var(--accent-color));
    border-color: var(--accent-color);
    color: var(--text-dark);
}

.tutorial-card-front .card-label {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.tutorial-card-front .card-number {
    font-size: 5rem;
    line-height: 1;
}

.tutorial-card-back {
    background: linear-gradient(135deg, var(--primary-color), #FF1493);
    border-color: var(--primary-color);
    color: var(--text-light);
    transform: rotateY(180deg);
}

.tutorial-card-back .card-label {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tutorial-card-back .card-name {
    font-size: 2.5rem;
    line-height: 1.3;
    text-align: center;
}

/* チュートリアルコントロール */
.tutorial-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tutorial-progress {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.progress-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 105, 180, 0.3);
    transition: var(--transition-normal);
}

.progress-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary-color);
}

.tutorial-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-ghost {
    background: transparent;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ヘルプボタン */
.help-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #4682B4);
    color: var(--text-light);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    z-index: 100;
}

.help-button:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-lg);
}

.help-button:active {
    transform: scale(1.05);
}

/* レスポンシブ - チュートリアル */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-logo img {
        width: 150px;
    }
    
    .character-img {
        width: 100px;
    }
    
    .speech-bubble {
        padding: 15px 20px;
    }
    
    .speech-bubble p {
        font-size: 1rem;
    }
    
    .tutorial-content {
        padding: 25px 20px;
        min-height: 300px;
    }
    
    .tutorial-subtitle {
        font-size: 1.5rem;
    }
    
    .tutorial-cards-demo {
        gap: 10px;
    }
    
    .demo-card {
        width: 60px;
        height: 80px;
        font-size: 2rem;
    }
    
    .tutorial-number-grid {
        gap: 15px;
    }
    
    .tutorial-number-btn {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .tutorial-card {
        width: 160px;
        height: 220px;
    }
    
    .tutorial-card-front .card-number {
        font-size: 4rem;
    }
    
    .tutorial-card-back .card-name {
        font-size: 2rem;
    }
    
    .help-button {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tutorial-cards-demo {
        gap: 8px;
    }
    
    .demo-card {
        width: 50px;
        height: 65px;
        font-size: 1.5rem;
    }
    
    .tutorial-number-grid {
        gap: 10px;
    }
    
    .tutorial-number-btn {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .example-text {
        font-size: 1.1rem;
    }
    
    .tip-text {
        font-size: 1rem;
    }
}
