body {
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #0a1628, #1a2947);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Arial', sans-serif;
}

/* サイトヘッダー */
.site-header {
    background-color: #111827;
    padding: 1rem 1rem;
    margin-bottom: 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.125rem;
    transition: opacity 0.3s;
}

.header-link:hover {
    opacity: 0.8;
}

.header-logo {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.container {
    text-align: center;
    position: relative;
    margin-top: 80px;
    margin-bottom: 40px;
    padding: 20px;
}

h1 {
    color: #ffd700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    font-size: 3em;
    font-weight: bold;
    animation: titleGlow 2s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

@keyframes titleGlow {
    from {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 60px rgba(255, 215, 0, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.5);
    }
    to {
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 50px rgba(255, 215, 0, 0.8),
            0 0 80px rgba(255, 215, 0, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.5);
    }
}

canvas {
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

/* 雪の結晶 */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 1em;
    animation: fall linear infinite;
    opacity: 0.8;
    z-index: 1;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

.message {
    color: #ffd700;
    font-size: 1.2em;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.message small {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    color: #ffed4e;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* プレゼントモーダル */
.gift-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.gift-modal-content {
    background: linear-gradient(135deg, #0f3d26 0%, #1a5f3a 50%, #2d7a4f 100%);
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(255, 215, 0, 0.3);
    position: relative;
    animation: slideIn 0.5s ease-out;
    text-align: center;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gift-animation {
    font-size: 5em;
    animation: bounce 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

.gift-modal-content h2 {
    color: #ffd700;
    margin: 20px 0;
    font-size: 1.8em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-info {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loading {
    color: #2d7a4f;
    font-size: 1.2em;
    animation: pulse 1.5s ease-in-out infinite;
}

.gift-detail h3 {
    color: #1a5f3a;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gift-description {
    color: #333;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 15px 0;
}

.gift-price {
    color: #dc143c;
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.error {
    color: #dc143c;
    font-size: 1.1em;
}

.error p {
    margin: 10px 0;
}

.close-btn {
    background: linear-gradient(to bottom, #ffd700, #ffaa00);
    color: #0f3d26;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin: 20px auto 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    display: block;
}

.close-btn:hover {
    background: linear-gradient(to bottom, #ffed4e, #ffd700);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.close-btn:active {
    transform: scale(0.95);
}
/* ミュートボタン */
.mute-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.mute-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mute-btn:active {
    transform: scale(0.95);
}/* リセチE��ボタン */
.reset-btn {
    margin: 30px auto 20px;
    padding: 10px 30px;
    font-size: 1em;
    font-weight: bold;
    background: linear-gradient(to bottom, #ff4444, #cc0000);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
    transition: all 0.3s;
    animation: bounceIn 0.5s;
    display: block;
}

.reset-btn:hover {
    background: linear-gradient(to bottom, #ff6666, #ff0000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.6);
}

.reset-btn:active {
    transform: translateY(0);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 称号スタイル */
.title-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    color: #8b0000;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.3em;
    font-weight: bold;
    border: 3px solid #ff8c00;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                0 0 40px rgba(255, 215, 0, 0.4),
                inset 0 2px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8),
                 0 -1px 1px rgba(139, 0, 0, 0.3);
    animation: titleShine 2s ease-in-out infinite;
    position: relative;
}

.title-badge::before {
    content: '🏆';
    margin-right: 8px;
}

.title-badge::after {
    content: '🏆';
    margin-left: 8px;
}

@keyframes titleShine {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                    0 0 40px rgba(255, 215, 0, 0.4),
                    inset 0 2px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1),
                    0 0 60px rgba(255, 215, 0, 0.6),
                    inset 0 2px 0 rgba(255, 255, 255, 0.7);
    }
}

/* 称号コンテナ */
.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* 称号サブタイトル */
.title-subtitle {
    color: #ffed4e;
    font-size: 0.9em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    opacity: 0.9;
}

/* 統計情報 */
.stats-display {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffd700;
    font-size: 1.1em;
}

.stat-label {
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.stat-value {
    font-size: 1.2em;
    color: #ffed4e;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    font-weight: bold;
}

/* 称号リスト */
.title-list {
    margin-top: 30px;
    padding: 20px;
    background: rgba(15, 61, 38, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.title-list h3 {
    color: #ffd700;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.title-stats {
    text-align: center;
    margin-bottom: 20px;
}

.title-stat-item {
    font-size: 1.125rem;
    color: #cbd5e1;
    font-weight: bold;
}

.title-stat-item span:last-child {
    color: #22c55e;
}

.title-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.title-card {
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.title-card.locked {
    opacity: 0.5;
    color: #94a3b8;
}

.title-card.unlocked {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.title-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.title-card-name {
    color: #ffd700;
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.title-card.locked .title-card-name {
    color: #64748b;
}

.title-card-subtitle {
    color: #ffed4e;
    font-size: 0.75em;
    margin-bottom: 8px;
    min-height: 2.5em;
    opacity: 0.9;
}

.title-card.locked .title-card-subtitle {
    color: #64748b;
}

.title-condition {
    color: #94a3b8;
    font-size: 0.7em;
    margin-top: 5px;
}

.title-card.unlocked .title-condition {
    color: #22c55e;
}
