/*
 * 2. Base, Reset, Utilities & Animations
 * 基本スタイル、ユーティリティクラス、アニメーション定義を含みます。
 */

/* =========================================
   Base & Reset
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    
    background-color: var(--je-bg-primary);
    color: var(--je-text-primary);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    transition: background-color 0.3s, color 0.3s;
}

button {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--je-border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--je-text-secondary);
}

/* =========================================
   Utility Classes
   ========================================= */
.je-hidden {
    display: none !important; /* User Constraint: Overlay hidden class */
}

/* Flex Utilities */
.je-flex { display: flex; }
.je-flex-col { flex-direction: column; }
.je-items-center { align-items: center; }
.je-justify-center { justify-content: center; }
.je-justify-between { justify-content: space-between; }

/* Spacing Utilities */
.je-gap-sm { gap: var(--je-spacing-sm); }
.je-gap-md { gap: var(--je-spacing-md); }

/* Icon Sizes */
.je-icon { width: 16px; height: 16px; display: block; }
.je-icon-md { width: 20px; height: 20px; }
.je-icon-lg { width: 40px; height: 40px; }

/* =========================================
   Animations & Effects
   ========================================= */

/* Ripple Effect */
.je-ripple-container {
    position: relative;
    overflow: hidden;
}

.je-ripple-effect {
    position: absolute;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* Slide In */
.je-animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

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

/* Fade In */
.je-animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}