/* examiner.css */
:root {
    --bg-main: #0f172a;       /* slate-900 */
    --bg-panel: #1e293b;      /* slate-800 */
    --paper-bg: #f8fafc;      /* slate-50 */
    --ink-blue: #2563eb;      /* blue-600 */
    --marker-red: #ef4444;    /* red-500 */
    --marker-green: #22c55e;  /* green-500 */
    --text-white: #f8fafc;
    --text-muted: #94a3b8;    /* slate-400 */
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

#trainer-container {
    flex-grow: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   THE PAPER CARD
   ========================================= */
#student-paper {
    background-color: var(--paper-bg);
    /* Dotted grid effect */
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    color: #334155;
    width: 100%;
    max-width: 600px;
    padding: 40px 40px 40px 60px; /* Extra left padding for the red margin */
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
}

/* Red Margin Line */
#student-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    bottom: 0;
    width: 2px;
    background: rgba(239, 68, 68, 0.3);
}

.question-text {
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px dashed #cbd5e1;
    padding-bottom: 10px;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.student-answer {
    font-family: 'Patrick Hand', cursive, sans-serif;
    font-size: 2rem; /* Larger for better readability */
    color: var(--ink-blue); /* Ballpoint pen blue */
    line-height: 1.5;
    flex-grow: 1;
}

/* =========================================
   ANIMATED MARKING STAMP
   ========================================= */
#mark-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg) scale(0);
    font-size: 4.5rem;
    font-weight: 900;
    border: 6px solid;
    padding: 10px 40px;
    border-radius: 12px;
    text-transform: uppercase;
    opacity: 0;
    /* Bouncy cubic-bezier transition */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; /* Prevents stamp from blocking button clicks */
    z-index: 10;
    letter-spacing: 2px;
}

#mark-stamp.correct {
    color: var(--marker-green);
    border-color: var(--marker-green);
    opacity: 0.9;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1);
}

#mark-stamp.wrong {
    color: var(--marker-red);
    border-color: var(--marker-red);
    opacity: 0.9;
    transform: translate(-50%, -50%) rotate(15deg) scale(1.1);
}

/* =========================================
   CONTROLS & BUTTONS
   ========================================= */
#controls {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 600px;
}

.mark-btn {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-reject {
    background-color: #dc2626;
    border-bottom: 5px solid #991b1b; /* 3D effect */
}

.btn-reject:hover { background-color: #ef4444; }

.btn-reject:active {
    transform: translateY(5px);
    border-bottom: 0px solid #991b1b;
    margin-top: 5px; /* Keeps layout from shifting */
    margin-bottom: -5px;
}

.btn-accept {
    background-color: #16a34a;
    border-bottom: 5px solid #14532d; /* 3D effect */
}

.btn-accept:hover { background-color: #22c55e; }

.btn-accept:active {
    transform: translateY(5px);
    border-bottom: 0px solid #14532d;
    margin-top: 5px;
    margin-bottom: -5px;
}

/* =========================================
   FEEDBACK PANEL
   ========================================= */
#feedback-panel {
    background-color: var(--bg-panel);
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
    max-width: 600px;
    width: 100%;
    border-left: 6px solid #06b6d4; /* Cyan accent border */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    display: none; 
    animation: fadeInUp 0.4s ease-out forwards;
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

/* JS adds these classes dynamically */
.text-green-400 { color: #4ade80 !important; }
.text-red-400 { color: #f87171 !important; }

.feedback-text {
    color: #e2e8f0;
    line-height: 1.6;
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.next-btn {
    background-color: #0891b2;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%; /* Full width for modern look */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.next-btn:hover {
    background-color: #06b6d4;
}