/* --- GLOBAL STYLES & MODERN TYPOGRAPHY --- */
body {
    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fc; /* Cooler, professional off-white */
    color: #1e293b; /* Sleek slate gray instead of harsh black */
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    margin-top: 0;
    color: #0f172a;
}

/* --- STUDENT PAGE STYLES --- */
.student-page {
    text-align: center;
}

/* New styling for the instruction text */
.instruction-text {
    font-size: 1.15rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.zone {
    position: absolute;
    cursor: pointer;
    border: none; /* Removed the dashed red borders for a cleaner look */
    background-color: rgba(255, 255, 255, 0); /* Fully transparent initially */
    transition: background-color 0.2s ease-in-out;
}

.zone:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Soft highlight on hover */
}

/* Polished Tooltip */
.input-tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px); /* Modern glassmorphism effect */
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#tooltipHeader {
    font-size: 1.2rem;
    color: #334155;
    margin-bottom: 12px;
}

.hidden { display: none !important; }

/* Modern Buttons */
.btn-yes, .btn-no {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-yes { 
    background: linear-gradient(135deg, #10b981, #059669); /* Rich emerald gradient */
}
.btn-yes:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3); }

.btn-no { 
    background: linear-gradient(135deg, #ef4444, #dc2626); /* Rich crimson gradient */
}
.btn-no:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3); }


/* --- TEACHER PAGE STYLES --- */
.teacher-page {
    text-align: center;
}

.header-section {
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    margin: 0 auto 30px auto;
    max-width: 900px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#startSessionBtn {
    background: linear-gradient(135deg, #3b82f6, #2563eb); /* Professional blue gradient */
    color: white;
    border: none;
    padding: 16px 45px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

#startSessionBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

#startSessionBtn:active {
    transform: translateY(1px);
}

#sessionCodeDisplay {
    margin-top: 25px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 2.5rem;
    color: #0f172a;
    letter-spacing: 8px;
    font-weight: 800;
    background: #f1f5f9;
    padding: 15px 30px;
    border-radius: 12px;
    display: inline-block;
}

.dashboard-container {
    background: #ffffff;
    max-width: 900px;
    margin: 0 auto;
    padding: 35px;
    border-radius: 24px;
    min-height: 400px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

/* Custom styling for the Dropdown Menu */
select#studentFilter {
    appearance: none; /* Removes default browser styling */
    background: #f8f9fc url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") no-repeat right 15px top 50%;
    background-size: 12px auto;
    border: 2px solid #e2e8f0;
    color: #334155;
    padding: 12px 45px 12px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 250px;
}

select#studentFilter:hover, select#studentFilter:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
}

/* --- COURT CONTAINERS --- */
.shot-input-court, .heatmap-court {
    position: relative;
    width: 600px;
    height: 520px;
    margin: 30px auto;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    border: 8px solid #1e293b; /* Thicker, bolder court border */
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden; /* Ensures highlighted zones don't spill over the rounded corners */
}

.shot-input-court { background-image: url("../img/court_rb.png"); }
.heatmap-court { background-image: url("../img/court_bw.png"); }

/* --- ZONES AND CLIPPING --- */
.zone, .heat-zone {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    position: absolute;
    border: none;
}

.heat-zone { display: block; transition: background-color 0.4s ease; }

#zone1, #hz1 { clip-path: polygon(34% 0%, 66% 0%, 66% 43%, 34% 43%); }
#zone2, #hz2 { clip-path: polygon(6% 0%, 34% 0%, 34% 43%, 50% 43%, 50% 65.35%, 34% 63.15%, 20.59% 55.48%, 10.49% 43%, 6% 31.22%); }
#zone3, #hz3 { clip-path: polygon(66% 0%, 94% 0%, 94% 31.22%, 88.22% 44.4%, 79.33% 55.22%, 66.6% 62.52%, 50% 65.86%, 50% 43%, 66% 43%); }
#zone4, #hz4 { clip-path: polygon(0.42% 0%, 6.42% 0%, 5.9% 31.62%, 9.73% 40.06%, 13.71% 45.88%, 19.97% 53.28%, 29.57% 59.9%, 17.77% 100%, 0.42% 100%); }
#zone5, #hz5 { clip-path: polygon(28.43% 59.31%, 34.3% 62.52%, 50% 64.93%, 64.3% 62.52%, 71.57% 59.31%, 82.79% 100%, 17.21% 100%); }
#zone6, #hz6 { clip-path: polygon(100% 0%, 94% 0%, 94% 28%, 89.11% 42.31%, 83.84% 48.29%, 77.72% 56.21%, 84.04% 50.53%, 71.26% 59.43%, 82.37% 100%, 100% 100%); }

/* --- HEATMAP LABELS --- */
.heat-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
    text-shadow: 0px 2px 4px rgba(255,255,255,0.8); /* Ensures text is readable over heatmap colors */
}

#hz1 .heat-label { top: 25%; left: 50%; }
#hz2 .heat-label { top: 25%; left: 20%; }
#hz3 .heat-label { top: 25%; left: 80%; }
#hz4 .heat-label { top: 60%; left: 12%; }
#hz5 .heat-label { top: 75%; left: 50%; }
#hz6 .heat-label { top: 60%; left: 88%; }