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

html{
  min-height: calc(100% + env(safe-area-inset-top));
}
html,
body {
  position: relative;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Cabin, Arial, Helvetica, sans-serif;
  font-size: 15px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  letter-spacing: 0.03em;
}

h1 {
  text-align: center;
  font-size: 1.3rem;
}

input, textarea, button {
  font-family: Cabin, Arial, Helvetica, sans-serif;
  padding: 14px 20px 15px;
  border: 1.5px solid #ddd;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  margin-top: 15px;
  border-radius: 11px;
  letter-spacing: 0.03em;
  width: 100%;
}
.buttons-centered {
  justify-content: center;
  display: flex;
  gap: 12px;
}
button {
  background-color: #002f92;
  color: #fff;
  font-weight: bold;
  padding-left: 30px;
  padding-right: 30px;
  border: none;
  width: auto;
  border-radius: 30px;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
button.secondary {
  background-color: #ededed;
  color: #303030;
}
button.warning {
  color: #ff3040;
  background-color: #ffe4e4;
}
button[disabled]:not(.loading) {
  background-color: #ddd;
}
@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.loading > .loader {
  width: 13px;
  height: 13px;
  display: inline-block;
  position: relative;
  top: 2px;
  margin-left: 10px;
  margin-right: -6px;
  animation: loading 1.2s infinite linear;
}
.loading > .loader::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #fff;
  display: block;
}
.screen{
  position:relative;
}
#screen_stream {
  height: 100%;
}
#screen_profile {
  overflow: auto;
  height: 100%;
}

.user_icon {
  position: absolute;
  top: 60px;
  right: 17px;
  width: 40px;
  height: 40px;
  background-color: #ddd;
  border-radius: 50%;
  border: 2px solid #fff;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #444;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.swiper-slide::after {
  content: "";
  width: 100%;
  bottom: 0;
  position: absolute;
  height: 180px;
  background-image: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.4));
}
.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post_text {
  position: absolute;
  bottom: 45px;
  color: #fff;
  font-size: 14px;
  text-align: left;
  padding: 0 0 0 25px;
  max-width: calc(100% - 110px);
  left: 0;
  z-index: 1;
}


.bottombar {
  z-index: 1;
  position: absolute;
  bottom: 45px;
  display: flex;
  justify-content: center;
  width: auto;
  align-items: center;
  flex-direction: column;
  right: 0;
}
.bottombar > .bottom-link {
  padding: 12px 23px;
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 0;
  display: block;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
.like-count {
  display: block;
}
.ico-sound-on{
  display: none;
}
body.unmuted .ico-sound-off {
  display: none;
}
body.unmuted .ico-sound-on {
  display: block;
}
.bottom-link-delete {
  font-size: 23px;
  font-family: serif;
  padding-top: 8px !important;
  letter-spacing: 0.06em;
}
.bottombar svg {
  width: 30px;
  height: auto;
}
.bottom-link-like.liked svg path {
  fill: #ff3040;
  stroke: rgba(0,0,0,0);
}

div[popover] {
  border: 0;
  border-radius: 20px;
  padding: 10px 30px 30px;
  width: 85vw;
  box-sizing: border-box;
  top: -50px;
  box-shadow: 0 9px 30px -10px rgba(0,0,0,0.5);
  max-width: 400px;
}


.upload-area {
  border: 2px dashed #aaa;
  border-radius: 8px;
  padding: 40px 10px 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
  height: 160px;
  box-sizing: border-box;
}
.upload-area:hover {
  border-color: #666;
  background-color: #f8f8f8;
}
.upload-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}
.upload-area.dragover {
  border-color: #2196f3;
  background-color: #e3f2fd;
}
#uploadPreview {
  height: 140px;
  margin-top: -30px;
  width: auto;
}
#uploadSubmit {
  margin: 15px auto 0;
}


/* Raster */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}
.grid-item {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.grid-item img, 
.grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* media querie landscape mode */
@media (min-width: 768px) and (orientation: landscape) {
  .screen{
    max-width: 768px;
    aspect-ratio: 9/16;
    margin: 0 auto;
  }
}