/* 連打王 CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 20%, #f093fb 40%, #f5576c 60%, #4facfe 80%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

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

.header-nav-mobile {
    display: none;
}

.nav-controls {
    display: flex;
    align-items: center;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, #f5576c, #f093fb, #4facfe, #00f2fe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowText 3s ease-in-out infinite;
    text-align: center;
    line-height: 1.2;
}

@keyframes rainbowText {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
}

/* メインコンテンツ */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ゲーム画面 */
.game-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
}

/* 状態表示エリア */
.status-area {
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}


.click-count {
    font-size: 4rem;
    font-weight: 900;
    color: #4facfe;
    text-shadow: 0 4px 20px rgba(79, 172, 254, 0.5);
    margin-bottom: 1rem;
    transition: all 0.1s ease;
}

.click-count.animate {
    transform: scale(1.1);
    color: #f5576c;
    text-shadow: 0 4px 20px rgba(245, 87, 108, 0.5);
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: #f093fb;
    margin-bottom: 1rem;
}

.game-message {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

/* ゲームボタンエリア */
.game-button-area {
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

.start-button, .click-button, .reset-button {
    width: 300px;
    height: 200px;
    border: none;
    border-radius: 30px;
    font-size: 2rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.start-button {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
}

.start-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.4);
}

.click-button {
    background: linear-gradient(45deg, #f5576c, #f093fb);
    color: white;
    animation: buttonPulse 1s ease-in-out infinite;
}

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

.click-button:active {
    transform: scale(0.95);
    background: linear-gradient(45deg, #f093fb, #4facfe);
}

.reset-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.reset-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.button-text {
    font-size: 1.8rem;
    font-weight: 900;
}

.button-icon {
    font-size: 2.5rem;
}

/* 結果表示エリア */
.result-area {
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.result-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.score-label {
    font-size: 1.5rem;
    color: #666;
    font-weight: 600;
}

.score-number {
    font-size: 4rem;
    font-weight: 900;
    color: #f5576c;
    text-shadow: 0 4px 20px rgba(245, 87, 108, 0.5);
}

.score-unit {
    font-size: 1.5rem;
    color: #666;
    font-weight: 600;
}

.result-message {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4facfe;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

/* 説明エリア */
.info-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 700;
}

.info-card ol, .info-card ul {
    padding-left: 1.5rem;
}

.info-card li {
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.6;
}

/* ユーティリティクラス */
.hidden {
    display: none !important;
}

/* フッター */
.footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: white;
    margin-top: 3rem;
}

.footer p {
    opacity: 0.8;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .header-nav-mobile {
        display: block;
        position: absolute;
        top: 1rem;
        left: 1rem;
        z-index: 10;
    }

    .home-button-mobile {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(102, 126, 234, 0.2);
        color: #667eea;
        text-decoration: none;
        border-radius: 20px;
        font-weight: 500;
        font-size: 0.85rem;
        transition: all 0.3s ease;
        border: 1px solid rgba(102, 126, 234, 0.3);
    }

    .home-button-mobile:hover {
        background: rgba(102, 126, 234, 0.3);
        transform: translateY(-1px);
    }

    .nav-controls {
        display: none;
    }

    .header h1 {
        font-size: 1.5rem;
        position: static;
        transform: none;
        text-align: center;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    .game-screen {
        padding: 2rem 1rem;
        border-radius: 20px;
    }

    .start-button, .click-button, .reset-button {
        width: 250px;
        height: 150px;
        font-size: 1.5rem;
    }

    .button-text {
        font-size: 1.3rem;
    }

    .button-icon {
        font-size: 2rem;
    }


    .click-count {
        font-size: 3rem;
    }

    .score-number {
        font-size: 3rem;
    }

    .info-area {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .start-button, .click-button, .reset-button {
        width: 200px;
        height: 120px;
        font-size: 1.2rem;
    }

    .button-text {
        font-size: 1rem;
    }

    .button-icon {
        font-size: 1.5rem;
    }


    .click-count {
        font-size: 2.5rem;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .result-score {
        flex-direction: column;
        gap: 0.5rem;
    }
}