:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --accent-left: #10b981;
    --accent-right: #ef4444;
    --accent-middle: #3b82f6;
    --accent-side: #8b5cf6;
    --border-color: #333;
}

.basic-mouse-tester-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.basic-mouse-tester-body-h1, .basic-mouse-tester-body-h2 { margin-top: 0; }
.basic-mouse-tester-body-h1 {
    margin-bottom: 10px;
    color: #4db8ff;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.container {
    max-width: 900px;
    width: 100%;
    display: grid;
    gap: 20px;
}

/* Dashboard Grid */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: #16213e;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid #2a3f5f;
}



.card-header {
    font-weight: bold;
    color: #aaa;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

/* Coordinate Display */
.coord-box {
    font-family: monospace;
    font-size: 1.2rem;
    text-align: center;
    background: #000;
    padding: 15px;
    border-radius: 4px;
    color: var(--accent-left);
    margin-bottom: 10px;
}

/* Mouse Buttons Testing Area */
.mouse-pad {
    display: grid;
    grid-template-areas:
". left right"
"back middle forward";
    gap: 20px;
    padding: 40px 20px;
    background: #0f0f0f;
    border-radius: 10px;
    position: relative;
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: center;
    margin-top: 20px;
}

.btn {
    height: 80px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    width: 100px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    background-color: #0f3460;
    color: white;
    box-shadow: 0 5px 0 #0a2342;
}

.btn:active {
    transform: translateY(5px);
    box-shadow: none;
    box-shadow: 0 0 0 rgba(0,0,0,0.5);
}
.btn:hover { filter: brightness(1.2); }

.btn-left {
    grid-area: left;
    background-color: var(--accent-left);
    color: white;
    background-color: #2e7d32; box-shadow: 0 5px 0 #1b5e20;
}
.btn-right { grid-area: right; background-color: var(--accent-right); color: white; background-color: #c62828; box-shadow: 0 5px 0 #b71c1c; }
.btn-middle { 
    grid-area: middle; 
    background-color: var(--accent-middle); 
    color: white;
    border-radius: 50%; /* Round for scroll wheel */
    width: 80px;
    height: 80px;
    background-color: #5c6bc0; box-shadow: 0 5px 0 #3949ab;
}
.btn-back { grid-area: back; background-color: var(--accent-side); color: white; background-color: #f9a825; color: black; box-shadow: 0 5px 0 #fbc02d; }
.btn-forward { grid-area: forward; background-color: var(--accent-side); color: white; background-color: #f9a825; color: black; box-shadow: 0 5px 0 #fbc02d; }





/* Active States for Visual Feedback */
.btn.active { box-shadow: 0 0 25px currentColor; animation: flash 0.1s; }

@keyframes flash {
    0% { filter: brightness(1.5); }
    100% { filter: brightness(1); }
}



/* Log Console */
.log-container {
    max-height: 300px;
    overflow-y: auto;
    background-color: #000;
    font-family: monospace;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    height: 200px;
}

.log-entry { border-bottom: 1px solid #222; margin-bottom: 4px; border-bottom: 1px solid #222; padding-bottom:2px; }
.log-time { color: #666; font-size: 0.8rem; margin-right: 10px; }
.log-type-left { color: var(--accent-left); }
.log-type-right { color: var(--accent-right); }
.log-type-middle { color: var(--accent-middle); }
.log-type-side { color: var(--accent-side); }
.log-type-wheel { color: #f59e0b; }
.log-type-move { color: #64748b; font-size: 0.85rem; }

.info { color: #fff; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stat-item {
    background: #2a2a2a;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
}
.stat-val { font-size: 1.5rem; font-weight: bold; display: block; color: var(--accent-middle); }

/* Extra Features Section */
.drag-test-area {
    width: 100%;
    height: 150px;
    background-color: #252525;
    border: 2px dashed #444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    text-align: center;
}
.drag-test-area.drag-over { background-color: rgba(59, 130, 246, 0.2); border-color: var(--accent-left); }

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4db8ff;
}

.checkbox-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
label { cursor: pointer; display: flex; align-items: center; gap: 10px; margin-bottom: 5px; font-size: 0.9rem;}

.mouse-labels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    color: #aaa;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Utility */
.hidden { display: none; }