html {
  height: 100%;
  width: 100%;
}

body {
  background-color: lightgray;
  font-family: 'Lobster Two', sans-serif;

}

h1 {
  font-size: 3rem;
  text-align: center;
  background-color: #244153;
  color: aliceblue;
  padding: 10px;
  margin-top: 10px;
  box-shadow: 2px 2px 10px black;
  border-radius: 5px;
}

h2 {
  text-align: center;
}

#dogImage {
  display: flex;
  justify-content: center;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: -4rem;
}

#dogImage img {
  width: 370px;
  height: 300px;
  animation: fadeIn 14s;
}


@keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

/* camera design start*/
.camera-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera {
    position: relative;
    height: 100vh;
    top: 200px;
    z-index: 1
}

.camera:before, .camera:after {
    content: "";
    position: absolute;
    width: 450px;
    background-color: #3d4144;
    transform: translate(-50%, -80%);/* The transform: translate and top/left combination is used to vertically and horizontally center divs*/
    top: 50px;
    left: 0;
}

.camera:before {
    height: 235px;
    border-radius: 30px 30px 0 0;
    box-shadow: inset 0 60px #7a7e80;
}

#button {
    position: absolute;
    width: 60px;
    height: 20px;
    transition: .2s;
    border-radius: 10px 10px 0 0;
    background-color: #233540;
    border: none;
    top: -158px;
    left: 130px;
    cursor: pointer;
    transform-origin: bottom;
    z-index: 100;
    animation: blinker 0.8s linear 2s infinite;
}

@keyframes blinker {
    50% {opacity: 0.6;}
}

#button:active {
    transform: scaleY(0.5);
}

.lens {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid #333;
    background-color: white;
    transform: translate(-50%, -50%);
    top: -20px;
    z-index: 1;
}

.lens:before, .lens:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}

.lens:before {
    width: 170px;
    height: 170px;
    background-color: #1c4356;
    border: 10px solid #333;
}

.lens:after {
    width: 80px;
    height: 80px;
    background-color: #072b3f;
    border: 20px solid #114969;
}
/* reflection section to add an additional opaque layer over lens*/
.reflection, .reflection:before, .reflection:after {
    position: absolute;
    border-radius: 50%;
}

.reflection {
    width: 25px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.8);
    top: 85px;
    left: 65px;
    z-index: 2;
}

.reflection:before {
    content: "";
    width: 120px;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.1);
    top: -45px;
    left: -25px;
}

.reflection:after {
    content: "";
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 60px -144px rgba(255, 255, 255, 0.4);
    top: 72px;
    left: -10px;
}

.viewfinder {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: #333;
    border-radius: 5px;
    transform: translate(-50%, -50%);
    top: -70px;
    left: 160px;
    z-index: 4;
}

.viewfinder:before, .viewfinder:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 29px;
    left: 30px;
}

.viewfinder:before {
    width: 30px;
    height: 30px;
    background-color: #346988;
    border: 5px solid #18455a;
}

.viewfinder:after {
    width: 8px;
    height: 8px;
    background-color: #003554;
    box-shadow: 8px -5px rgba(255, 255, 255, 0.3);
}

.flashbar {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: #b0b7bb;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: -60px;
    left: -160px;
    z-index: 4;
    overflow: hidden;
}

.flashbar:before, .flashbar:after {
    content: "";
    position: absolute;
    width: 55px;
    height: 20px;
    background-color: #bac2c3;
    transform: translate(-50%, -50%);
    background-image: linear-gradient(#CCC 1px, transparent 2px);
    background-size: 100% 3px;
    top: 28px;
    left: 40px;
}

.flashbar:before {
    width: 75px;
    height: 75px;
    background-color: #b3b6b8;
    border-radius: 50%;
    top: 40px;
    z-index: 4;
}

.flashbar:after {
    width: 72px;
    height: 23px;
    background-color: #a0a3a5;
    background-image: linear-gradient(to right, #CCC 1px, transparent 2px);
    background-size: 3px 100%;
    top: 39px;
    z-index: 4;
  
}

.shutter-button {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: red;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 30px;
    left: -160px;
    z-index: 4;
    overflow: hidden;
}

.shutter-button:after {
    content: "";
    position: absolute;
    width: 35px;
    height: 35px;
    background-color: #CCC;
    border-radius: 50%;
    opacity: 35%;
    top: 2px;
    z-index: 4;
}

.bottom {
    position: absolute;
    perspective: 250px;
    z-index: 10;
}

.bottom:before, .bottom:after {
    content: "";
    position: absolute;
    height: 30px;
    top: 96px;
}

.bottom:before {
    width: 468px;
    background-color: #585c61;
    display: block;
    transform: rotateX(45deg);
    left: -234px;
}

.bottom-face {
    position: absolute;
    background-color: #6c6d6e;
    width: 489px;
    height: 25px;
    top: 127px;
    left: -245px;
}

.bottom-face:after {
    content: "";
    position: absolute;
    width: 489px;
    height: 65px;
    border-radius: 0 0 20px 20px;
    background-color: #2f4553;
    top: 25px;
}

.photo-slot {
    position: absolute;
    width: 400px;
    height: 6px;
    background: #404243;
    border-radius: 10px 10px 0 0;
    border-top: 12px solid #282828;
    transform: translate(-50%, -50%);
    top: 208px;
    z-index: 1;
}

.polaroid-shadow {
    position: absolute;
    width: 550px;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 210px;
    z-index: -1;
}

.photo {
    position: absolute;
    width: 370px;
    height: 300px;
    background-color:#404243;
    border: solid white;
    border-top-width: 10px;
    border-bottom-width: 35px; 
    border-left-width: 10px;
    border-right-width: 10px;
    transform: translate(-50%, -50%);
    top: 35px;
    z-index: -1;
}

@keyframes eject-photo {
    0% {transform: translateY(0px); left: -195px;}
    10% {transform: translateY(120px); left: -195px;}
    100% {transform: translateY(200px); left: -195px; z-index: 10;}
}

.eject-photo {
    animation: eject-photo 3.5s ease 0.2s forwards;
}
/*camera design end*/


/*mobile and tablet view. Max width set to 1024px to account for tablet horizontal mode*/
@media only screen and (max-width: 1024px) {
  #dogImage {
    width: 100%;
    height: 300px;
    margin-bottom: -3rem;
  }

  .camera {
    transform: scale(0.7);
    top: 0px;
  }

  .bottom {
    position: absolute;
    z-index: 10;
  }

   .bottom:before, .bottom:after {
    content: "";
    position: absolute;
    height: 44px;
    top: 83px;
  }

   .bottom:before {
    width: 479.5px;
    background-color: #585c61;
    -ms-transform: rotateX(51deg);
    -moz-transform: rotateX(51deg);
    -o-transform: rotateX(51deg);
    transform: rotateX(51deg);
    left: -240.5px;
  }

  .bottom-face {
    width: 514.5px;
    height: 26px;
    left: -258px;
  }
  .bottom-face:after {
    width: 514px;
  }

  #button:active {
    -webkit-transform: scaleY(0.5);
    -ms-transform: scaleY(0.5);
    -moz-transform: scaleY(0.5);
    -o-transform: scaleY(0.5);
    transform: scaleY(0.5);
  }
}

