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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#app {
    max-width: 480px;
    height: 100vh;
    margin: 0 auto;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

#app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    pointer-events: none;
}

/* ヘッダー */
#header {
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.9) 0%, rgba(31, 31, 31, 0.7) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.player-gold {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

/* メインコンテンツ */
#content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

.screen {
    display: none;
    padding: 20px;
    min-height: 100%;
    animation: fadeIn 0.3s ease-out;
}

.screen.active {
    display: block;
}

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

/* ホーム画面 */
.character-card {
    background: rgba(31, 31, 31, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.character-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.character-card h2 {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.character-info {
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.stat-row:hover {
    color: rgba(139, 92, 246, 0.9);
}

.exp-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 12px 0 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.exp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.equipped-weapon {
    margin-top: 16px;
}

.equipped-weapon h3 {
    font-size: 17px;
    margin-bottom: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.weapon-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.weapon-display:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.battle-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.battle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.battle-button:hover::before {
    left: 100%;
}

.battle-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

/* バトル画面 */
.battle-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.combatant {
    background: rgba(31, 31, 31, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.combatant:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.combatant h3 {
    font-size: 19px;
    margin-bottom: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hp-bar {
    height: 28px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.hp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

.hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.battle-log {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    overflow-y: auto;
    max-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.battle-log p {
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    padding: 4px 0;
    animation: slideIn 0.3s ease-out;
}

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

.battle-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

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

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.action-btn:disabled {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.action-btn:disabled::before {
    display: none;
}

/* 結果画面 */
.result-container {
    background: rgba(31, 31, 31, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.result-container h2 {
    font-size: 32px;
    margin-bottom: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rewards {
    font-size: 18px;
    margin-bottom: 28px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rewards p {
    margin-bottom: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.action-button {
    padding: 18px 36px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* 装備画面 */
.equip-container h2 {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.weapon-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.weapon-card {
    background: rgba(31, 31, 31, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.weapon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weapon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.weapon-card:hover::before {
    opacity: 1;
}

.weapon-card:active {
    transform: scale(0.98);
}

.weapon-card.selected {
    border: 2px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.weapon-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.weapon-stats {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.no-weapons {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 50px;
    font-size: 16px;
    font-weight: 500;
}

/* ガチャ画面 */
.gacha-container {
    background: rgba(31, 31, 31, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.gacha-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gacha-info {
    text-align: center;
    margin-bottom: 20px;
}

.gacha-info p {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.rarity-rates {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.rarity-rates h3 {
    font-size: 17px;
    margin-bottom: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.rate-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
    padding: 4px 0;
    transition: transform 0.2s ease;
}

.rate-item:hover {
    transform: translateX(4px);
}

.gacha-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.gacha-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.gacha-button:hover::before {
    left: 100%;
}

.gacha-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.gacha-button:disabled {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.gacha-button:disabled::before {
    display: none;
}

.gacha-result {
    margin-top: 20px;
    text-align: center;
}

.gacha-result-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 24px;
    animation: gachaReveal 0.6s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes gachaReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(180deg);
    }
    50% {
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

/* レアリティカラー */
.rarity-c { 
    color: #94a3b8;
    text-shadow: 0 0 10px rgba(148, 163, 184, 0.5);
}
.rarity-b { 
    color: #3b82f6;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}
.rarity-a { 
    color: #a855f7;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
}
.rarity-s { 
    color: #ec4899;
    text-shadow: 0 0 25px rgba(236, 72, 153, 0.8);
}
.rarity-ss { 
    color: #fbbf24;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.9);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* タブバー */
#tabBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(31, 31, 31, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    height: 65px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    width: 60%;
}

.tab-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.tab-btn:hover .tab-icon {
    transform: translateY(-2px);
}

.tab-btn.active .tab-icon {
    transform: scale(1.1);
}

.tab-btn span:last-child {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* レスポンシブデザイン */
@media (max-width: 480px) {
    #app {
        max-width: 100%;
        border-radius: 0;
    }
    
    #tabBar {
        max-width: 100%;
    }
}

/* ログイン画面 */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    z-index: 9999;
    animation: fadeIn 0.5s ease-out;
}

.login-box {
    background: rgba(31, 31, 31, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.login-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.login-form {
    position: relative;
    z-index: 1;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    -webkit-appearance: none;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.login-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
}

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

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.login-button:hover::before {
    left: 100%;
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.login-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

/* ダブルタップズーム防止のための追加スタイル */
button, input, select, textarea {
    touch-action: manipulation;
}

/* バトルアニメーション */
@keyframes attackAnimation {
    0% { transform: translateX(0) scale(1); }
    30% { transform: translateX(20px) scale(1.1); }
    50% { transform: translateX(-10px) scale(0.95); }
    100% { transform: translateX(0) scale(1); }
}

@keyframes defendAnimation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes evadeAnimation {
    0% { transform: translateX(0); opacity: 1; }
    25% { transform: translateX(-30px); opacity: 0.3; }
    75% { transform: translateX(30px); opacity: 0.3; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes damageAnimation {
    0% { transform: translateX(0); filter: brightness(1); }
    25% { transform: translateX(-5px); filter: brightness(2) hue-rotate(-10deg); }
    50% { transform: translateX(5px); filter: brightness(0.5); }
    75% { transform: translateX(-3px); filter: brightness(1.5); }
    100% { transform: translateX(0); filter: brightness(1); }
}

@keyframes criticalAnimation {
    0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
    20% { transform: scale(1.3) rotate(5deg); filter: brightness(2); }
    40% { transform: scale(0.9) rotate(-5deg); filter: brightness(1.5); }
    60% { transform: scale(1.2) rotate(3deg); filter: brightness(2.5); }
    80% { transform: scale(0.95) rotate(-2deg); filter: brightness(1.2); }
    100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}

@keyframes victoryAnimation {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-20px); }
    100% { transform: scale(1) translateY(0); }
}

@keyframes defeatAnimation {
    0% { transform: rotate(0deg) scale(1); opacity: 1; }
    100% { transform: rotate(-5deg) scale(0.9); opacity: 0.6; }
}

.combatant.attacking {
    animation: attackAnimation 0.5s ease-out;
}

.combatant.defending {
    animation: defendAnimation 0.5s ease-out;
}

.combatant.evading {
    animation: evadeAnimation 0.7s ease-out;
}

.combatant.damaged {
    animation: damageAnimation 0.5s ease-out;
}

.combatant.critical {
    animation: criticalAnimation 0.8s ease-out;
}

.combatant.victory {
    animation: victoryAnimation 1s ease-in-out infinite;
}

.combatant.defeat {
    animation: defeatAnimation 0.8s ease-out forwards;
}

/* ダメージ数値表示 */
.damage-number {
    position: absolute;
    font-size: 28px;
    font-weight: bold;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    animation: damageNumberFloat 1.5s ease-out forwards;
    z-index: 100;
}

.damage-number.critical {
    color: #ffaa00;
    font-size: 36px;
    animation: criticalDamageFloat 1.5s ease-out forwards;
}

.damage-number.miss {
    color: #888888;
    font-size: 24px;
}

@keyframes damageNumberFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    20% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(1);
        opacity: 0;
    }
}

@keyframes criticalDamageFloat {
    0% {
        transform: translateY(0) scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: translateY(-30px) scale(1.5) rotate(10deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1.3) rotate(-5deg);
    }
    100% {
        transform: translateY(-100px) scale(1) rotate(0deg);
        opacity: 0;
    }
}

/* エフェクト追加 */
.battle-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.slash-effect {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: slashAnimation 0.3s ease-out;
}

@keyframes slashAnimation {
    0% {
        transform: translate(-50%, -50%) rotate(45deg) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(45deg) scale(1.5);
        opacity: 0;
    }
}

.shield-effect {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(100, 150, 255, 0.8);
    border-radius: 50%;
    animation: shieldAnimation 0.6s ease-out;
}

@keyframes shieldAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}