@charset "utf-8";
/* CSS Document */
body,html { height: 100%; background-color: #000; margin: 0;}
        video,canvas { width: 100%; height: 100svh; transform: translate(-50%,-50%); position: fixed; top:50%; left: 50%; object-fit: cover; object-position: center;}
        #canvas1 { display: none;}
        canvas { display: none;}
        
        .create video { display: none;}
        .create #canvas2 { display: block;}
video { filter: grayscale(100%);}

.intro body:after,.create body:after { content: ""; display: block; width: 100%;height: 100%; position: fixed; top:0; left: 0; background-color: rgba(0,0,0,.4); /*background-image: url("../img/Spinner-1s-200px.svg");*/ background-repeat: no-repeat; background-position: center; background-size: 70px;}
.create.complete body:after { display: none;}

/* ローディングオーバーレイのスタイル */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    pointer-events: none; /* 早期表示してもクリックを阻害しない */
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
    font-family: "Noto Serif JP", serif;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #F54236;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 18px;
    margin: 0;
    color: white;
    font-weight: 400;
}

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

#contols { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; align-items: center;}
        .create #contols { display: none; }

#play { width: 80px; height: 80px; border-radius: 50%; border: 6px solid #FFF; box-sizing: border-box; display: block; cursor: pointer; touch-action: manipulation;}
        
div.div { width: 50px; height: 50px; border-radius: 50%; background-color: rgba(0,0,0,.3);}
#swap { background-image: url("../img/switch.svg"); background-position: center; background-repeat: no-repeat; background-size: 30px; cursor: pointer;}
#contols div { margin: 0 20px;}

/* 音楽再生ボタンのスタイル */
#music-controls {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 20px;
    z-index: 1000;
}

.create.complete #music-controls {
    display: flex;
}

.music-btn {
    padding: 0;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;background: none;
    transition: all 0.3s ease; width: 80px; height: 80px; background-size: 40px; background-position: center; background-repeat: no-repeat;  background-color: rgba(0,0,0,.1); text-indent: -9999px;
}

#play-music { background-image: url("../img/play.svg");}
#pause-music { background-image: url("../img/pause.svg");}

.music-btn:hover { opacity: 0.9; }

.music-btn:active { background-repeat: no-repeat; 
}

#download { position:absolute; top:20px; right: 20px; display: none; width: 50px; height: 50px; background-image: url("../img/download.svg"); background-repeat: no-repeat; background-position: center; background-size: 20px; cursor: pointer;background-color: rgba(0,0,0,0.59);border-radius: 50%;}
        #return { position:absolute; top:0px; left: 0px; display: none; width: 60px; height: 60px; background-image: url("../img/arrow.svg"); background-repeat: no-repeat; background-position: center; background-size: 24px; cursor: pointer;background-color: rgba(0,0,0,.1); border-radius: 0%;} 
        
        .create #download,.create #return { display: block;}
.create #download { display: none;}

h1 { width: 100%; text-align: center; transform: translateY(-50%); position: fixed; top:50%; left: 0; color: #000;font-weight: 400; font-family: "Noto Serif JP", serif; font-size: 5vw; transition: all 1s ease 0s; margin: 0; line-height: 1;}
.create h1 { opacity: 0;}

@media (orientation: portrait) {
  h1 { font-size: 10vw;}
}

/* 波形表示用のスタイル */
.waveform {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100px;
    background: transparent;
    border-radius: 10px;
    display: none;
    z-index: 999;
    max-width: 100%;
    box-sizing: border-box;
}

.create.complete .waveform {
    display: block;
}

.waveform.playing {
    display: block;
}

