/* Reset any potential margin/padding issues */
*
{
    margin: 0;
    padding: 0;
}

/* General styling for the page */
body
{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eeeeee;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: hidden; /* Prevents scrolling */
}

/******************************************************************************************************/
/* Tuner container */

.tuner-container 
{
    text-align: center;
    background-color: transparent;
    perspective: 1000px; /* Perspective for 3D effect */
    transition: background-color 0.5s ease; /* Smooth background transition */
    transform-origin: center center;
}

.tuner-title 
{
    font-family: 'Arial', sans-serif;
    font-size: 2em;
    color:#333; 
    margin-bottom: 10px;
    transition: opacity 0.5s ease, margin 0.5s ease; /* Smooth fade-out and margin transition */
}


/******************************************************************************************************/
/* Violin container and interactive areas styling */

.violin-container 
{
    position: relative;
    width: 50vw;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
    background-color: #4b4949;
    transform-style: preserve-3d; /* Enable 3D transformations */
    transition: transform 1s ease; /* Smooth zoom effect */
    border-radius: 20px; /* Rounds the corners */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5); /* Adds a smooth shadow for depth */
}

.violin 
{
    width: 100%;
    height: auto;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3); /* Adds depth with shadow */
    border-radius: 20px; /* Rounds the corners */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5); /* Adds a smooth shadow for depth */
}

.string 
{
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.string.active 
{
    box-shadow: 0 0 12px #800000; /* glow for highlighting */
    background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent white */
    cursor: pointer;
}


@keyframes pulse 
{
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse 
{
    animation: pulse 1s infinite; /* Infinite pulsing effect */
}

.string.active, .circle-label.active 
{
    animation: pulse 1s infinite; /* Trigger pulsing after click */
    box-shadow: 0 0 12px #800000; /* glow for highlighting */
}

.string:hover, .circle-label:hover 
{
    transform: scale(1.1);
    animation: none; /* No pulsing on hover */
    box-shadow: 0 0 12px #800000; /* glow for highlighting */
    color: #faf6f6;
}

.label-container 
{
    position: absolute;
    width: 25%;
    top: 6%; /* Adjust for smaller screens */
    left: 37%; /* Center the container relative to its parent */
    display: flex;
    justify-content: center;

}

.circle-label 
{
    width: 15%; /* Diameter of the circle labels */
    height: 45%; /* Diameter of the circle labels */
    top: 25%; /* Adjust for smaller screens */
    border-radius: 75%; /* Makes the labels circular */
    border-style: solid;
    border-color: black;
    border-width: .1em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease; /* Smooth transition for hover effect */
    background-color: #800000;
}

/* Specific label stylings */
.gLabel { color: #faf6f6; }
.dLabel { color: #faf6f6; }
.aLabel { color: #faf6f6; }
.eLabel { color: #faf6f6; }

.circle-label.active 
{
    box-shadow: 0 0 8px #FFFF00; /* Yellow glow for active state */
}

/*******************************************************************************************/
/* Zoomed In styling */

/* Fullscreen view on zoom */
body.zoomed-in 
{
    overflow: hidden;
    min-height: 100vh;
}

body.zoomed-in .tuner-title 
{
    opacity: 0; /* Hide the title when zoomed in */
    pointer-events: none; /* Prevent any interaction with the hidden title */
    margin: 0; /* Remove margin to avoid showing any strip */
}

.help-icon
{
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #faf6f6;
    color: #060606;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000; /* ensures icon always stays on top */
}

.help-icon:hover 
{
    background-color: #800000;
    color: #faf6f6;
    transform: rotate(10deg); /* Slight rotation on hover for fun */
}

/* Help modal styling */
.help-modal
{
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the modal */
    width: 300px;
    background-color: #fff;
    padding: 20px;
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001; /* Ensure it's on top */
    text-align: center; /* Center the text */
}

.indent 
{
    display: block;
    margin-left: 20px; 
    text-indent: -10px;
    padding-left: 10px; /* Adjust padding to align with the rest of the text */
}

.instruction-container
{
    text-align: center;
}

#nextStep, #closeHelp
{
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #800000;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    display: inline-block;
}

#nextStep:hover, #closeHelp:hover 
{
    background-color: #4c0000; /* Darker maroon on hover */
}

/*******************************************************************************************/
/* Tooltip container */
.tooltip 
{
    position: absolute;
    background-color: #333; /* Black background */
    color: #fff; /* White text */
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

/* Tooltip visible */
.tooltip.visible 
{
    opacity: 1;
}

/* Media Queries */

/* Large Screems (Desktops, Laptops)*/
@media (min-width: 1025px) 
{
    .violin-container
    {
        width: 50vw;
        max-width: 600px;
    }
    .label-container 
    {
        top: 10%;
        width: 40%; 
        left: 30.25%; /* Center the container relative to its parent */
    }

    .circle-label 
    {
        width: 7%; /* Diameter of the circle labels */
        height: 25%; /* Diameter of the circle labels */
    }

}

/* Medium Screems (Tablets, Small Laptops)*/
@media (max-width: 1024px) 
{
    .violin-container 
    {
        width: 60vw;
        max-width: 450px;
    }

    .label-container 
    {
        top: 8%;
        width: 35%;
        left: 32%;
    }

    .circle-label 
    {
        width: 8%;
        height: 20%;
    }

}

/* Small Screens (Large Phones, Small Tablets)*/
@media (max-width: 768px) 
{
    .violin-container 
    {
        width: 70vw;
        max-width: 350px;
    }

    .label-container 
    {
        top: 7%;
        width: 30%;
        left: 35%;
    }

    .circle-label 
    {
        width: 10%;
        height: 18%;
    }
}

/* Extra Small Screens (Small Phones) */
@media (max-width: 440px) 
{
    .violin-container 
    {
        width: 80vw;
        max-width: 280px;
    }

    .help-icon
    {
        font-size: medium;
    }
    
    .label-container 
    {
        display: none;
    }

    .circle-label 
    {
        display: none;
    }

    .tuner-title 
    {
        font-size: 1.5em; 
    }

}

/* Extra Small Screens (Small Phones) */
@media (max-width: 375px) 
{
    .violin-container 
    {
        width: 85vw;
        max-width: 250px;
    }

    .help-icon
    {
        font-size: small;
    }
    
    .label-container 
    {
        display: none;
    }

    .circle-label 
    {
        display: none;
    }
}

