/*
Theme Name: Billion FX
Theme URI: https://tensei.co.jp/
Author: TENSEI Inc.
Author URI: https://tensei.co.jp/
Description: Billion FX Platform Theme
Version: 1.0.1
License: Proprietary
Text Domain: billion-fx
*/

/* ========================================
   Base Styles
   ======================================== */
body {
    font-family: 'Noto Sans JP', sans-serif;
}

/* ========================================
   Background Gradient Effects (Responsive)
   - Used in app shell & login page
   ======================================== */

/* 上部グラデーション (共通シェル用) */
.bfx-bg-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12rem; /* h-48 */
    background: linear-gradient(to bottom, rgba(74, 222, 128, 0.1), transparent);
    pointer-events: none;
}

@media (min-width: 640px) {
    .bfx-bg-gradient-top {
        height: 16rem; /* sm:h-64 */
    }
}

@media (min-width: 768px) {
    .bfx-bg-gradient-top {
        height: 20rem; /* md:h-80 */
    }
}

@media (min-width: 1024px) {
    .bfx-bg-gradient-top {
        height: 24rem; /* lg:h-96 */
    }
}

.dark .bfx-bg-gradient-top {
    background: linear-gradient(to bottom, rgba(74, 222, 128, 0.05), transparent);
}

/* 右上の円形ぼかし */
.bfx-bg-blur-right {
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 8rem;
    height: 8rem;
    background-color: rgba(76, 81, 191, 0.05);
    border-radius: 9999px;
    filter: blur(24px);
    pointer-events: none;
}

@media (min-width: 640px) {
    .bfx-bg-blur-right {
        top: -4rem;
        right: -4rem;
        width: 12rem;
        height: 12rem;
        background-color: rgba(76, 81, 191, 0.1);
        filter: blur(40px);
    }
}

@media (min-width: 768px) {
    .bfx-bg-blur-right {
        top: -5rem;
        right: -5rem;
        width: 16rem;
        height: 16rem;
    }
}

@media (min-width: 1024px) {
    .bfx-bg-blur-right {
        top: -6rem;
        right: -6rem;
        width: 20rem;
        height: 20rem;
    }
}

.dark .bfx-bg-blur-right {
    background-color: rgba(76, 81, 191, 0.1);
}

@media (min-width: 640px) {
    .dark .bfx-bg-blur-right {
        background-color: rgba(76, 81, 191, 0.2);
    }
}

/* 左下の円形ぼかし */
.bfx-bg-blur-left {
    display: none;
    position: absolute;
    bottom: -4rem;
    left: -4rem;
    width: 12rem;
    height: 12rem;
    background-color: rgba(74, 222, 128, 0.05);
    border-radius: 9999px;
    filter: blur(40px);
    pointer-events: none;
}

@media (min-width: 640px) {
    .bfx-bg-blur-left {
        display: block;
    }
}

@media (min-width: 768px) {
    .bfx-bg-blur-left {
        bottom: -6rem;
        left: -6rem;
        width: 16rem;
        height: 16rem;
        background-color: rgba(74, 222, 128, 0.1);
    }
}

@media (min-width: 1024px) {
    .bfx-bg-blur-left {
        bottom: -8rem;
        left: -8rem;
        width: 20rem;
        height: 20rem;
    }
}

.dark .bfx-bg-blur-left {
    background-color: rgba(74, 222, 128, 0.1);
}

/* ========================================
   Login Page Specific Styles (Responsive)
   ======================================== */

/* ログインコンテナ */
.bfx-login-container {
    position: relative;
    width: 100%;
    max-width: 24rem; /* max-w-sm */
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 640px) {
    .bfx-login-container {
        max-width: 28rem; /* max-w-md */
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .bfx-login-container {
        max-width: 32rem; /* max-w-lg */
        padding: 3rem 2rem;
    }
}

/* マスコット画像サイズ */
.bfx-mascot-wrapper {
    width: 7rem;
    height: 7rem;
}

@media (min-width: 640px) {
    .bfx-mascot-wrapper {
        width: 9rem;
        height: 9rem;
    }
}

@media (min-width: 768px) {
    .bfx-mascot-wrapper {
        width: 11rem;
        height: 11rem;
    }
}

/* ログインタイトル */
.bfx-login-title {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;
    margin-bottom: 0.375rem;
    text-align: center;
    letter-spacing: -0.025em;
}

@media (min-width: 640px) {
    .bfx-login-title {
        font-size: 1.875rem; /* text-3xl */
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 768px) {
    .bfx-login-title {
        font-size: 2.25rem; /* text-4xl */
    }
}

/* ログインフォームカード */
.bfx-login-form {
    padding: 1rem;
    border-radius: 0.75rem;
}

@media (min-width: 640px) {
    .bfx-login-form {
        padding: 1.5rem;
        border-radius: 1rem;
    }
}

@media (min-width: 768px) {
    .bfx-login-form {
        padding: 2rem;
        border-radius: 1rem;
    }
}

/* フォーム入力フィールド */
.bfx-input {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

@media (min-width: 640px) {
    .bfx-input {
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
        font-size: 1rem;
        border-radius: 0.75rem;
    }
}

/* ログインボタン */
.bfx-login-btn {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

@media (min-width: 640px) {
    .bfx-login-btn {
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
        font-size: 1rem;
        border-radius: 0.75rem;
    }
}

@media (min-width: 768px) {
    .bfx-login-btn {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* 装飾アイコン */
.bfx-decor-icon {
    padding: 0.375rem;
    border-radius: 0.5rem;
}

@media (min-width: 640px) {
    .bfx-decor-icon {
        padding: 0.5rem;
        border-radius: 0.75rem;
    }
}

.bfx-decor-icon .material-icons-round {
    font-size: 1.125rem;
}

@media (min-width: 640px) {
    .bfx-decor-icon .material-icons-round {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) {
    .bfx-decor-icon .material-icons-round {
        font-size: 1.5rem;
    }
}

/* ========================================
   Animations & Micro-interactions
   ======================================== */

/* Subtle bounce for active nav items */
@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s ease-in-out infinite;
}

/* Count up animation helper */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-count-up {
    animation: countUp 0.6s ease-out forwards;
}

/* Fade in up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Staggered animation delays */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Skeleton loading */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

/* Pulse glow effect */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(74, 222, 128, 0); }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Celebration confetti burst */
@keyframes confetti-fall {
    0% { transform: translateY(-100%) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 0;
    animation: confetti-fall 3s linear forwards;
    z-index: 9999;
    pointer-events: none;
}

/* Success celebration */
@keyframes celebration-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.animate-celebration-pop {
    animation: celebration-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Fire effect for streak */
@keyframes fire-flicker {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    25% { transform: scale(1.05) rotate(2deg); }
    50% { transform: scale(0.98) rotate(-1deg); }
    75% { transform: scale(1.02) rotate(1deg); }
}

.animate-fire {
    animation: fire-flicker 0.5s ease-in-out infinite;
}

/* Safe area for notched devices */
.safe-area-bottom {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass-effect {
    background: rgba(15, 23, 42, 0.8);
}

/* Ripple effect for buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 1;
    transition: 0s;
}

/* ========================================
   Daily Login Bonus Calendar
   ======================================== */

.login-bonus-day {
    transition: all 0.3s ease;
}

.login-bonus-day.collected {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.login-bonus-day.today {
    border: 2px solid #4ade80;
    animation: pulse-glow 2s infinite;
}

.login-bonus-day.future {
    opacity: 0.5;
}
