@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');

:root {
    /* アニメーション関連の変数 */
    --animation-duration-short: 0.3s;
    --animation-duration-medium: 0.5s;
    --animation-duration-long: 0.8s;
    
    /* トランジション遅延の変数 */
    --transition-delay-base: 0.1s;
    --transition-delay-item: 0.2s;
    
    /* 色の変数 */
    --color-primary: #068AFE;
    --color-primary-light: #64B6FF;
    --color-text: #333;
    --color-white: #fff;
    --color-black: #000;
    
    /* ストライプの色 */
    --stripe-color-1: #FF3E3D;
    --stripe-color-2: #F79000;
    --stripe-color-3: #1DBE19;
    --stripe-color-4: #3069FF;
    --stripe-color-5: #7900FF;
    
    /* サイズと間隔の変数 */
    --spacing-small: 4px;
    --spacing-medium: 12px;
    --spacing-large: 24px;
    --border-radius: 9999px;
    --border-width: 4px;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

/* スプライトアニメーション関連のスタイル */
.sprite-container {
    position: absolute;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sprite-wrapper {
    position: absolute;
    width: 250px;
    height: 250px;
    transform-origin: center bottom;
    transition: transform 0.1s ease;
    overflow: hidden;
}

.sprite-wrapper.main {
    z-index: 10;
    width: 250px;
    height: 250px;
    overflow: hidden;
}

.sprite-wrapper.sub {
    z-index: 5;
    width: 250px;
    height: 250px;
    overflow: hidden;
}

.sprite-image {
    position: absolute;
    height: 250px;
    width: 1500px;
    object-fit: cover;
}

/* 環境ラベル */
.env-label {
    position: fixed;
    top: 0;
    right: 0;
    background-color: #ff9800;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
}

.env-development {
    background-color: #f44336;
}

.env-production {
    background-color: #4CAF50;
}

.env-staging {
    background-color: #2196F3;
}

/* ローディングオーバーレイ */
.dm-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dm-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.dm-loading-content {
    text-align: center;
}

.dm-loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border: 4px solid rgba(6, 138, 254, 0.2);
    border-top: 4px solid #068AFE;
    border-radius: 50%;
    animation: dm-spin 0.8s linear infinite;
}

@keyframes dm-spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

/* レースカー風スピナー */
.dm-loading-race {
    width: 80px;
    height: 40px;
    margin: 0 auto 20px;
    position: relative;
}

.dm-loading-race::before {
    content: '🏎️';
    font-size: 30px;
    position: absolute;
    animation: dm-race 2s ease-in-out infinite;
}

@keyframes dm-race {
    0% {
        left: -40px;
        transform: scaleX(1);
    }
    49% {
        transform: scaleX(1);
    }
    50% {
        left: 80px;
        transform: scaleX(-1);
    }
    99% {
        transform: scaleX(-1);
    }
    100% {
        left: -40px;
        transform: scaleX(1);
    }
}

/* パルススピナー */
.dm-loading-pulse {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.dm-loading-pulse::before,
.dm-loading-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    opacity: 0;
    animation: dm-pulse 2s ease-out infinite;
}

.dm-loading-pulse::after {
    animation-delay: 1s;
}

@keyframes dm-pulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.dm-loading-text {
    color: var(--color-text);
    font-size: 16px;
    font-weight: normal;
}

/* DMチェック完了前はメインコンテンツを非表示 */
body:not(.dm-check-completed) #main-content,
body:not(.dm-check-completed) .container,
body:not(.dm-check-completed) .contents {
    visibility: hidden;
}
