/*layout.css------------------*/
/* GLOBAL STYLES */
/*----------------------------*/
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: #5f5b5b;
    font-family: 'Arial', sans-serif;
}

/*----------------------------*/
/* CONTAINER */
/*----------------------------*/
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    padding: 20px;
    gap: 20px;
}

/*----------------------------*/
/* WEBSKETCH MAIN  (device body) */
/*----------------------------*/
.websketch {
    position: relative;
    max-width: 100vw;
    max-height: 100vh;
    min-width:450px;
    min-height:560px;
    padding: 30px 75px;
    border-radius: 20px;
    background: #c00018;
    box-shadow: inset -11px -11px 8px #77000f,
                inset 11px 11px 8px #ff0021;
}

/*----------------------------*/
/* TOP LABEL (top words)  */
/*----------------------------*/
.top-label {
    text-align: center;
    color: goldenrod;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: bolder;
    letter-spacing: 2px;
    font-family: 'Caveat', cursive;
}

/*----------------------------*/
/* DRAWING SCREEN  (screen border and screen)  */
/*----------------------------*/
.screen-frame {
    display:flex;
    justify-content: center;
    padding: 9px 0;
    border-radius: 6px;
    background: #c00018;
    box-shadow: inset 11px 11px 36px #a30014,
                inset -11px -11px 36px #dd001c;
    min-width: 300px;
}

#drawing-canvas {
    border-radius: 6px;
    background: #d1d1d1;
    box-shadow: inset 6px 6px 5px #b4b4b4,
                inset -6px -6px 5px #eeeeee;
    border: 1px solid #808080;
    display: block;
    cursor: crosshair;
    width: 96%;
    height: 90%;
    max-width: 500px;
    max-height: 350px;
}

/*----------------------------*/
/* CONTROLS SECTION (control knobs) */
/*----------------------------*/
.controls {
    margin-top: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 120%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.knob-container {
    text-align: center;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.knob-base {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f6f3ff, #cfccd8);
    box-shadow: 1px 1px 2px #67666c,
                -1px -1px 1px #e8e5f2;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.knob {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, #cfcccc 0%, #dedede 2%, #fcfcfc 38%);
    cursor: pointer;
    user-select: none;
    z-index: 2;
}

.knob:active {
    transform: scale(0.95);
}

/*----------------------------*/
/* SHAKE BUTTON */
/*----------------------------*/
#shake-button {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    color: #fff;
    margin-top: 30px;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    border: 3px solid #2c3e50;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    transition: all 0.1s ease;
    text-align: center;
    font-size: 16px;
    user-select: none;
    min-width: 150px;
}

#shake-button:hover {
    background: linear-gradient(145deg, #e67e22, #d35400);
    transform: translateY(-2px);
}

#shake-button:active {
    transform: scale(0.95) translateY(0);
}

/*----------------------------*/
/* SHAKE ANIMATION */
/*----------------------------*/
.shaking {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/*----------------------------*/
/* RESPONSIVE DESIGN */
/*----------------------------

@media (max-width: 768px) {
    .websketch {
        padding: 20px;
    }
    .knob {
        width: 50px;
        height: 50px;
    }
    .shake-button {
        padding: 12px 16px;
        font-size: 12px;
    }
}