@charset "utf-8";
@import url("./Reset_Stylesheet.css");

/* 変数（背景色） */
:root{
    --pattern1 : linear-gradient(to bottom, #B0E0E6, #4682B4, #000080);    /* パターン1（青色） */
    --pattern2 : linear-gradient(180deg, rgba(62,220,255,1) 0%, rgba(0,11,77,1)100%);    /* パターン2（深い青色） */
    --pattern3 : linear-gradient(180deg, rgba(162,255,247,1) 0%, rgba(231,255,153,1)100%);    /* パターン3（ライムグリーン） */
    --pattern4 : linear-gradient(180deg, rgba(215,221,226,1) 0%, rgba(71,165,169,1)100%);    /* パターン4（グリーングレー） */ 
    --pattern5 : linear-gradient(to bottom, #ffeee4, #f9f7fa, #d4dfff);    /* パターン5（ペール色・淡い色） */
    --pattern6 : linear-gradient(0deg,rgba(240, 222, 144, 1) 0%, rgba(252, 252, 252, 1) 30%, rgba(255, 255, 255, 1) 61%, rgba(247, 171, 57, 1) 100%);    /* パターン6（オレンジ色） */
    
    interpolate-size: allow-keywords;
}
/* z-index → #pc_cmt,#sp_cmt:10, .submarin:100, #fish_img:1000, .rock img:10000 */

body{
    background: var(--pattern3);
    box-sizing: border-box;
}
#aquarium {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
#wave{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.1) 70px,
      rgba(255, 255, 255, 0.05) 140px
  );
    mix-blend-mode: screen;
    animation: lightWave 10s linear infinite;
}
#wrapper{
    width: 100vw;
    height: 98vh;
    background-image: 
      url("../img/shell01.png"),
      url("../img/shell02.png"), 
      url("../img/sango.png"), 
      url("../img/starfish.png"), 
      url("../img/starfish.png"), 
      url("../img/sango.png"),
      url("../img/rock_b1.png");
    background-repeat: no-repeat;
    background-position: 
      6% bottom,
      10% bottom,
      22% bottom,
      60% bottom, 
      62% bottom, 
      70% bottom, 
      95% bottom;
    background-size: 
      clamp(30px, 4vw, 100px), 
      clamp(20px, 3vw, 80px), 
      clamp(70px, 70vw, 700px), 
      clamp(20px, 3vw, 80px), 
      clamp(15px, 2vw, 60px), 
      clamp(90px, 90vw, 900px), 
      clamp(80px, 15vw, 350px);
    margin-inline: auto;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}
#pc_cmt, #sp_cmt{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.5;
    z-index: 10;
    background-color: rgba(245,245,245,0.80);
    animation: comment 5s forwards;
    color: #1F7097;
    padding-inline: 0.5em;
}
.seaweed{
    width: clamp(90px, 9vw, 230px);
    transform-origin: bottom center; 
    animation: seaweed_yura 4s linear infinite;
    overflow: hidden;
    position: absolute;
    left: 10%;
    bottom: 0;
}
.seaweed img{
    height: auto;
    width: clamp(80px, 8vw, 200px);
    pointer-events: none;
}
.rock{
    position: absolute;
    right: 15px;
    bottom: 0;    
    z-index: 10000;
}
.rock img{
    height: auto;
    width: clamp(60px, 12vw, 250px);
}
.sometimes{
    transform-origin: center center;
}
.sometimes img{
    height: auto;
    width: max(400px, 40vw);
    animation: sometimes 100s 10s backwards linear infinite; 
    position: absolute;    
}
.floating{
    height: 110px;
    width: auto;
    animation: floating 10s linear infinite;
    overflow: hidden;
    position: absolute;
    right: 10%;
    top: 50%;
    bottom: 50%;
}
.floating img{
    height: 100px;
    width: auto;
    pointer-events: none;
}
.walking{
    width: clamp(70px, 7vw, 130px);
    height: auto;
    overflow: hidden;
    position: absolute;
    bottom: -5px;
    animation: walking 90s linear infinite; 
    transform-origin: center center;
}
.walking img{
    width: clamp(60px, 6vw, 120px);
    height: auto;       
}
@keyframes walking{
    0%{
        left: 0;
        opacity: 1;        
    }
    50%{
        left: 1800px;
        opacity: 1;
    } 
    70%{
        display: none;
    }
}
.submarin{
    position: absolute;
    /*width: max(100px, 10vw); 均一サイズにしない*/
    height: auto;
    transition: transform 0.1s;
    z-index: 100;
}
.spottedGardenEel{
    padding-left:  clamp(15px, 5vw, 30px);
}
.spottedGardenEel img{
    position: absolute;
}
.spottedGardenEel img:first-child{
    height: 10vh;
    width: auto;
    left: 3vw;
    animation: upDown 10s linear infinite;    
}
.spottedGardenEel img:last-child{
    height: 7vh;
    width: auto;
    left: 4vw;
    animation: upDown 12s linear infinite;    
}
.lft {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0px 0px 15px 0px rgba(255, 255, 255, 0.6) inset;
    position: relative;
    overflow: hidden;
    animation: bub_lft 8s linear infinite, bub_cet 13s 5s linear infinite, bub_rgt 13s 3s linear infinite;
}
.cet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0px 0px 15px 0px rgba(255, 255, 255, 0.6) inset;
    position: relative;
    overflow: hidden;
    animation: bub_lft 12s 2s linear infinite, bub_cet 8s 1s linear infinite, bub_rgt 8s 1s linear infinite;
}
.rgt {
 	width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0px 0px 15px 0px rgba(255, 255, 255, 0.6) inset;
    position: relative;
    overflow: hidden;
    animation: bub_lft 12s 4s linear infinite, bub_cet 12s 4s linear infinite, bub_rgt 12s linear infinite;
}
.bub::after{
    content: "";
    display: block;
    width: 20%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    position: absolute;
    right: 15%;
    top: 15%;
    filter: blur(2px);
}
#character, #aquarium{
    position: absolute;
    pointer-events: none;
}
#fish_img {
    position: fixed;
    /*width: clamp(70px, 8vw, 150px);*/
    height: auto;
    pointer-events: none;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
    z-index: 1000;
    filter: drop-shadow(1px 1px 2px #000);
    display: block;
}
.stop{
    animation: fish_stop 20s linear infinite;
}
@keyframes lightWave {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100vw 0;
  }
}
@keyframes comment{
    0%, 100%{
        opacity: 0;    
    }
    20%, 80%{
        opacity: 1;
    }
}
@keyframes seaweed_yura{
    0%, 100%{
        transform: skew(3deg);
    }
    50%{
        transform: skew(-4deg);
    }
}
@keyframes bub_lft {
	0% {
        top: 80%;
        opacity: 0.4;		
        width: 10px;
        height: 10px;
  }
	10%{
        opacity: 1;
        transform: translateX(10px);
	}
	30%{
        transform: translateX(-40px);
        width: 25px;
        height: 25px;   
	}
	70%{
        transform: translate(-70px);
        width: 15px;
        height: 15px;          
	}
	90%{
        opacity: 0.7;
	}
	100% {
        top: 0%;
        opacity: 0;
        width: 5px;
        height: 5px;        
	}
}
@keyframes bub_cet {
	0% {
        top: 90%;
        opacity: 0.4; 
  }
	10%{
        opacity: 1;
        transform: translateX(15px);
	}
	30%{
        transform: translateX(-8px);
        opacity: 1;
        width: 16px;
        height: 16px;   
	}
	70%{
        transform: translate(30px);
        opacity: 1;
        width: 10px;
        height: 10px;          
	}
	90%{
        opacity: 0.7;
	}
	100% {
        top: 0%;
        opacity: 0;
        width: 5px;
        height: 5px;        
	}
}
@keyframes bub_rgt {
	0% {
        top: 100%;
        opacity: 0.4; 
  }
	10%{
        opacity: 1;
        transform: translateX(40px);
	}
	30%{
		transform: translateX(-10px);
        width: 35px;
        height: 35px;
        opacity: 1;
	}
	70%{
		transform: translate(30px);
        width: 30px;
        height: 30px;          
	}
	90%{
        opacity: 0.7;
	}
	100% {
        top: 0%;

        opacity: 0;
        width: 5px;
        height: 5px;        
	}
}
@keyframes fish_stop{
    0%, 20%, 40%, 60%, 80%, 100%{
        transform: translateY(20px);
    }
    10%, 30%, 50%, 70%, 90%{
        transform: translateY(-20px);
    }
}
@keyframes upDown {
    0%, 40%, 100% {
        bottom: -10vh;
    }
    50%, 80% {
        bottom: 0;
    }
}
@keyframes sometimes{
  0%, 35%, 100%{
      opacity: 0;
      right: 0;
  }
  5%{
      opacity: 0.5;
      transform: translateX(-3000px) translateY(-700px) skew(0deg, 30deg) rotateX(20deg) rotateY(30deg);  
  }
}
@keyframes floating{
    0%, 100%{
        transform: translateY(-5vh);
    }
    50%{
        transform: translateY(0);
    }
}
@media screen and (min-width:768px){
    #sp_cmt{
        display: none;
    }
}
@media screen and (max-width:1000px){
    html {
        overscroll-behavior: none;
    }
    body {
        overscroll-behavior: contain;
    }
    #wrapper, #aquarium{
        height: 100dvh;
    }
    #wave{
        background: repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 0px,
        rgba(255, 255, 255, 0.1) 40px,
        rgba(255, 255, 255, 0.05) 80px);
    }
    #pc_cmt{
        display: none;
    }
    #fish_img{
        width: 150px;
    }
    .submarin{
        width: max(120px, 20vw);
        height: auto;
    }
    .sometimes img{
        position: absolute;
        animation: sometimes_sp 100s 10s backwards linear infinite; 
    }
    .lft {
        animation: bub_lft_animation_sp 18s 0.5s backwards linear infinite;
    }
    .cet {
        animation: bub_cet_animation_sp 16s linear infinite;
    }
    .rgt {
        animation: bub_rgt_animation_sp 15s linear infinite;
    }
}
@media screen and (max-width:800px){
/*    .spottedGardenEel img:first-child{
        height: 15vh; 
    }
    .spottedGardenEel img:last-child{
        height: 10vh;
    }*/
    .sometimes img{
        position: absolute;
        animation: sometimes_sp 100s 10s backwards linear infinite; 
    }
    .floating img{
        width: 100px;
        height: auto;
    }
}
@keyframes bub_lft_animation_sp {
	0% {
        top: 80%;
        opacity: 0.4;		
  }
	10%{
        opacity: 1;
        transform: translateX(20px);
	}
	30%{
        transform: translateX(40px);
        width: 25px;
        height: 25px;   
	}
	70%{
        transform: translateX(60px);
        width: 20px;
        height: 20px;          
	}
	90%{
        transform: translateX(80px);
        opacity: 0.7;
	}
	100% {
        transform: translateX(90px);
        top: 0%;
        opacity: 0;
        width: 15px;
        height: 15px;        
	}
}
@keyframes bub_rgt_animation_sp {
	0% {
		top: 80%;
        transform: translateX(200px);
	   opacity: 0.4; 
      }
	10%{
        opacity: 1;
        transform: translateX(210px);
	}
	30%{
        transform: translateX(220px);
        width: 35px;
        height: 35px;   
	}
	70%{
        transform: translateX(230px);
        width: 30px;
        height: 30px;          
	}
	90%{
        opacity: 0.7;
        transform: translateX(240px);
	}
	100% {
        transform: translateX(250px);
        top: 0%;
        opacity: 0;
        width: 25px;
        height: 25px;        
	}
}
@keyframes bub_cet_animation_sp {
	0% {
        top: 90%;
        opacity: 0.4; 
        transform: translateX(80px);
  }
	10%{
        opacity: 1;
        transform: translateX(100px);
	}
	30%{
	    	transform: translateX(110px);
        width: 20px;
        height: 20px;   
	}
	70%{
		    transform: translateX(120px);
        width: 18px;
        height: 18px;          
	}
	90%{
        transform: translateX(135px);
		    opacity: 0.7;
	}
	100% {
        transform: translateX(240px);
        top: 0%;
        opacity: 0;
        width: 15px;
        height: 15px;        
	}
}
@keyframes sometimes_sp{
  0%, 35%, 100%{
      opacity: 0;
      right: 0;
  }
  5%{
      opacity: 0.5;
      transform: translateX(-900px) translateY(-400px) skew(0deg, 10deg) rotateX(20deg) rotateY(20deg);  
  }
}
