* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: white;
}

#opening {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: white;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#selfglaze {
    color: #555;
    font-size: x-small;
}

#github {
    color: #555;
    display: flex;
    z-index: 10000;
}

#opening h1, #opening h3, #opening #openingbtn {
    position: relative;
    z-index: 1;
}

h1 {
    font-family: 'Bungee', sans-serif;
    font-size: 64px;
    color: #111;
    letter-spacing: 2px;
}

h3 {
    font-weight: 400;
    color: #555;
    font-size: 18px;
}

#openingbtn {
    width: 220px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Bungee', sans-serif;
    font-size: 22px;
    color: white;
    background: linear-gradient(135deg, #FF3CAC, #784BA0, #2B86C5);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 0 #111;
}

#openingbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #111;
}

#openingbtn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #111;
}

/* the actual cool bit(ui) */

#ui {
    display: flex;
    height: 100vh;
    width: 100%;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

#webcam {
    flex: 1;
    position: relative;
    background: #111;
}

#rightbar {
    width: 260px;
    display: flex;
    flex-direction: column;
    background: white;
    border-left: 4px solid #111;
}

#tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

#tools p {
    background: #FFEC5C;
    color: #111;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 10px;
    border: 3px solid #111;
    cursor: pointer;
    transition: transform 0.1s ease;
}

#tools p:nth-child(2) { background: #6EE7B7; }
#tools p:nth-child(3) { background: #F87171; }
#tools p:nth-child(4) { background: #93C5FD; }
#tools p:nth-child(5) { background: #FDBA74; }
#tools p:nth-child(6) { background: #C4B5FD; }

#tools p:hover {
    transform: scale(1.03);
}

#tutorial {
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin-top: auto;
    border-top: 3px dashed #111;
}

#tutorial p {
    color: #555;
    font-size: 14px;
}


#video, #handCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#handCanvas {
    transform: scaleX(-1);
}

#paintCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
}

.active-tool {
    background: #333 !important;
    color: white !important;
}

#toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

#toast.show {
    opacity: 1;
}