* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', monospace;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

body.index-page {
    background-color: #ffffff;
    color: #000000;
}

body.index-page #welcome-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border: 2px solid #000;
}

body.index-page #welcome-container h2 {
    margin-bottom: 20px;
    color: #000;
    font-size: 24px;
}

body.index-page #welcome-container p {
    margin-bottom: 30px;
    color: #333;
    font-size: 18px;
}

body.index-page #start-btn {
    padding: 12px 30px;
    font-size: 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.index-page #start-btn:hover {
    background-color: #333;
}

/* Mirror page styles */
body.mirror-page {
    background-color: #fff;
    color: #000;
    overflow: hidden;
}

#mirror-container {
    position: absolute;
    right: 0;
    top: 20px;
    width: 100%;
    height: 100dvh;
    background-color: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
}

#emotion-label {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

#emotion-word {
    font-size: 36px;
    margin-bottom: 15px;
    color: #000;
}

#kaomoji {
    font-size: clamp(50px, 5vw, 100px);
    color: #000;
    margin-bottom: 20px;
}

#description-mirror {
    font-size: 24px;
    text-align: center;
    max-width: 70%;
    overflow: hidden;
    line-height: 1.4;
    color: #000;
    margin-bottom: 30px;
}

#video-canvas-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 20px;
}

#canvas, #video {
    position: absolute;
    top: 0;
    left: 0;
}



#video {
    z-index: 0;
    opacity: 0.5;
}

#landmarks-container-mirror {
    position: relative;
    width: 100%;
    height: calc(100vh - 500px);
    min-height: 300px;
    max-height: 600px;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#faceCanvas {
  opacity: 0.7;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: contain;
}











#progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    color: #000;
    font-size: 16px;
    transition: opacity 0.5s ease;
}

#progress-bar-container {
    width: 80%;
    height: 20px;
    border: 2px solid #000;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background-color: #000;
    transition: width 0.3s ease;
}

#buttons-container {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

#start-button, #save-button {
    padding: 12px 30px;
    font-size: 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#start-button:hover, #save-button:hover {
    background-color: #333;
}

.hidden {
    display: none !important;
}



#timer-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #000;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
  }

  #description-mirror {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    min-height: fit-content;
  }

/* Mobile styles */
@media screen and (max-width: 800px) {
    /* Index page mobile styles */
    body.index-page #welcome-container {
        padding: 30px 20px;
    }

    body.index-page #welcome-container h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    body.index-page #welcome-container p {
        font-size: 12px;
        margin-bottom: 20px;
    }

    body.index-page #start-btn {
        padding: 10px 20px;
        font-size: 12px;
    }

    /* Mirror page mobile styles */
    #mirror-container {
        padding: 15px;
        padding-top: 60px;
    }

    #emotion-label {
        font-size: 12px;
        margin-bottom: 8px;
    }

    #emotion-word {
        font-size: 20px;
        margin-bottom: 10px;
    }

    #kaomoji {
        font-size: 36px;
        margin-bottom: 15px;
    }

    #description-mirror {
        font-size: 12px;
        margin-bottom: 20px;
        max-width: 85%;
    }

    #video-canvas-wrapper {
        width: 250px;
        height: 250px;
        margin-bottom: 15px;
    }

    #canvas, #video {
        width: 250px;
        height: 250px;
    }

    #buttons-container {
        bottom: 70px;
        gap: 15px;
    }

    #start-button, #save-button {
        padding: 10px 20px;
        font-size: 12px;
    }

    #timer-container {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: 15px;
        right: 15px;
    }

    #progress-container {
        font-size: 12px;
    }

    #landmarks-container-mirror{
      position: fixed;
      bottom: 120px;
      width: 220px;
      height: 220px;
      min-height: unset;
    }
    
}

