/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- CSS Styling --- */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    overflow: hidden;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    text-align: center;
}

#author {
    font-size: 16px;
    color: #ecf0f1;
    margin-top: 5px;
}

/* Navigation Menu */
nav {
    background-color: #34495e;
    overflow: hidden;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    float: left;
}

nav ul li a {
    display: block;
    color: #ecf0f1;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
}

nav ul li a:hover {
    background-color: #3d566e;
}

/* Main Content */
main {
    padding: 20px;
}

#status {
    text-align: center;
    margin: 10px;
    font-size: 18px;
    color: #34495e;
}

#startButton {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    font-size: 18px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#startButton:hover {
    background-color: #2980b9;
}

#calibrationArea,
#gameArea {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px); /* Adjusted to leave space for header and status */
    overflow: hidden;
    margin-top: 20px;
    background-color: #ecf0f1;
}

#calibrationArea {
    display: none;
}

#calibrationBox {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px dashed #3498db;
    box-sizing: border-box;
}

#calibrationPoint {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: red;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

#target {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    border: 2px solid #cccccc;
    border-radius: 50%;
    box-shadow:
        inset 0 0 5px rgba(0, 0, 0, 0.2),
        0 0 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

#instructions {
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
    color: #2c3e50;
}

#gazePointer {
    position: fixed;
    width: 20px;
    height: 20px;
    background-color: rgba(46, 204, 113, 0.5);
    border: 2px solid #27ae60;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

#debugInfo {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    z-index: 1000;
}

#webgazerVideoContainer {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    height: 240px;
    background-color: #000;
    border: 2px solid #3498db;
    overflow: hidden;
    z-index: 1000;
}

#calibrationInstructions {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #2c3e50;
    font-size: 18px;
}

.progress-bar {
    width: 50%;
    height: 10px;
    background-color: #bdc3c7;
    border-radius: 5px;
    margin: 10px auto;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 10px;
    text-align: center;
}

footer a {
    color: #ecdbff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}