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

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #0a0e27 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   背景エフェクト
======================================== */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* スキャンライン */
.scanline {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f3ff, transparent);
    animation: scan 4s linear infinite;
    opacity: 0.3;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* パーティクル */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* ========================================
   メインコンテナ
======================================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   ヘッダー
======================================== */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 243, 255, 0.05);
    border: 2px solid #00f3ff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #00f3ff, #00d4ff, #00f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
    letter-spacing: 3px;
    animation: glow-pulse 2s ease-in-out infinite;
}

.subtitle {
    font-size: 1rem;
    color: #00f3ff;
    margin-top: 10px;
    opacity: 0.8;
}

/* BGMコントロール */
.bgm-control {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    display: inline-block;
}

.bgm-label {
    display: block;
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

.bgm-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.bgm-icon {
    font-size: 1.2rem;
}

.bgm-slider {
    width: 120px;
    height: 6px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.bgm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.bgm-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    border: none;
}

.bgm-value {
    color: #ffd700;
    font-size: 0.85rem;
    min-width: 40px;
    font-weight: bold;
}

/* 作成者リンク */
.creator-link {
    margin-top: 15px;
}

.creator-btn {
    display: inline-block;
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.creator-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
    transform: translateY(-2px);
}

/* ユーザーガイド */
.user-guide {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 10px;
}

.guide-item {
    color: #00f3ff;
    font-size: 0.9rem;
    margin: 8px 0;
    line-height: 1.5;
}

.guide-note {
    color: rgba(255, 165, 0, 0.9);
    font-size: 0.75rem;
    margin-top: 12px;
    line-height: 1.6;
    padding: 10px;
    background: rgba(255, 165, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.complete-view-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 2px solid #ffd700;
    color: #000;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: complete-btn-pulse 2s ease-in-out infinite;
}

.complete-view-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

@keyframes complete-btn-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}



/* ログインボーナス表示 */
.login-bonus-display {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

.login-days {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.ticket-countdown {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.countdown-item {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: #00f3ff;
    white-space: nowrap;
}

.countdown-item.soon {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.bonus-tickets {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ticket-item {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.85rem;
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ticket-item.available {
    animation: ticket-glow 1.5s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-item.available:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    border-color: #ffed4e;
}

.ticket-item.available:active {
    transform: translateY(-1px) scale(1.02);
}


@keyframes ticket-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}


@keyframes glow-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* ========================================
   タブナビゲーション
======================================== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.tab-btn.active {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
}

/* ========================================
   画面切り替え
======================================== */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* ========================================
   ガチャ画面
======================================== */
.gacha-container {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

/* カプセル */
.capsule-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    height: 300px;
}

.capsule {
    position: relative;
    width: 150px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.capsule:hover {
    transform: scale(1.05);
}

.capsule-top,
.capsule-bottom {
    position: absolute;
    width: 150px;
    height: 100px;
    border-radius: 75px 75px 0 0;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.3), rgba(0, 212, 255, 0.3));
    border: 3px solid #00f3ff;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.capsule-bottom {
    top: 100px;
    border-radius: 0 0 75px 75px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 180, 255, 0.3));
}

.capsule-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 230px;
    border-radius: 90px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.2), transparent);
    animation: capsule-glow 2s ease-in-out infinite;
}

@keyframes capsule-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* カプセル回転アニメーション */
.capsule.spinning {
    animation: spin 1s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(720deg); }
}

/* ボタンエリア */
.button-area {
    text-align: center;
}

.gacha-btn {
    position: relative;
    background: linear-gradient(135deg, #00f3ff, #00d4ff);
    border: none;
    color: #000;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.gacha-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.8);
}

.gacha-btn:active {
    transform: translateY(0);
}

.gacha-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: btn-shine 2s ease-in-out infinite;
}

@keyframes btn-shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.gacha-info,
.next-reset {
    margin-top: 15px;
    color: #00f3ff;
    font-size: 0.9rem;
}

/* 音量調節 */
.volume-control {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.volume-control label {
    color: #00f3ff;
    font-size: 0.9rem;
}

#volume-slider {
    width: 150px;
    height: 6px;
    background: rgba(0, 243, 255, 0.2);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00f3ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

#volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00f3ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

#volume-value {
    color: #00f3ff;
    font-size: 0.9rem;
    min-width: 45px;
}


/* ========================================
   開発モード
======================================== */
.dev-mode-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dev-mode-btn {
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid #ffa500;
    color: #ffa500;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dev-mode-btn:hover {
    background: rgba(255, 165, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
}

.dev-mode-btn.active {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.dev-mode-info {
    margin-top: 10px;
    color: rgba(255, 165, 0, 0.8);
    font-size: 0.8rem;
}

.dev-mode-btn.active + .dev-mode-info {
    color: rgba(0, 255, 0, 0.8);
}

.dev-login-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.dev-action-btn {
    background: rgba(100, 149, 237, 0.2);
    border: 2px solid #6495ed;
    color: #6495ed;
    padding: 8px 15px;
    font-size: 0.85rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dev-action-btn:hover {
    background: rgba(100, 149, 237, 0.3);
    box-shadow: 0 0 15px rgba(100, 149, 237, 0.5);
    transform: translateY(-2px);
}

.dev-action-btn:active {
    transform: translateY(0);
}


/* ========================================
   結果画面（オーバーレイ）
======================================== */
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.result-overlay.active {
    display: flex;
}

.result-card {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95), rgba(26, 26, 46, 0.95));
    border: 3px solid;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: result-appear 0.5s ease;
}

@keyframes result-appear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.result-rarity {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 10px;
}

.result-image-container {
    position: relative;
    margin: 20px auto;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    filter: drop-shadow(0 0 20px);
}

.result-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: result-glow 2s ease-in-out infinite;
}

@keyframes result-glow {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.result-name {
    font-size: 1.8rem;
    margin: 20px 0;
}

.result-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.result-new {
    display: inline-block;
    background: #ff4444;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    animation: pulse 1s ease-in-out infinite;
}

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

/* レアリティ別の色 */
.result-card.ur {
    border-color: #ff00ff;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 255, 255, 0.1));
}

.result-card.ssr {
    border-color: #ffd700;
}

.result-card.sr {
    border-color: #c0c0c0;
}

.result-card.r {
    border-color: #cd7f32;
}

.result-card.n {
    border-color: #808080;
}

/* UR特別演出 */
.ur-freeze-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    pointer-events: none;
}

.ur-freeze-overlay.active {
    animation: ur-darken 0.5s ease forwards;
}

@keyframes ur-darken {
    0% { background: rgba(0, 0, 0, 0); }
    100% { background: rgba(0, 0, 0, 0.95); }
}

.ur-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 1), rgba(255, 0, 255, 0.5), transparent);
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
}

.ur-flash.active {
    animation: ur-flash-effect 0.3s ease;
}

@keyframes ur-flash-effect {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

.ur-sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

/* レアリティ別のカプセル光り方 */
.capsule.glow-n .capsule-glow {
    background: radial-gradient(circle, rgba(128, 128, 128, 0.3), transparent);
    animation: glow-n 2s ease-in-out infinite;
}

.capsule.glow-r .capsule-glow {
    background: radial-gradient(circle, rgba(205, 127, 50, 0.5), transparent);
    animation: glow-r 2s ease-in-out infinite;
}

.capsule.glow-sr .capsule-glow {
    background: radial-gradient(circle, rgba(192, 192, 192, 0.7), transparent);
    animation: glow-sr 1.5s ease-in-out infinite;
}

.capsule.glow-ssr .capsule-glow {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9), transparent);
    animation: glow-ssr 1s ease-in-out infinite;
}

.capsule.glow-ur .capsule-glow {
    background: radial-gradient(circle, rgba(255, 0, 255, 1), rgba(0, 255, 255, 0.8), transparent);
    animation: glow-ur 0.5s ease-in-out infinite;
}

@keyframes glow-n {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes glow-r {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes glow-sr {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes glow-ssr {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
}

@keyframes glow-ur {
    0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.5) rotate(180deg); }
}


/* ========================================
   ボタン
======================================== */
.result-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00f3ff;
    color: #00f3ff;
    padding: 10px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

/* SNSシェアセクション */
.share-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 243, 255, 0.3);
}

.share-info {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 5px;
    text-align: center;
}

.share-note {
    color: rgba(255, 165, 0, 0.8);
    font-size: 0.75rem;
    margin-bottom: 15px;
    text-align: center;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.share-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn:hover {
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
    transform: translateY(-2px);
}

.share-icon {
    font-size: 1.2rem;
}

.share-line { border-color: rgba(0, 195, 0, 0.5); color: #00c300; }
.share-line:hover { border-color: #00c300; box-shadow: 0 0 15px rgba(0, 195, 0, 0.5); }

.share-twitter { border-color: rgba(29, 161, 242, 0.5); color: #1da1f2; }
.share-twitter:hover { border-color: #1da1f2; box-shadow: 0 0 15px rgba(29, 161, 242, 0.5); }

.share-instagram { border-color: rgba(228, 64, 95, 0.5); color: #e4405f; }
.share-instagram:hover { border-color: #e4405f; box-shadow: 0 0 15px rgba(228, 64, 95, 0.5); }

.share-tiktok { border-color: rgba(255, 0, 80, 0.5); color: #ff0050; }
.share-tiktok:hover { border-color: #ff0050; box-shadow: 0 0 15px rgba(255, 0, 80, 0.5); }

.share-facebook { border-color: rgba(66, 103, 178, 0.5); color: #4267b2; }
.share-facebook:hover { border-color: #4267b2; box-shadow: 0 0 15px rgba(66, 103, 178, 0.5); }

.share-copy { 
    border-color: rgba(128, 128, 128, 0.5); 
    color: #888;
    width: 100%;
}
.share-copy:hover { 
    border-color: #888; 
    box-shadow: 0 0 15px rgba(128, 128, 128, 0.5); 
}


/* ========================================
   コレクション画面
======================================== */
.collection-header {
    text-align: center;
    margin-bottom: 30px;
}

.collection-header h2 {
    font-size: 2rem;
    color: #00f3ff;
    margin-bottom: 10px;
}

.collection-progress {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.collection-item {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
}

.collection-item:hover {
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
    transform: translateY(-5px);
}

.collection-item.locked {
    opacity: 0.3;
}

.collection-item img {
    max-width: 60px;
    max-height: 60px;
    margin-bottom: 5px;
}

.collection-item-name {
    font-size: 0.7rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   コレクション詳細モーダル
======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95), rgba(26, 26, 46, 0.95));
    border: 3px solid #00f3ff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalAppear 0.4s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.5);
    color: #ff4444;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    transform: rotate(90deg);
}

.detail-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.detail-image {
    max-width: 400px;
    max-height: 400px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.detail-name {
    font-size: 2rem;
    color: #00f3ff;
    text-align: center;
    margin-bottom: 15px;
}

.detail-rarity {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.detail-description {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

/* ========================================
   コンプリート画面
======================================== */
.complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.complete-overlay.active {
    display: flex;
}

.complete-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 5px solid #ffd700;
    border-radius: 30px;
    padding: 50px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    animation: completeAppear 0.6s ease;
}

@keyframes completeAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    60% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.complete-title {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: completePulse 1.5s ease-in-out infinite;
}

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

.complete-message {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 30px;
}

.complete-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.complete-stats p {
    font-size: 1.2rem;
    color: #00f3ff;
    margin: 10px 0;
}

.share-info-complete {
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.btn-complete-close {
    background: linear-gradient(135deg, #00f3ff, #00d4ff);
    border: none;
    color: #000;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-complete-close:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.8);
}


/* ========================================
   図鑑画面
======================================== */
.info-header {
    text-align: center;
    margin-bottom: 30px;
}

.info-header h2 {
    font-size: 2rem;
    color: #00f3ff;
}

.rarity-section {
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid rgba(0, 243, 255, 0.2);
}

.rarity-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

.ur-title {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

.ssr-title {
    color: #ffd700;
    border-color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.sr-title {
    color: #c0c0c0;
    border-color: #c0c0c0;
}

.r-title {
    color: #cd7f32;
    border-color: #cd7f32;
}

.n-title {
    color: #808080;
    border-color: #808080;
}

.parts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.part-item {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.part-item:hover {
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.part-item h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #00f3ff;
}

.part-item p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* ========================================
   スマホ対応
======================================== */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .login-bonus-display {
        padding: 10px;
    }
    
    .login-days {
        font-size: 0.9rem;
    }
    
    .ticket-countdown {
        gap: 5px;
    }
    
    .countdown-item {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .bonus-tickets {
        gap: 5px;
    }
    
    .ticket-item {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gacha-container {
        padding: 20px 15px;
    }
    
    .capsule-container {
        height: 220px;
    }
    
    .capsule {
        width: 120px;
        height: 160px;
    }
    
    .capsule-top,
    .capsule-bottom {
        width: 120px;
        height: 80px;
        border-radius: 60px 60px 0 0;
    }
    
    .capsule-bottom {
        top: 80px;
        border-radius: 0 0 60px 60px;
    }
    
    .gacha-btn {
        padding: 12px 35px;
        font-size: 1rem;
    }
    
    .gacha-info,
    .next-reset {
        font-size: 0.8rem;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    #volume-slider {
        width: 100%;
    }
    
    .dev-mode-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .dev-mode-info {
        font-size: 0.7rem;
    }
    
    .dev-login-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .dev-action-btn {
        width: 100%;
        font-size: 0.8rem;
    }
    
    .result-card {
        padding: 25px 15px;
        max-width: 95%;
    }
    
    .result-rarity {
        font-size: 1.2rem;
    }
    
    .result-image-container {
        width: 200px;
        height: 200px;
    }
    
    .result-image {
        max-width: 150px;
        max-height: 150px;
    }
    
    .result-name {
        font-size: 1.4rem;
    }
    
    .result-description {
        font-size: 0.9rem;
    }
    
    .share-section {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .share-info {
        font-size: 0.9rem;
    }
    
    .share-note {
        font-size: 0.7rem;
    }
    
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .share-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .share-icon {
        font-size: 1rem;
    }
    
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .collection-item {
        padding: 8px;
    }
    
    .collection-item img {
        max-width: 50px;
        max-height: 50px;
    }
    
    .collection-item-name {
        font-size: 0.65rem;
    }
    
    .parts-list {
        grid-template-columns: 1fr;
    }
    
    .part-item {
        padding: 12px;
    }
    
    .part-item h4 {
        font-size: 0.95rem;
    }
    
    .part-item p {
        font-size: 0.8rem;
    }
    
    .creator-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .user-guide {
        padding: 12px;
    }
    
    .guide-item {
        font-size: 0.8rem;
        margin: 6px 0;
    }
    
    .guide-note {
        font-size: 0.7rem;
        padding: 8px;
    }
    
    .complete-view-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 25px 15px;
        max-width: 95%;
    }
    
    .detail-image {
        max-width: 100%;
        max-height: 300px;
    }
    
    .detail-name {
        font-size: 1.5rem;
    }
    
    .detail-rarity {
        font-size: 1rem;
    }
    
    .detail-description {
        font-size: 0.9rem;
    }
    
    .complete-card {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .complete-title {
        font-size: 1.8rem;
    }
    
    .complete-message {
        font-size: 1.1rem;
    }
    
    .complete-stats p {
        font-size: 1rem;
    }
    
    .share-info-complete {
        font-size: 1rem;
    }
    
    .btn-complete-close {
        padding: 12px 40px;
        font-size: 1rem;
    }
}

/* ========================================
   統計画面
======================================== */
.stats-header {
    text-align: center;
    margin-bottom: 30px;
}

.stats-header h2 {
    font-size: 2rem;
    color: #00f3ff;
    margin-bottom: 15px;
}

.save-status {
    margin: 10px 0;
    color: rgba(0, 243, 255, 0.8);
    font-size: 0.85rem;
}

.data-management {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.data-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff;
    padding: 12px 25px;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.data-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.export-btn {
    border-color: rgba(0, 255, 0, 0.5);
    color: #00ff00;
}

.export-btn:hover {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.import-btn {
    border-color: rgba(255, 165, 0, 0.5);
    color: #ffa500;
}

.import-btn:hover {
    border-color: #ffa500;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 243, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
}

.stat-card h3 {
    color: #00f3ff;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 243, 255, 0.3);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    color: #00f3ff;
    font-weight: bold;
}

.rarity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.rarity-stat-item {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid;
}

.rarity-stat-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.rarity-stat-count {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.rarity-stat-rate {
    font-size: 0.85rem;
    opacity: 0.8;
}

.ur-bg {
    background: rgba(255, 0, 255, 0.1);
    border-color: #ff00ff;
    color: #ff00ff;
}

.ssr-bg {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #ffd700;
}

.sr-bg {
    background: rgba(192, 192, 192, 0.1);
    border-color: #c0c0c0;
    color: #c0c0c0;
}

.r-bg {
    background: rgba(205, 127, 50, 0.1);
    border-color: #cd7f32;
    color: #cd7f32;
}

.n-bg {
    background: rgba(128, 128, 128, 0.1);
    border-color: #808080;
    color: #808080;
}

.progress-container {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(0, 243, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f3ff, #00d4ff);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 1.1rem;
    color: #00f3ff;
}

/* ========================================
   バッジ画面
======================================== */
.badges-header {
    text-align: center;
    margin-bottom: 30px;
}

.badges-header h2 {
    font-size: 2rem;
    color: #00f3ff;
    margin-bottom: 10px;
}

.badges-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.badge-item {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.badge-item.unlocked {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.badge-name {
    font-size: 1rem;
    font-weight: bold;
    color: #00f3ff;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.badge-item.unlocked .badge-name {
    color: #ffd700;
}

.badge-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.badge-status {
    margin-top: 10px;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 10px;
    display: inline-block;
}

.badge-status.unlocked {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.badge-status.locked {
    background: rgba(128, 128, 128, 0.2);
    border: 1px solid #808080;
    color: #808080;
}

/* ========================================
   ヘルプ画面
======================================== */
.help-header {
    text-align: center;
    margin-bottom: 30px;
}

.help-header h2 {
    font-size: 2rem;
    color: #00f3ff;
}

.help-content {
    max-width: 700px;
    margin: 0 auto;
}

.help-section {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 243, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.help-section h3 {
    color: #00f3ff;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.help-list {
    list-style: none;
    padding: 0;
}

.help-list li {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.help-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #00f3ff;
}

.help-list strong {
    color: #00f3ff;
}

.help-btn {
    background: rgba(255, 215, 0, 0.2) !important;
    border-color: #ffd700 !important;
    color: #ffd700 !important;
    font-weight: bold;
    width: 50px;
    padding: 12px 0;
}

.help-btn:hover {
    background: rgba(255, 215, 0, 0.3) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
}

.help-btn.active {
    background: rgba(255, 215, 0, 0.4) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7) !important;
}

/* ========================================
   保存通知・バッジ通知
======================================== */
.save-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 255, 0, 0.9);
    color: #000;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    z-index: 5000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.save-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.badge-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 165, 0, 0.95));
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 30px;
    z-index: 5000;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.badge-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.badge-notification-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.badge-notification-icon {
    font-size: 4rem;
    animation: badge-bounce 0.6s ease-in-out infinite;
}

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

.badge-notification-text {
    text-align: left;
}

.badge-notification-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 5px;
}

.badge-notification-name {
    font-size: 1.2rem;
    color: #333;
}
